Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Plugin linking error with conan qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
QtWS25 Last Chance

Plugin linking error with conan qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""

Scheduled Pinned Locked Moved Solved Installation and Deployment
16 Posts 2 Posters 341 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Remnant
    wrote 19 days ago last edited by
    #1

    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.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Remnant
      wrote 12 days ago last edited by Remnant
      #14

      Okay so I have found the solution to this question you have to export these environment vars
      QT_QPA_PLATFORM_PLUGIN_PATH (somewhere in /usr/lib)
      QT_PLUGIN_PATH (somewhere in /usr/lib)

      then run your app and it should work. I still have some obscure issues but this got me further. I'll open another post if my other problems persist

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote 18 days ago last edited by
        #2

        Hi and welcome to devnet,

        Are you sure your self built Qt has the wayland plugin ?
        You can start your application with the QT_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 ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Remnant
          wrote 18 days ago last edited by
          #3

          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 problem

          Hi 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?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote 17 days ago last edited by
            #4

            You seem to be using a static build of Qt. Is that correct ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Remnant
              wrote 17 days ago last edited by
              #5

              Yes I think that it is correct, it ran with default options which is that it be built static (I am pretty sure looking at the default options on the conan recipe github).

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote 16 days ago last edited by
                #6

                Then you should follow the static plugin howto.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  Remnant
                  wrote 16 days ago last edited by Remnant
                  #7

                  Hello so I have looked around and I am not entirely sure what package I am supposed to link with

                  qt_import_plugins()
                  

                  I have looked around and I have not found any good plugin to import I do not understand where to find the list of plugins to import to ensure bridging to wayland

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote 15 days ago last edited by
                    #8

                    There's indeed no list however you can lookup for QXyzPlugin in Qt's sources under the src/plugins folders.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      Remnant
                      wrote 15 days ago last edited by
                      #9
                      .
                      ├── _clang-format
                      ├── cmake
                      ├── CMakeLists.txt
                      ├── CMakeUserPresets.json
                      ├── coin
                      ├── configure
                      ├── configure.bat
                      ├── configure.json
                      ├── CONTRIBUTING.md
                      ├── LICENSES
                      ├── qt3d
                      ├── qt5compat
                      ├── qtactiveqt
                      ├── qtbase
                      ├── qtcharts
                      ├── qtcoap
                      ├── qtconnectivity
                      ├── qtdatavis3d
                      ├── qtdeclarative
                      ├── qtdoc
                      ├── qtgraphs
                      ├── qtgrpc
                      ├── qthttpserver
                      ├── qtimageformats
                      ├── qtlanguageserver
                      ├── qtlocation
                      ├── qtlottie
                      ├── qtmqtt
                      ├── qtmultimedia
                      ├── qtnetworkauth
                      ├── qtopcua
                      ├── qtpositioning
                      ├── qtquick3d
                      ├── qtquick3dphysics
                      ├── qtquickeffectmaker
                      ├── qtquicktimeline
                      ├── qtremoteobjects
                      ├── qtscxml
                      ├── qtsensors
                      ├── qtserialbus
                      ├── qtserialport
                      ├── qtshadertools
                      ├── qtspeech
                      ├── qtsvg
                      ├── qttools
                      ├── qttranslations
                      ├── qtvirtualkeyboard
                      ├── qtwayland
                      ├── qtwebchannel
                      ├── qtwebengine
                      ├── qtwebsockets
                      ├── qtwebview
                      ├── README.md
                      └── README.md.template
                      

                      Hi so I am not entirely sure how the conan recipe is made but looking inside the src folder inside .conan2 I have the impression it has not been compiled exactly from a clone of the github. The only interesting thing I found was in the examples of qtwayland folder the inclusion of the Qt::WaylandCompositor in the CmakeLists but when I run cmake it does not find that package.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote 13 days ago last edited by
                        #10

                        GitHub is just a mirror.

                        If you want a full Qt checkout, there's a script in the qt5 repo that will do that properly. However that is not the subject here.

                        The plug-in you are after should be in the qtwayland submodule.
                        I was just thinking about something, you should have the libraries and plugins build somewhere on your filesystem. There you should be able to see exactly what is available.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          Remnant
                          wrote 13 days ago last edited by Remnant
                          #11

                          .So I have found the include dir with a little bit of grepping and this is what I have found inside the include files. there is Qt6::Wayland compositor and qtClient

                          ├── QtConcurrent
                          ├── QtCore
                          ├── QtDBus
                          ├── QtDesigner
                          ├── QtDesignerComponents
                          ├── QtDeviceDiscoverySupport
                          ├── QtEglFSDeviceIntegration
                          ├── QtEglFsKmsGbmSupport
                          ├── QtEglFsKmsSupport
                          ├── QtFbSupport
                          ├── QtGui
                          ├── QtHelp
                          ├── QtInputSupport
                          ├── QtKmsSupport
                          ├── QtNetwork
                          ├── QtOpenGL
                          ├── QtOpenGLWidgets
                          ├── QtPrintSupport
                          ├── QtSql
                          ├── QtTest
                          ├── QtTools
                          ├── QtUiPlugin
                          ├── QtUiTools
                          ├── QtWaylandClient
                          ├── QtWaylandCompositor
                          ├── QtWaylandEglClientHwIntegration
                          ├── QtWaylandEglCompositorHwIntegration
                          ├── QtWaylandGlobal
                          ├── QtWidgets
                          ├── QtWlShellIntegration
                          └── QtXml
                          

                          Then This is my CMakeLists file

                          cmake_minimum_required(VERSION 3.15)
                          project(MyQtApp)
                          find_package(Qt6 REQUIRED COMPONENTS Core GUI WaylandCompositor)
                          
                          
                          set(CMAKE_CXX_STANDARD 17)
                          
                          
                          qt_import_plugins(Qt6::WaylandCompositor)
                          
                          qt_add_executable(MyQtApp
                              main.cpp)
                          
                          target_link_libraries(MyQtApp PUBLIC Qt6::Core Qt6::Gui qt::qt Qt6::WaylandCompositor)
                          

                          with a CMake Error saying package not found only on Qt6::WaylandCompositor or WaylandClient

                          and Qt6WaylandCompositor is also present in the cmake directory

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            Remnant
                            wrote 13 days ago last edited by
                            #12

                            I am also a bit lost why does QLibraryInfo link to my .conan2 folder (does this indicate from where the binaries were built)?

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote 12 days ago last edited by
                              #13

                              It was rather the librairies folder that you should have looked in.

                              I think the name of the plug-in is QWaylandIntegrationPlugin.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • R Offline
                                R Offline
                                Remnant
                                wrote 12 days ago last edited by Remnant
                                #14

                                Okay so I have found the solution to this question you have to export these environment vars
                                QT_QPA_PLATFORM_PLUGIN_PATH (somewhere in /usr/lib)
                                QT_PLUGIN_PATH (somewhere in /usr/lib)

                                then run your app and it should work. I still have some obscure issues but this got me further. I'll open another post if my other problems persist

                                1 Reply Last reply
                                0
                                • R Remnant has marked this topic as solved 12 days ago
                                • R Offline
                                  R Offline
                                  Remnant
                                  wrote 11 days ago last edited by
                                  #15

                                  Thank you for having taken the time to answer

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote 11 days ago last edited by
                                    #16

                                    Glad you found a solution and thanks for sharing ! :-)

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    1 Reply Last reply
                                    0
                                    • R Remnant referenced this topic 10 days ago

                                    1/16

                                    19 Apr 2025, 22:56

                                    • Login

                                    • Login or register to search.
                                    1 out of 16
                                    • First post
                                      1/16
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Users
                                    • Groups
                                    • Search
                                    • Get Qt Extensions
                                    • Unsolved