Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84749

QT applications fail to run if xcb_xinerama (or other xcb libraries) is not installed

    XMLWordPrintable

Details

    • Linux/X11

    Description

      Getting the error message when trying to run any sample application

       

      qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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.
      Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
      

       

      Using Ubuntu 20.04 LTS, gnome 3.36.2 on X11; Qt Creator 4.12.2 and Qt 5.15.0 installed from Qt binary download; gcc 9.3.0

      Setting QT_DEBUG_PLUGINS to 1 gives:

       

      QFactoryLoader::QFactoryLoader() checking directory path "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms" ...
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqeglfs.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqeglfs.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "eglfs"
       ]
       },
       "archreq": 0,
       "className": "QEglFSIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("eglfs")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqlinuxfb.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqlinuxfb.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "linuxfb"
       ]
       },
       "archreq": 0,
       "className": "QLinuxFbIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("linuxfb")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqminimal.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqminimal.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "minimal"
       ]
       },
       "archreq": 0,
       "className": "QMinimalIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("minimal")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqminimalegl.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqminimalegl.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "minimalegl"
       ]
       },
       "archreq": 0,
       "className": "QMinimalEglIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("minimalegl")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqoffscreen.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqoffscreen.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "offscreen"
       ]
       },
       "archreq": 0,
       "className": "QOffscreenIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("offscreen")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqvnc.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqvnc.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "vnc"
       ]
       },
       "archreq": 0,
       "className": "QVncIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("vnc")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqwayland-egl.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqwayland-egl.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "wayland-egl"
       ]
       },
       "archreq": 0,
       "className": "QWaylandEglPlatformIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("wayland-egl")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqwayland-generic.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqwayland-generic.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "wayland"
       ]
       },
       "archreq": 0,
       "className": "QWaylandIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("wayland")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "wayland-xcomposite-egl"
       ]
       },
       "archreq": 0,
       "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("wayland-xcomposite-egl")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "wayland-xcomposite-glx"
       ]
       },
       "archreq": 0,
       "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("wayland-xcomposite-glx")
      QFactoryLoader::QFactoryLoader() looking at "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so"
      Found metadata in lib /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so, metadata=
      {
       "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
       "MetaData": {
       "Keys": [
       "xcb"
       ]
       },
       "archreq": 0,
       "className": "QXcbIntegrationPlugin",
       "debug": false,
       "version": 331520
      }
      
      Got keys from plugin meta data ("xcb")
      QFactoryLoader::QFactoryLoader() checking directory path "/home/myk/Qt/Examples/Qt-5.15.0/datavisualization/build-bars-Desktop_Qt_5_15_0_GCC_64bit-Debug/platforms" ...
      Cannot load library /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
      QLibraryPrivate::loadPlugin failed on "/home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /home/myk/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"
      qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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.
      Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
      16:33:14: The program has unexpectedly finished.
       
      

      Investigating at the command line:

      myk@ubuntu:~$ find . -name libqxcb.so -print
      ./Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so
      ./Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so

      myk@ubuntu:~$ ldd ./Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so | grep xinerama
      libxcb-xinerama.so.0 => not found
      libxcb-xinerama.so.0 => not found

       

      To Resolve:
      myk@ubuntu:~$ sudo apt-get install -y libxcb-xinerama0
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      The following NEW packages will be installed:
      libxcb-xinerama0
      0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded.
      Need to get 5,260 B of archives.
      After this operation, 37.9 kB of additional disk space will be used.
      Get:1 http://us.archive.ubuntu.com/ubuntu focal/main amd64 libxcb-xinerama0 amd64 1.14-2 [5,260 B]
      Fetched 5,260 B in 1s (8,710 B/s)
      Selecting previously unselected package libxcb-xinerama0:amd64.
      (Reading database ... 233716 files and directories currently installed.)
      Preparing to unpack .../libxcb-xinerama0_1.14-2_amd64.deb ...
      Unpacking libxcb-xinerama0:amd64 (1.14-2) ...
      Setting up libxcb-xinerama0:amd64 (1.14-2) ...
      Processing triggers for libc-bin (2.31-0ubuntu9) ...
      myk@ubuntu:~$ ldd ./Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so | grep xinerama
      libxcb-xinerama.so.0 => /lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007fc158fb2000)

      Application now runs successfully

      Expected:

      It would be great for new installations of Qt Creator on Ubuntu  to work out the box, failing which perhaps this dependency be documented somewhere if that is not already done.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              releaseteam Qt Release Team
              myk Michael Arnold
              Votes:
              14 Vote for this issue
              Watchers:
              39 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes