Plugin linking error with conan qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
-
Hello, I am very sorry I know this is a common failure but I have scoured the internet and rebuilt qt many times to no avail. I have tried installing all the libs that are posted in forums before rebuilding and the error will just not budge.
These are some installed packages
adwaita-qt:amd64 1.4.2-3build4 amd64 Qt 5 port of GNOME’s Adwaita theme ii libadwaitaqt1:amd64 1.4.2-3build4 amd64 Qt 5 port of GNOME’s Adwaita theme — public library ii libadwaitaqtpriv1:amd64 1.4.2-3build4 amd64 Qt 5 port of GNOME’s Adwaita theme — private library ii libpoppler-qt5-1t64:amd64 24.02.0-1ubuntu9.3 amd64 PDF rendering library (Qt 5 based shared library) ii libqt5concurrent5t64:amd64 5.15.13+dfsg-1ubuntu1 amd64 Qt 5 concurrent module ii libqt5core5t64:amd64 5.15.13+dfsg-1ubuntu1 amd64 Qt 5 core module ii libqt5dbus5t64:amd64 5.15.13+dfsg-1ubuntu1 amd64 Qt 5 D-Bus module ii libqt5gui5t64:amd64 5.15.13+dfsg-1ubuntu1 amd64 Qt 5 GUI module ii libqt5multimedia5:amd64 5.15.13-1 amd64 Qt 5 Multimedia module ii libqt5multimediawidgets5:amd64 5.15.13-1 amd64 Qt 5 Multimedia Widgets module ii libqt5network5t64:amd64 5.15.13+dfsg-1ubuntu1 amd64 Qt 5 network module ii libqt5printsupport5t64:amd64 5.15.13+dfsg-1ubuntu1 amd64 Qt 5 print support module ii libqt5qml5:amd64 5.15.13+dfsg-1 amd64 Qt 5 QML module ii libqt5qmlmodels5:amd64 5.15.13+dfsg-1 amd64 Qt 5 QML Models library ii libqt5quick5:amd64 5.15.13+dfsg-1 amd64 Qt 5 Quick library ii libqt5svg5:amd64 5.15.13-1 amd64 Qt 5 SVG module ii libqt5waylandclient5:amd64 5.15.13-1 amd64 QtWayland client library ii libqt5waylandcompositor5:amd64 5.15.13-1 amd64 QtWayland compositor library ii libqt5widgets5t64:amd64 5.15.13+dfsg-1ubuntu1 amd64 Qt 5 widgets module ii libqt5x11extras5:amd64 5.15.13-1 amd64 Qt 5 X11 extras ii libqt5xml5t64:amd64 5.15.13+dfsg-1ubuntu1 amd64 Qt 5 XML module ii libqt6concurrent6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 concurrent module ii libqt6core6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 core module ii libqt6dbus6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 D-Bus module ii libqt6gui6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 GUI module ii libqt6help6:amd64 6.4.2-3build3 amd64 Qt 6 Help library ii libqt6network6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 network module ii libqt6opengl6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 OpenGL module ii libqt6openglwidgets6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 OpenGL widgets module ii libqt6printsupport6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 print support module ii libqt6qml6:amd64 6.4.2+dfsg-4build3 amd64 Qt 6 QML module ii libqt6qmlmodels6:amd64 6.4.2+dfsg-4build3 amd64 Qt 6 QML Models library ii libqt6quick6:amd64 6.4.2+dfsg-4build3 amd64 Qt 6 Quick library ii libqt6sql6-sqlite:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 SQLite 3 database driver ii libqt6sql6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 SQL module ii libqt6statemachine6:amd64 6.4.2-4build2 amd64 Qt 6 State Machine library ii libqt6test6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 test module ii libqt6waylandclient6:amd64 6.4.2-5build3 amd64 Qt 6 Wayland Client library ii libqt6waylandcompositor6:amd64 6.4.2-5build3 amd64 Qt 6 Wayland Compositor library ii libqt6waylandeglclienthwintegration6:amd64 6.4.2-5build3 amd64 Qt 6 Wayland WaylandEglClientHwIntegration library ii libqt6waylandeglcompositorhwintegration6:amd64 6.4.2-5build3 amd64 Qt 6 Wayland WaylandEglCompositorHwIntegration library ii libqt6widgets6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 widgets module ii libqt6wlshellintegration6:amd64 6.4.2-5build3 amd64 Qt 6 Wayland ShellIntegration library ii libqt6xml6t64:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 XML module ii libqtermwidget5-1:amd64 1.4.0-0ubuntu3 amd64 Terminal emulator widget for Qt 5 (shared libraries) ii libquazip1-qt5-1t64:amd64 1.4-1.1build3 amd64 Qt/C++ wrapper over minizip - Version 1 (Qt5) ii qmake6:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 qmake Makefile generator tool ii qmake6-bin 6.4.2+dfsg-21.1build5 amd64 Qt 6 qmake Makefile generator tool — binary file ii qt5-gtk-platformtheme:amd64 5.15.13+dfsg-1ubuntu1 amd64 Qt 5 GTK+ 3 platform theme ii qt6-base-dev:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 base development files ii qt6-base-dev-tools 6.4.2+dfsg-21.1build5 amd64 Qt 6 base development programs ii qt6-gtk-platformtheme:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 GTK+ 3 platform theme ii qt6-qpa-plugins:amd64 6.4.2+dfsg-21.1build5 amd64 Qt 6 QPA plugins ii qt6-translations-l10n 6.4.2-1 all translations for Qt 6 ii qt6-wayland:amd64 6.4.2-5build3 amd64 Qt 6 Wayland platform plugin ii qt6-wayland-dev:amd64 6.4.2-5build3 amd64 Qt 6 Wayland - development files ii qt6-wayland-dev-tools 6.4.2-5build3 amd64 Qt 6 Wayland developer tools ii qtermwidget5-data 1.4.0-0ubuntu3 all Terminal emulator widget for Qt 5 (data files) ii qttranslations5-l10n 5.15.13-1 all translations for Qt 5 ii qtwayland5:amd64 5.15.13-1 amd64 QtWayland platform plugin
This is a non exhaustive list of everything I have tried to dl.
I am running ubuntu 24.04
I was thinking of changing the QT_QPA_PLUGIN env var but I don't think that is the error as when I run this
#include <fstream> #include <QCoreApplication> #include <QDebug> #include <QLibraryInfo> int main(int argc, char **argv) { QCoreApplication app(argc, argv); // Open file in write mode std::ofstream outputFile("output.txt"); if (outputFile.is_open()) { outputFile << "Version: " << QLibraryInfo::version().toString().toStdString() << "\n"; outputFile << "Prefix: " << QLibraryInfo::path(QLibraryInfo::PrefixPath).toStdString() << "\n"; outputFile << "Libs: " << QLibraryInfo::path(QLibraryInfo::LibrariesPath).toStdString() << "\n"; outputFile << "Plugins: " << QLibraryInfo::path(QLibraryInfo::PluginsPath).toStdString() << "\n"; outputFile << "Libexec: " << QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath).toStdString() << "\n"; outputFile.close(); // Close the file } else { qDebug() << "Unable to open file."; } return 0; }
I get this as output which does correspond to the correct plugins path I believe.
Version: "6.7.3" Prefix : "/home/username/.conan2/p/b/qtcbb40b7233098/p" Libs : "/home/username/.conan2/p/b/qtcbb40b7233098/p/lib" Plugins: "/home/username/.conan2/p/b/qtcbb40b7233098/p/plugins" Libexec: "/home/username/.conan2/p/b/qtcbb40b7233098/p/libexec"
Your help would be greatly appreciated and most forums redirect to using xcb. I would like to use wayland for my project if that is possible. Oh and please tell me if you want the output of the ./configure I can get it, it is just that it means dl qt again (as I am not sure how conan manages the qt recipe so I'd rather not fiddle with the src directly)
Let me also take the opportunity to praise the wonderful work you do at Qt maintaining a great open source project:). And please be understanding, I am not an extremely proficient programmer yet.
-
Hi and welcome to devnet,
Are you sure your self built Qt has the wayland plugin ?
You can start your application with theQT_DEBUG_PLUGINS
environment variable set to 1 to see what is happening with your version of Qt.
Also, do you have the development packages installed on your system ? -
qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
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 problemHi thank you for the quick reply this is the full output. I think I have all the required packages, even though I could not find an exhaustive list anywhere, but I tried to install all packages I came across in previous forum posts. I installed Qt with conan C++ package manager so I am not sure with what plugins it came, how can I check that or with what arguments on cmake can I impose that it build for wayland?
-
You seem to be using a static build of Qt. Is that correct ?