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

xcb issue again

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 7 Posters 3.9k 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.
  • N Offline
    N Offline
    na28
    wrote on last edited by
    #1

    I see that has been asked many times, but the other answers did not solve my case.

    I compiled Qt5 on CentOS 8.2.
    Installed into /usr/local/Qt-5.15.2

    When running /usr/local/Qt-5.15.2/bin/designer I get the infamous:

    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.
    
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl.
    

    Note that xcb is not one of the available platform plugins.

    Running with QT_DEBUG_PLUGINS=1, the message is:

    QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/Qt-5.15.2/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqeglfs.so"
    Found metadata in lib /usr/local/Qt-5.15.2/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 "/usr/local/Qt-5.15.2/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /usr/local/Qt-5.15.2/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 "/usr/local/Qt-5.15.2/plugins/platforms/libqminimal.so"
    Found metadata in lib /usr/local/Qt-5.15.2/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 "/usr/local/Qt-5.15.2/plugins/platforms/libqminimalegl.so"
    Found metadata in lib /usr/local/Qt-5.15.2/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 "/usr/local/Qt-5.15.2/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /usr/local/Qt-5.15.2/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 "/usr/local/Qt-5.15.2/plugins/platforms/libqvnc.so"
    Found metadata in lib /usr/local/Qt-5.15.2/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 "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so"
    Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "webgl"
            ]
        },
        "archreq": 0,
        "className": "QWebGLIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("webgl")
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/Qt-5.15.2/bin/platforms" ...
    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.
    
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl.
    
    Aborted (core dumped)
    

    Any help would be appreciated.

    1 Reply Last reply
    1
    • N Offline
      N Offline
      na_inf
      wrote on last edited by
      #5

      It turns out that on CentOS 8 I had to do the following:

      yum install xcb-util-renderutil-devel
      

      And then:

      cd qt-everywhere-src-5.15.2
      rm config.cache
      ./configure -prefix $PWD/qtbase -opensource -nomake examples -nomake tests -xcb
      

      This solved the problem in my case

      Pablo J. RoginaP 1 Reply Last reply
      2
      • Christian EhrlicherC Online
        Christian EhrlicherC Online
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #2

        As you can see there is no xcb plugin available so it can't be loaded. Make sure to compile qt with xcb support.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        2
        • N Offline
          N Offline
          na_inf
          wrote on last edited by
          #3

          Thanks for the quick reply.

          To make sure that xcb is supported, I ran configure with -xcb as follows:

          cd qt-everywhere-src-5.15.2
          ./configure -prefix $PWD/qtbase -opensource -xcb
          

          And I get the following:

          ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed.
          
          Check config.log for details.
          

          I looked inside config.log and I found the following:

          loaded result for library config.qtbase_gui.libraries.xcb
          Trying source 0 (type pkgConfig) of library xcb ...
          + /usr/bin/pkg-config --exists --silence-errors xcb '>=' 1.11
          + /usr/bin/pkg-config --modversion xcb '>=' 1.11
          > 1.13.1
          + /usr/bin/pkg-config --libs-only-L xcb '>=' 1.11
          + /usr/bin/pkg-config --libs-only-l xcb '>=' 1.11
          > -lxcb 
          + /usr/bin/pkg-config --cflags xcb '>=' 1.11
          + cd <dir>/qt-everywhere-src-5.15.2/config.tests/xcb && <dir>/qt-everywhere-src-5.15.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'QMAKE_USE += xcb' 'QMAKE_LIBS_XCB = -lxcb' <dir>/qt-everywhere-src-5.15.2/config.tests/xcb
          + cd <dir>/qt-everywhere-src-5.15.2/config.tests/xcb && MAKEFLAGS= /usr/bin/gmake
          > g++ -c -pipe -O2 -w -fPIC  -I. -I<dir>/qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-g++ -o main.o main.cpp
          > g++ -Wl,-O1 -o xcb main.o   -lxcb   
           => source accepted.
          test config.qtbase_gui.libraries.xcb succeeded
          
          
          loaded result for library config.qtbase_gui.libraries.xcb_icccm
          Trying source 0 (type pkgConfig) of library xcb_icccm ...
          + /usr/bin/pkg-config --exists --silence-errors xcb-icccm '>=' 0.3.9
          pkg-config did not find package.
            => source produced no result.
          Trying source 1 (type inline) of library xcb_icccm ...
          xcb/xcb_icccm.h not found in [] and global paths.
            => source produced no result.
          test config.qtbase_gui.libraries.xcb_icccm FAILED
          

          So it looks like xcb exists, but xcb_icccm does not.
          Is xcb_icccm required? I didn't find a way to install it.

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

            Hi,

            You need to install the development package corresponding to that library.

            For current Debian it's libxcb-icccm4-dev.

            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
            • N Offline
              N Offline
              na_inf
              wrote on last edited by
              #5

              It turns out that on CentOS 8 I had to do the following:

              yum install xcb-util-renderutil-devel
              

              And then:

              cd qt-everywhere-src-5.15.2
              rm config.cache
              ./configure -prefix $PWD/qtbase -opensource -nomake examples -nomake tests -xcb
              

              This solved the problem in my case

              Pablo J. RoginaP 1 Reply Last reply
              2
              • N na_inf

                It turns out that on CentOS 8 I had to do the following:

                yum install xcb-util-renderutil-devel
                

                And then:

                cd qt-everywhere-src-5.15.2
                rm config.cache
                ./configure -prefix $PWD/qtbase -opensource -nomake examples -nomake tests -xcb
                

                This solved the problem in my case

                Pablo J. RoginaP Offline
                Pablo J. RoginaP Offline
                Pablo J. Rogina
                wrote on last edited by
                #6

                @na_inf said in xcb issue again:

                This solved the problem in my case

                great, so please don't forget to mark your post as solved!

                Upvote the answer(s) that helped you solve the issue
                Use "Topic Tools" button to mark your post as Solved
                Add screenshots via postimage.org
                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                1
                • N Offline
                  N Offline
                  na_inf
                  wrote on last edited by
                  #7

                  For completeness, this is the list of all the xcb related packages that I have installed:

                  ]# sudo yum list --installed | grep xcb
                  libX11-xcb.x86_64                                  1.6.8-3.el8                                    @AppStream 
                  libxcb.x86_64                                      1.13.1-1.el8                                   @AppStream 
                  libxcb-devel.x86_64                                1.13.1-1.el8                                   @AppStream 
                  xcb-util.x86_64                                    0.4.0-10.el8                                   @AppStream 
                  xcb-util-cursor.x86_64                             0.1.3-9.el8                                    @epel      
                  xcb-util-devel.x86_64                              0.4.0-10.el8                                   @PowerTools
                  xcb-util-image.x86_64                              0.4.0-9.el8                                    @AppStream 
                  xcb-util-image-devel.x86_64                        0.4.0-9.el8                                    @PowerTools
                  xcb-util-keysyms.x86_64                            0.4.0-7.el8                                    @AppStream 
                  xcb-util-keysyms-devel.x86_64                      0.4.0-7.el8                                    @PowerTools
                  xcb-util-renderutil.x86_64                         0.3.9-10.el8                                   @AppStream 
                  xcb-util-renderutil-devel.x86_64                   0.3.9-10.el8                                   @PowerTools
                  xcb-util-wm.x86_64                                 0.4.1-12.el8                                   @AppStream 
                  xcb-util-wm-devel.x86_64                           0.4.1-12.el8                                   @PowerTools
                  

                  I'm not sure that all of them are required - YMMV.

                  1 Reply Last reply
                  1
                  • M Offline
                    M Offline
                    Mcgiwer
                    wrote on last edited by
                    #8

                    Even if it's an old topic, I wanted to add an alternative, (mostly ) working solution (typed in the console):

                    sudo xhost +si:localuser:$USER

                    In most cases it should make that you would be able to run the applications

                    SGaistS 1 Reply Last reply
                    0
                    • M Mcgiwer

                      Even if it's an old topic, I wanted to add an alternative, (mostly ) working solution (typed in the console):

                      sudo xhost +si:localuser:$USER

                      In most cases it should make that you would be able to run the applications

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

                      @Mcgiwer said in xcb issue again:

                      Even if it's an old topic, I wanted to add an alternative, (mostly ) working solution (typed in the console):

                      sudo xhost +si:localuser:$USER

                      In most cases it should make that you would be able to run the applications

                      Hi and welcome to devnet,

                      In this case, no. You are just modifying the access permissions to the X server. Here it's clearly a dependency issue.

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

                        for fix problem you should check this package installed
                        4c9b3b91-55a1-46fb-b476-e00140322614-image.png

                        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