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 6.4.1 build from source. Can't get xcb configured.
Forum Updated to NodeBB v4.3 + New Features

QT 6.4.1 build from source. Can't get xcb configured.

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

    Hi. On Ubuntu 22.04, in a QT 6.4.1 source directory, I run:

    configure -top-level -release -static -opensource -confirm-license -prefix <my prefix>

    config.summary shows:
    X11 specific:
    XLib ................................. yes
    XCB Xlib ............................. no
    EGL on X11 ........................... yes
    xkbcommon-x11 ........................ no
    xcb-sm ............................... no

    I have all the libraries specified in Qt 6.4 Qt for X11 Requirements installed.
    When I build an application, the result is a successful build, but upon running I get:

    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.

    I've seen lots of posts about this error but haven't found any that duplicate mine as in not being able to properly configure the plugin on Ubuntu 22.04 with QT 6.4.1

    FYI I don't have this problem with QT 6.3.2, it configures, builds and runs fine.

    Thanks in advance.

    Christian EhrlicherC 1 Reply Last reply
    0
    • G GuitGentlyWeeps

      Hi. On Ubuntu 22.04, in a QT 6.4.1 source directory, I run:

      configure -top-level -release -static -opensource -confirm-license -prefix <my prefix>

      config.summary shows:
      X11 specific:
      XLib ................................. yes
      XCB Xlib ............................. no
      EGL on X11 ........................... yes
      xkbcommon-x11 ........................ no
      xcb-sm ............................... no

      I have all the libraries specified in Qt 6.4 Qt for X11 Requirements installed.
      When I build an application, the result is a successful build, but upon running I get:

      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.

      I've seen lots of posts about this error but haven't found any that duplicate mine as in not being able to properly configure the plugin on Ubuntu 22.04 with QT 6.4.1

      FYI I don't have this problem with QT 6.3.2, it configures, builds and runs fine.

      Thanks in advance.

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @GuitGentlyWeeps said in QT 6.4.1 build from source. Can't get xcb configured.:

      I have all the libraries specified in Qt 6.4 Qt for X11 Requirements installed.

      No, at least not what configure output tells you:

      XCB Xlib ............................. no

      x11 & xcb has a lot of libraries - you for sure missed one development package. Take a look into the configure log files (config.log iirc) to see what's exactly missing.

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

      G 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        @GuitGentlyWeeps said in QT 6.4.1 build from source. Can't get xcb configured.:

        I have all the libraries specified in Qt 6.4 Qt for X11 Requirements installed.

        No, at least not what configure output tells you:

        XCB Xlib ............................. no

        x11 & xcb has a lot of libraries - you for sure missed one development package. Take a look into the configure log files (config.log iirc) to see what's exactly missing.

        G Offline
        G Offline
        GuitGentlyWeeps
        wrote on last edited by
        #3

        @Christian-Ehrlicher
        Thanks very much for your reply.
        There is no config.log. There is config.summary which I copied and pasted from.
        The line that you cited is a build option that is not enabled. The build options for xcb in configure are:

        -xcb-xlib............. Enable Xcb-Xlib support [auto]
        -xcb ............... Enable X11 support [auto] (Linux only)
        -bundled-xcb-xinput Use bundled XInput2 support [auto]

        All are set to auto and again, I've installed all libraries that the documentation asks for. I've even installed:
        apt-get install libx11-*
        apt-get install libx11*
        apt-get install libxcb-*
        apt-get install libxcb*
        apt-get install libxkbcommon-devsudo
        apt-get install libxkbcommon-x11-dev

        just to make sure that I had everything.
        There must be a secret library that I'm not aware of that needs to be installed. FYI on QT 6.3.2, that configures fine and the line in the summary that you cited shows:

        X11 specific:
        XLib ................................. yes
        XCB Xlib ............................. yes
        EGL on X11 ........................... yes
        xkbcommon-x11 ........................ yes
        xcb-sm ............................... yes

        Cheers.

        jsulmJ 1 Reply Last reply
        0
        • G GuitGentlyWeeps

          @Christian-Ehrlicher
          Thanks very much for your reply.
          There is no config.log. There is config.summary which I copied and pasted from.
          The line that you cited is a build option that is not enabled. The build options for xcb in configure are:

          -xcb-xlib............. Enable Xcb-Xlib support [auto]
          -xcb ............... Enable X11 support [auto] (Linux only)
          -bundled-xcb-xinput Use bundled XInput2 support [auto]

          All are set to auto and again, I've installed all libraries that the documentation asks for. I've even installed:
          apt-get install libx11-*
          apt-get install libx11*
          apt-get install libxcb-*
          apt-get install libxcb*
          apt-get install libxkbcommon-devsudo
          apt-get install libxkbcommon-x11-dev

          just to make sure that I had everything.
          There must be a secret library that I'm not aware of that needs to be installed. FYI on QT 6.3.2, that configures fine and the line in the summary that you cited shows:

          X11 specific:
          XLib ................................. yes
          XCB Xlib ............................. yes
          EGL on X11 ........................... yes
          xkbcommon-x11 ........................ yes
          xcb-sm ............................... yes

          Cheers.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @GuitGentlyWeeps said in QT 6.4.1 build from source. Can't get xcb configured.:

          There is no config.log

          It must be there.
          You can also pass -v parameter to configure to get more information.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GuitGentlyWeeps
            wrote on last edited by
            #5

            Thanks. I've configured a ton of iterations with the command line:
            ./configure -release -static -opensource -confirm-license -prefix ~/Qt/6.4.1/Build-Static

            I see no file named config.log.

            FYI if I pass a -v option as you've suggested, the result is as follows:

            ./configure -v -release -static -opensource -confirm-license -prefix ~/Qt/6.4.1/Build-Static

            • mkdir -p qtbase
            • cd qtbase
            • exec /home/myhome/Qt/6.4.1/Src/qtbase/configure -top-level -v -release -static -opensource -confirm-license -prefix /home/myhome/Qt/6.4.1/Build-Static
              CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:270 (message):
              Unknown command line option '-v'.
              Call Stack (most recent call first):
              qtbase/cmake/QtProcessConfigureArgs.cmake:655 (qtConfAddError)

            I feel like there is some disconnect here.

            Christian EhrlicherC 1 Reply Last reply
            0
            • G GuitGentlyWeeps

              Thanks. I've configured a ton of iterations with the command line:
              ./configure -release -static -opensource -confirm-license -prefix ~/Qt/6.4.1/Build-Static

              I see no file named config.log.

              FYI if I pass a -v option as you've suggested, the result is as follows:

              ./configure -v -release -static -opensource -confirm-license -prefix ~/Qt/6.4.1/Build-Static

              • mkdir -p qtbase
              • cd qtbase
              • exec /home/myhome/Qt/6.4.1/Src/qtbase/configure -top-level -v -release -static -opensource -confirm-license -prefix /home/myhome/Qt/6.4.1/Build-Static
                CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:270 (message):
                Unknown command line option '-v'.
                Call Stack (most recent call first):
                qtbase/cmake/QtProcessConfigureArgs.cmake:655 (qtConfAddError)

              I feel like there is some disconnect here.

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              The must be a CMakeError.log and CMakeOutput.log somewhere in your build folder

              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
              0
              • G Offline
                G Offline
                GuitGentlyWeeps
                wrote on last edited by
                #7

                Yeah, the error is printed. The cmake file cited in the error printout is merely:

                function(qtConfAddError)
                message(FATAL_ERROR ${ARGV})
                endfunction()

                And the error it's flagging is what it printed, there is no -v option in the configure script. A run of configure -h will show you that. So the actual problem still remains. I don't want to get off track but can you do a static build of QT 6.4.1 AND run it without the error xcb error?

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  GuitGentlyWeeps
                  wrote on last edited by
                  #8

                  I am concluding that with the instructions given by QT, it is not possible to statically build and deploy a QT application from QT 6.4.1 on Ubuntu 22.04.

                  1 Reply Last reply
                  0
                  • veryqtpersonV Offline
                    veryqtpersonV Offline
                    veryqtperson
                    wrote on last edited by veryqtperson
                    #9

                    Don't know about QuickTime Player, but it is certainly possible to build static Qt on Ubuntu 22.04 and successfully use it to build and run application without getting xcb plugin error.

                    In your case it seems that you just don't have all the required dependencies installed. I see you have a good number of those listed in your post, but still that list isn't compete, at the very least because it is lacking libglu1-mesa-dev, libxrender-dev and libxi-dev. Just in case, here's an installation command that should cover everything required:

                    $ sudo apt install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
                    

                    It might be that there is a bug exactly in Qt 6.4.1, which would also explain why you didn't get this problem with Qt 6.3.2, as you said. I can only state that I've built static Qt 6.5.1 on Ubuntu 22.04 (and also on Arch-based SteamOS 3.4.6) just yesterday, and my Qt-based applications launch just fine.

                    C C 2 Replies Last reply
                    0
                    • veryqtpersonV veryqtperson

                      Don't know about QuickTime Player, but it is certainly possible to build static Qt on Ubuntu 22.04 and successfully use it to build and run application without getting xcb plugin error.

                      In your case it seems that you just don't have all the required dependencies installed. I see you have a good number of those listed in your post, but still that list isn't compete, at the very least because it is lacking libglu1-mesa-dev, libxrender-dev and libxi-dev. Just in case, here's an installation command that should cover everything required:

                      $ sudo apt install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
                      

                      It might be that there is a bug exactly in Qt 6.4.1, which would also explain why you didn't get this problem with Qt 6.3.2, as you said. I can only state that I've built static Qt 6.5.1 on Ubuntu 22.04 (and also on Arch-based SteamOS 3.4.6) just yesterday, and my Qt-based applications launch just fine.

                      C Offline
                      C Offline
                      Colins2
                      wrote on last edited by
                      #10

                      @veryqtperson said in QT 6.4.1 build from source. Can't get xcb configured.:

                      sudo apt install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev

                      Thanks for that solution, it solved my problem.
                      I had exactly the same error message as the OP - not exactly very helpful.
                      I have experienced this before with other versions but generally deleteng all the Qt folders and config files and then re-installing has worked but not this time!

                      What I don't understand is that I had 6.4.3 running perfectly and I could compile and run Qt apps, console apps and QtQuick apps and then after the upgrade Qt suddenly wouldn't run any graphical programs. Console apps were fine.
                      The first attempt at upgrading, I just told the maintenance tool to delete 6.4.3 and install 6.5.1 so why did those libraries disappear?

                      Very happy that it is all working again now and I will save that command in case I need it next time!

                      1 Reply Last reply
                      0
                      • veryqtpersonV veryqtperson

                        Don't know about QuickTime Player, but it is certainly possible to build static Qt on Ubuntu 22.04 and successfully use it to build and run application without getting xcb plugin error.

                        In your case it seems that you just don't have all the required dependencies installed. I see you have a good number of those listed in your post, but still that list isn't compete, at the very least because it is lacking libglu1-mesa-dev, libxrender-dev and libxi-dev. Just in case, here's an installation command that should cover everything required:

                        $ sudo apt install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
                        

                        It might be that there is a bug exactly in Qt 6.4.1, which would also explain why you didn't get this problem with Qt 6.3.2, as you said. I can only state that I've built static Qt 6.5.1 on Ubuntu 22.04 (and also on Arch-based SteamOS 3.4.6) just yesterday, and my Qt-based applications launch just fine.

                        C Offline
                        C Offline
                        ctismer
                        wrote on last edited by
                        #11

                        @veryqtperson I am also very thankful for this hint. It worked perfectly on Qt 6.7.0 as well.
                        I was pretty desperate because I'm not used to this problem as a MacOS developer, but had to setup Ubuntu because some PySide6 feature shows a bug on Ubuntu. Now I can debug GUI code on Ubuntu as well.

                        Very happy like @Colins2 :D

                        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