View previous topic :: View next topic |
Author |
Message |
Giovanni Scordilli n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Aug 2024 Posts: 6 Location: Italy
|
Posted: Thu Aug 15, 2024 8:04 pm Post subject: Qt application failed to start, qt.qpa.plugin |
|
|
I was starting my qt c++ application with:
Code: |
DESKTOP-giovanni /home/giovanni/Projects/CXX/GUI/PasswordGenerator/build # ./psw_generator
|
And I recived the error:
Code: |
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, vkkhrdisplay, minimal, eglfs, offscreen, minimalegl, vnc.
|
So I ran the configure script (because I compiled Qt from sources) and I noticed one X11 lib missing:
Code: |
X11 specific:
XLib ................................. yes
XCB Xlib ............................. yes
EGL on X11 ........................... yes
xkbcommon-x11 ........................ yes
xcb-sm ............................... no
|
So I installed the missing libraries with:
Code: |
DESKTOP-giovanni /home/giovanni/CXXLibraries/Qt/src # emerge --ask x11-libs/libSM
|
And after re-running the configure script nothing change, also I see that in the path /usr/lib64/, libSM.so is present. _________________ Giova ![Smile :-)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ionen Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/12407261860db424480089.png)
Joined: 06 Dec 2018 Posts: 2765
|
Posted: Fri Aug 16, 2024 12:20 am Post subject: |
|
|
From sources you mean manually rather than by using the ebuild? I don't think issue is xcb-sm (it's semi-optional). The exact conditions to enable the xcb platform plugin (with automagic) is: "CONDITION QT_FEATURE_thread AND TARGET XCB::XCB AND TEST_xcb_syslibs AND QT_FEATURE_xkbcommon_x11"
TEST_xcb_syslibs tries a lot of xcb-* libraries, e.g. XCB::KEYSYMS, and you may be missing one of them.
The full slew of dependencies (that the ebuild would use) for X is: Code: | X? (
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libxcb:=
x11-libs/xcb-util-cursor
x11-libs/xcb-util-image
x11-libs/xcb-util-keysyms
x11-libs/xcb-util-renderutil
x11-libs/xcb-util-wm
) | So check if you have all of them (or use the ebuild ) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 22384
|
Posted: Fri Aug 16, 2024 12:34 am Post subject: |
|
|
At the same prompt where starting this custom application fails, can you start xmessage (or any other trivial X11 application) successfully? If yes, can you start a well known Qt application successfully? The prompt looks to me like a root shell, and depending on other configuration, root may not be able to access the user's X session. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Giovanni Scordilli n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Aug 2024 Posts: 6 Location: Italy
|
Posted: Fri Aug 16, 2024 9:40 am Post subject: |
|
|
Ionen wrote: | From sources you mean manually rather than by using the ebuild? I don't think issue is xcb-sm (it's semi-optional). The exact conditions to enable the xcb platform plugin (with automagic) is: "CONDITION QT_FEATURE_thread AND TARGET XCB::XCB AND TEST_xcb_syslibs AND QT_FEATURE_xkbcommon_x11"
TEST_xcb_syslibs tries a lot of xcb-* libraries, e.g. XCB::KEYSYMS, and you may be missing one of them.
The full slew of dependencies (that the ebuild would use) for X is: Code: | X? (
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libxcb:=
x11-libs/xcb-util-cursor
x11-libs/xcb-util-image
x11-libs/xcb-util-keysyms
x11-libs/xcb-util-renderutil
x11-libs/xcb-util-wm
) | So check if you have all of them (or use the ebuild ) |
Thank you so much!
I found the missing library: it was x11-libs/xcb-util-cursor.
Now when I run the executable I recive another error:
Code: |
./psw_generator: error while loading shared libraries: libQt6Widgets.so.6: cannot open shared object file: No such file or directory
|
I also tried to start the application with sudo but nothing change.
Watching the lib folder of Qt, libQtWidgets.so.6 is present.
After that I understand that all the build file are been generated with the root user. So I delete all the file and re-generated with the normal user and now all work fine.
Thank you so much guys! I'm glad to pass to Gentoo: a great OS and great people who help the novice! _________________ Giova ![Smile :-)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|