qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms" even though it was found
-
Hello,
I have a problem with my qt installation in which in this post I tried installing qt with a static build with a conan package and I finally managed to link the plugin. Now I am getting this error message:
qt.core.library: "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqwayland-generic.so" loaded library QObject::moveToThread: Current thread (0x56b15c0bcc30) is not the object's thread (0x56b15c0f4940). Cannot move to target thread (0x56b15c0bcc30) qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I have run ldd and did not find any dependencies missing in the two .so wayland-generic.so and wayland-egl.so. I am a little stumped. Would you have any suggestions of things I can try to get it to work? I have found some wizardry in some forums where they move a libQt6WaylandClient.so into the platforms but I would probably like to know if there is a simpler and better fix ? Thank you for your answers
-
If I try to run it with xcb I get
qt.core.library: "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqxcb.so" loaded library QObject::moveToThread: Current thread (0x5bc0a3cc4c30) is not the object's thread (0x5bc0a3d023c0). Cannot move to target thread (0x5bc0a3cc4c30) qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
but when I look at ldd libqxcb libxcb-cursor0 does not appear as a dependency and grepping for found I don't get anything
-
Hi,
You can start your application with the
QT_DEBUG_PLUGINS
environment variable set to 1 to get more information about what is happening.That said, why does your static Qt build try to load your system installed plugins ?
-
HI,
I am already running that flag. And for the static question I had the same question, I guess it is because it must be hard to make the app crossplatform otherwise,one of the lines
t.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
-
No, there's something wrong. A static build of Qt might use system libraries such as xcb but should not load the plugins from an installed version of Qt