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. 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
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
13 Posts 4 Posters 538 Views 2 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #3

    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 ?

    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
    2
    • R Offline
      R Offline
      Remnant
      wrote on last edited by
      #4

      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
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #5

        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

        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
        1
        • R Offline
          R Offline
          Remnant
          wrote last edited by
          #6

          Yes except that it is a really comon error, is it not possible that Qt plugins are not portable enough to be bundled in the static build?

          SGaistS 1 Reply Last reply
          0
          • R Offline
            R Offline
            Remnant
            wrote last edited by Remnant
            #7

            and would you have any paths to try and fix the problem please? :) (I have tried running the executable as sudo still no luck)

            JoeCFDJ 1 Reply Last reply
            0
            • R Remnant

              and would you have any paths to try and fix the problem please? :) (I have tried running the executable as sudo still no luck)

              JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote last edited by
              #8

              @Remnant it is likely that some dependencies of the plugin are not installed. plugin is a lib as well. run command:
              ldd path/plugin.so
              to check if some dependencies are missing. or
              strace your app
              to find out what is missing.

              R 1 Reply Last reply
              0
              • R Remnant

                Yes except that it is a really comon error, is it not possible that Qt plugins are not portable enough to be bundled in the static build?

                SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote last edited by
                #9

                @Remnant the only dynamic dependencies of a static Qt build should be the system libraries such as xcb or the SQL client libraries. The Qt plugins themselves shall be static otherwise. Hence it looks like there's something off with that build of yours. Or your application build did not pick the correct plugins.

                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
                1
                • JoeCFDJ JoeCFD

                  @Remnant it is likely that some dependencies of the plugin are not installed. plugin is a lib as well. run command:
                  ldd path/plugin.so
                  to check if some dependencies are missing. or
                  strace your app
                  to find out what is missing.

                  R Offline
                  R Offline
                  Remnant
                  wrote last edited by Remnant
                  #10

                  @JoeCFD I have tried that and I think you are right there is a whole bunch of file calls not hitting.
                  Okay so I tried to paste my output but Akismet.com won't let me. But according to their website they have 99.99% accuracy so I'll trust them.

                  openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/lib/glibc-hwcaps/x86-64-v4/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                  openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/lib/glibc-hwcaps/x86-64-v3/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                  openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/lib/glibc-hwcaps/x86-64-v2/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                  openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                  openat(AT_FDCWD, "/home/username/.conan2/p/b/zlibf508e02f60bc4/p/lib/glibc-hwcaps/x86-64-v4/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                  openat(AT_FDCWD, "/home/username/.conan2/p/b/zlibf508e02f60bc4/p/lib/glibc-hwcaps/x86-64-v3/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                  openat(AT_FDCWD, "/home/username/.conan2/p/b/zlibf508e02f60bc4/p/lib/glibc-hwcaps/x86-64-v2/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                  

                  I do not know if these calls are mandatory though I do not know if somebody knows whether they are?
                  There is an another 232 lines like that. But the gist is that glibc is missing from conan

                  1 Reply Last reply
                  0
                  • hskoglundH Offline
                    hskoglundH Offline
                    hskoglund
                    wrote last edited by
                    #11

                    The missing glibc error I think is a red herring, those plugin errors probably occur because you have 2 QApplication instances (one static and one dynamic in a separate thread), i.e. your static build might be incomplete so that Qt resorts to dynamic linking to load the missing pieces.

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

                      Oh and plugins are missing shall I go and ask the question on qt recipe issues?

                      openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/imageformats/glibc-hwcaps/x86-64-v4/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                      openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/imageformats/glibc-hwcaps/x86-64-v3/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                      openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/imageformats/glibc-hwcaps/x86-64-v2/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                      openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/imageformats/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                      openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/platforms/glibc-hwcaps/x86-64-v4/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                      

                      + some more output like that which I cannot post

                      1 Reply Last reply
                      0
                      • hskoglundH hskoglund

                        The missing glibc error I think is a red herring, those plugin errors probably occur because you have 2 QApplication instances (one static and one dynamic in a separate thread), i.e. your static build might be incomplete so that Qt resorts to dynamic linking to load the missing pieces.

                        R Offline
                        R Offline
                        Remnant
                        wrote last edited by Remnant
                        #13

                        @hskoglund Yes I think that is right, but then I just don't know which library are essential in the creation of the static build for wayland.

                        openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/platforms/glibc-hwcaps/x86-64-v4/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                        openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/platforms/glibc-hwcaps/x86-64-v3/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                        openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/platforms/glibc-hwcaps/x86-64-v2/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                        openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/platforms/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                        openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/sqldrivers/glibc-hwcaps/x86-64-v4/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                        openat(AT_FDCWD, "/home/username/.conan2/p/b/qt9e43eba220521/p/plugins/sqldrivers/glibc-hwcaps/x86-64-v3/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
                        

                        There are two more lines of sqldrivers missing

                        This is the rest of the output, is there one of the libs that are critical?

                        1 Reply Last reply
                        0

                        • Login

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