Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

Qt application failed to start, qt.qpa.plugin

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Giovanni Scordilli
n00b
n00b
Posts: 6
Joined: Sun Aug 11, 2024 9:45 am
Location: Italy

Qt application failed to start, qt.qpa.plugin

  • Quote

Post by Giovanni Scordilli » Thu Aug 15, 2024 8:04 pm

I was starting my qt c++ application with:

Code: Select all

DESKTOP-giovanni /home/giovanni/Projects/CXX/GUI/PasswordGenerator/build # ./psw_generator
And I recived the error:

Code: Select all

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: Select all

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: Select all

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 :-)
Top
Ionen
Developer
Developer
User avatar
Posts: 3013
Joined: Thu Dec 06, 2018 2:23 pm

  • Quote

Post by Ionen » Fri Aug 16, 2024 12:20 am

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: Select all

        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 :))
Top
Hu
Administrator
Administrator
Posts: 24386
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Aug 16, 2024 12:34 am

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.
Top
Giovanni Scordilli
n00b
n00b
Posts: 6
Joined: Sun Aug 11, 2024 9:45 am
Location: Italy

  • Quote

Post by Giovanni Scordilli » Fri Aug 16, 2024 9:40 am

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: Select all

        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! :D
I found the missing library: it was x11-libs/xcb-util-cursor.
Now when I run the executable I recive another error:

Code: Select all

./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 :-)
Top
Post Reply

4 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic