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 5.12.1 Cannot load library /opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)
Forum Updated to NodeBB v4.3 + New Features

Qt 5.12.1 Cannot load library /opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
11 Posts 6 Posters 14.4k 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.
  • P Offline
    P Offline
    plover
    wrote on last edited by
    #1

    I was trying to upgrade my Centos 7.5 Dockerfile from using 5.12.0 to 5.12.1.

    The only thing that I change in the Dockerfile were the version numbers (5.12.0 to 5.12.1) in the following lines:

    #install qt5.12
    ADD qt-installer-noninteractive.qs .
    RUN wget -q http://download.qt.io/archive/qt/5.12/5.12.1/qt-opensource-linux-x64-5.12.1.run
    RUN chmod +x qt-opensource-linux-x64-5.12.1.run
    RUN ./qt-opensource-linux-x64-5.12.1.run --platform minimal --script qt-installer-noninteractive.qs --verbose
    
    RUN /opt/Qt/Tools/QtCreator/bin/qbs setup-toolchains --detect 
    RUN /opt/Qt/Tools/QtCreator/bin/qbs setup-qt '/opt/Qt/5.12.1/gcc_64/bin/qmake' QtProfile
    RUN /opt/Qt/Tools/QtCreator/bin/qbs config profiles.QtProfile.baseProfile clang
    
    ENV PATH="/opt/Qt/5.12.1/gcc_64/bin:${PATH}"
    ENV LD_LIBRARY_PATH="/opt/Qt/5.12.1/gcc_64/lib:${LD_LIBRARY_PATH}"
    

    Now when I run a very basic application (just a empty QMainwindow) using a docker-compose file it crashes.

    I saw in another post here on the forum that suggested using QT_DEBUG_PLUGINS=1
    Where I got the following error message:

    application-run        | Got keys from plugin meta data ("xcb")
    application-run        | QFactoryLoader::QFactoryLoader() checking directory path "/home/polaris/bin/platforms" ...
    application-run        | Cannot load library /opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)
    application-run        | QLibraryPrivate::loadPlugin failed on "/opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)"
    application-run        | qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
    application-run      | This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    application-run        |
    application-run        | Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
    application-run       |
    

    I've tried all the suggestions in the post that I linked to above, and non of them fix this problem.

    Again this application runs fine on Qt 5.12.0.

    raven-worxR 1 Reply Last reply
    0
    • P plover

      I was trying to upgrade my Centos 7.5 Dockerfile from using 5.12.0 to 5.12.1.

      The only thing that I change in the Dockerfile were the version numbers (5.12.0 to 5.12.1) in the following lines:

      #install qt5.12
      ADD qt-installer-noninteractive.qs .
      RUN wget -q http://download.qt.io/archive/qt/5.12/5.12.1/qt-opensource-linux-x64-5.12.1.run
      RUN chmod +x qt-opensource-linux-x64-5.12.1.run
      RUN ./qt-opensource-linux-x64-5.12.1.run --platform minimal --script qt-installer-noninteractive.qs --verbose
      
      RUN /opt/Qt/Tools/QtCreator/bin/qbs setup-toolchains --detect 
      RUN /opt/Qt/Tools/QtCreator/bin/qbs setup-qt '/opt/Qt/5.12.1/gcc_64/bin/qmake' QtProfile
      RUN /opt/Qt/Tools/QtCreator/bin/qbs config profiles.QtProfile.baseProfile clang
      
      ENV PATH="/opt/Qt/5.12.1/gcc_64/bin:${PATH}"
      ENV LD_LIBRARY_PATH="/opt/Qt/5.12.1/gcc_64/lib:${LD_LIBRARY_PATH}"
      

      Now when I run a very basic application (just a empty QMainwindow) using a docker-compose file it crashes.

      I saw in another post here on the forum that suggested using QT_DEBUG_PLUGINS=1
      Where I got the following error message:

      application-run        | Got keys from plugin meta data ("xcb")
      application-run        | QFactoryLoader::QFactoryLoader() checking directory path "/home/polaris/bin/platforms" ...
      application-run        | Cannot load library /opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)
      application-run        | QLibraryPrivate::loadPlugin failed on "/opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)"
      application-run        | qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
      application-run      | This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
      application-run        |
      application-run        | Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
      application-run       |
      

      I've tried all the suggestions in the post that I linked to above, and non of them fix this problem.

      Again this application runs fine on Qt 5.12.0.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @plover
      you need to install additional packages (e.g. for debian: "apt install libxkbcommon-x11-0")
      Maybe the base image has updated in the meantime?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      4
      • P Offline
        P Offline
        plover
        wrote on last edited by
        #3

        @raven-worx No the base image has not been updated. I've created a new image with 5.12.0 and another with 5.12.1 . The error only comes in 5.12.1. I've tried to reinstall libqxcb and libxkbcommon but that does not fix anything.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What version of Xkbcommon do you have ?
          Once installed what does ldd /opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so return ?

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

          J 1 Reply Last reply
          2
          • SGaistS SGaist

            What version of Xkbcommon do you have ?
            Once installed what does ldd /opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so return ?

            J Offline
            J Offline
            J0hnny
            wrote on last edited by
            #5

            @SGaist I had the same error message after updating from working 5.12.0 to 5.12.1.
            "apt install libxkbcommon-x11-0" fixed it on Debian 9. The version of the package is 0.7.1-2~deb9u1.
            But I did not do any distro updates either while updating Qt, so the need for libxkbcommon seems to come with 5.12.1 installation.

            raven-worxR 1 Reply Last reply
            0
            • J J0hnny

              @SGaist I had the same error message after updating from working 5.12.0 to 5.12.1.
              "apt install libxkbcommon-x11-0" fixed it on Debian 9. The version of the package is 0.7.1-2~deb9u1.
              But I did not do any distro updates either while updating Qt, so the need for libxkbcommon seems to come with 5.12.1 installation.

              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by raven-worx
              #6

              @J0hnny said in Qt 5.12.1 Cannot load library /opt/Qt/5.12.1/gcc_64/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory):

              "apt install libxkbcommon-x11-0" fixed it on Debian 9. The version of the package is 0.7.1-2~deb9u1.
              But I did not do any distro updates either while updating Qt, so the need for libxkbcommon seems to come with 5.12.1 installation.

              as i already said.
              You probably have a FROM BaseImage in your Dockerfile no? Can you guarantee that the package wasn*t updated in the meantime? Or maybe the dependency was removed from another package you installed which is missing now for you.

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Since 5.12.1 and because the oldest supported distribution provides xkbcommon, the bundled version has been removed. Therefore xkbcommon must be provided by your distribution.

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

                D 1 Reply Last reply
                2
                • SGaistS SGaist

                  Since 5.12.1 and because the oldest supported distribution provides xkbcommon, the bundled version has been removed. Therefore xkbcommon must be provided by your distribution.

                  D Offline
                  D Offline
                  deleted372
                  wrote on last edited by
                  #8

                  @SGaist Can you please point to the related documentation about xkbcommon and Qt 5.12.1?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    It's in the 5.12.1 changelog

                    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
                    • A Offline
                      A Offline
                      aclaro
                      wrote on last edited by
                      #10

                      It is very odd that a large configuration change like this was made to an update on an LTS version of Qt. In addition, the bug this change was made against hasn't even passed testing, it is still in progress. I would expect more rigor on an LTS release.

                      We started using Qt 5.12.0 on RHEL6.x, and it passed our testing at time of release. Now, with a quiet update it no longer works. With RHEL 6 not being retired until November 30, 2020, I'm not sure why the decision was made to drop support in 5.12 LTS (especially considering it worked well until now).

                      I think it would be best if this change was reverted in the next 5.12 update, and pushed to 5.13.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        Hi and welcome to devnet,

                        It's explained in the change log. However if you want to discuss about that. You should go to the development mailing list. You'll find there Qt's developers/maintainers. This is a user forum.

                        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

                        • Login

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