Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Build on Linux: -qt-xcb option?
QtWS25 Last Chance

Build on Linux: -qt-xcb option?

Scheduled Pinned Locked Moved Unsolved General and Desktop
25 Posts 13 Posters 21.2k Views
  • 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.
  • B Offline
    B Offline
    Bob64
    wrote on 12 Jun 2020, 20:15 last edited by
    #3

    Hi

    Thanks for the hints. I took a closer look at the config.log. Earlier I had mainly looked at config.summary but I didn't really know what I was looking for. Anyway in the log, the only thing that fails that explicitly mentions xcb is the following:

    looking for library 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
    

    As I mentioned I wasn't sure I had all packages installed. Will the packages listed in the Qt docs for Debian have the same name in CentOS 7.4? Do I need to worry about what versions to install etc.? (Sorry I am a noob at this!)

    Going back to my original question, why doesn't configure recognise the -qt-xcb option for me - do I need to worry about that?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bob64
      wrote on 12 Jun 2020, 21:07 last edited by Bob64 6 Dec 2020, 21:11
      #4

      I have gone through the dependencies listed in the Qt doc and looked for equivalents on my system or available for installation. Most appear to be there if I ignore slight naming differences (no numbers in the CentOS package names). libxi-dev and libxkbcommon-x11-dev equivalents aren't installed but are available. However, I can't see libx11-xcb-dev or libxcb-glx0-dev.

      libfontconfig1-dev    fontconfig-devel.x86_64
      libfreetype6-dev      freetype-devel.x86_64
      libx11-dev            libX11-devel.x86_64
      libxext-dev           libXext-devel.x86_64
      libxfixes-dev         libXfixes-devel.x86_64
      libxi-dev             Not installed: libXi-devel.x86_64
      libxrender-dev        libXrender-devel.x86_64 
      libxcb1-dev           libxcb-devel.x86_64
      libx11-xcb-dev        ?
      libxcb-glx0-dev       ?
      libxkbcommon-x11-dev  Not installed: libxkbcommon-x11-devel.x86_64
      

      Note that this list is the one specified for when configuring with -qt-xcb which as I have mentioned does not work for me - gives error:

      ERROR: Invalid value given for boolean command line option 'xcb'.
      

      There are a bunch of other dependencies listed in the Qt doc for if one doesn't compile with this option. These are all of the form libxcb-<something>-dev. I can find plausible looking CentOS equivalents for <something> = keysmys1, image0, render-util0 but none of the others (including libxcb-icccm4-dev, which stands out because of the configure error relating to xcb-icccm that I mentioned earlier).

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 13 Jun 2020, 11:05 last edited by
        #5

        From a quick search, try with "libxcbutil-icccm".

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

        B 1 Reply Last reply 13 Jun 2020, 23:24
        0
        • S SGaist
          13 Jun 2020, 11:05

          From a quick search, try with "libxcbutil-icccm".

          B Offline
          B Offline
          Bob64
          wrote on 13 Jun 2020, 23:24 last edited by
          #6

          @SGaist Thanks. It wasn't showing up as a package available for download on my machine's package manager. I did do a quick web search and I found one match but for a different CentOS version and I don't know if it was an "official" source.

          In any case, I think that package should only be needed for the non -qt-xcb case. I would still like to understand what is going on there. Is that option no longer available in configure? Is the documentation now incorrect? Has it been replaced with a different setting?

          1 Reply Last reply
          0
          • C Online
            C Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 14 Jun 2020, 06:47 last edited by Christian Ehrlicher
            #7

            -qt-xcb was removed from configure (and also from the documentation for 5.15 but the official site did not pick up the lastest version yet - see https://codereview.qt-project.org/c/qt/qtdoc/+/300877/3/doc/src/platforms/linux.qdoc )

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

            S B 2 Replies Last reply 14 Jun 2020, 18:13
            2
            • C Christian Ehrlicher
              14 Jun 2020, 06:47

              -qt-xcb was removed from configure (and also from the documentation for 5.15 but the official site did not pick up the lastest version yet - see https://codereview.qt-project.org/c/qt/qtdoc/+/300877/3/doc/src/platforms/linux.qdoc )

              S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 14 Jun 2020, 18:13 last edited by
              #8

              @Christian-Ehrlicher said in Build on Linux: -qt-xcb option?:

              -qt-xcb was removed from configure (and also from the documentation for 5.15 but the official site did not pick up the lastest version yet - see https://codereview.qt-project.org/c/qt/qtdoc/+/300877/3/doc/src/platforms/linux.qdoc )

              Good catch, I forgot about that one.

              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
              • J Offline
                J Offline
                Joshua Fletcher
                wrote on 14 Jun 2020, 19:57 last edited by
                #9

                I'm seeing a similar problem on centOS 7.2, but I've previously installed earlier versions of Qt without a problem.
                For me, Qt 5.15.0 seems to be installing, but the X11Extras is not, and I need the X11Extras module to install successfully.

                looking at the logs of a successful and working Qt 5.12 installation, it mentioned iccm failures there, too, but that seemed to be inconsequential, since those installations worked for me.

                What stands out in my case is a complete absence of any reference to render or xrender in the logs for the 5.15.0 installation.

                When I tried "-bundled-xcb-xinput", my config.summary said this:
                "WARNING: Feature system-xcv-xinput is insignificant in this configuration, ignoring related command line option(s)."

                It didn't seem to make any difference.

                As an experiment, the original poster could try installing Qt 5.14.0, to compare. I was able to install that on CentOS 7.2.
                If that is successful, we might have the same problem, and comparing a successful 5.14 installation with a problematic 5.15 installation might help. We may both need the same solution.

                1 Reply Last reply
                0
                • C Online
                  C Online
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on 15 Jun 2020, 04:23 last edited by
                  #10

                  @Joshua-Fletcher said in Build on Linux: -qt-xcb option?:

                  We may both need the same solution.

                  The solution is to use xcb from the distribution since it no longer is shipped with Qt.

                  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
                  • C Christian Ehrlicher
                    14 Jun 2020, 06:47

                    -qt-xcb was removed from configure (and also from the documentation for 5.15 but the official site did not pick up the lastest version yet - see https://codereview.qt-project.org/c/qt/qtdoc/+/300877/3/doc/src/platforms/linux.qdoc )

                    B Offline
                    B Offline
                    Bob64
                    wrote on 15 Jun 2020, 08:50 last edited by
                    #11

                    @Christian-Ehrlicher Thank you! That is a big help as it eliminates one of the main things that was confusing me.

                    The problem is now reduced to resolving the list of dependencies. I can't believe that if icccm (for example) is so important that it is not available more easily so I am wondering if it gets bundled with another package on CentOS. I am going to have to ask for packages to be installed as I don't have privileges at the moment, which is why it would be useful to have a definitive list of what is needed on CentOS.

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      Joshua Fletcher
                      wrote on 16 Jun 2020, 21:02 last edited by
                      #12

                      I found that ensuring these packages were installed was sufficient for my purposes:
                      libxcb-devel
                      libxkbcommon-devel
                      xcb-util-devel
                      xcb-util-image-devel
                      xcb-util-keysyms-devel
                      xcb-util-renderutil-devel
                      xcb-util-wm-devel
                      mesa-libGL-devel

                      the only one I was actually missing was: xcb-util-renderutil-devel
                      but if you can, check and make sure all those are installed, and I think it should work for you.

                      1 Reply Last reply
                      1
                      • L Offline
                        L Offline
                        ludek.vodicka
                        wrote on 18 Jun 2020, 12:28 last edited by ludek.vodicka
                        #13

                        Hi, I just also trying to solve problems with -qt-xcb option.

                        I removed this switch and compiled the latest Qt 5.15.0. But my application didn't start with error:

                        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: linuxfb, minimal, offscreen, vnc.

                        Directory qt\plugis\platforms contains only

                        libqlinuxfb.so
                        libqminimal.so
                        libqoffscreen.so
                        libqvnc.so

                        Thanks for any help

                        1 Reply Last reply
                        0
                        • JoeCFDJ Offline
                          JoeCFDJ Offline
                          JoeCFD
                          wrote on 18 Jun 2020, 15:38 last edited by
                          #14

                          https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found

                          L 1 Reply Last reply 18 Jun 2020, 15:44
                          0
                          • JoeCFDJ JoeCFD
                            18 Jun 2020, 15:38

                            https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found

                            L Offline
                            L Offline
                            ludek.vodicka
                            wrote on 18 Jun 2020, 15:44 last edited by
                            #15

                            @JoeCFD Thanks for the reply. I already saw this topic but it is a slightly different problem.

                            I do not have a message:

                            Qt platform plugin "xcb" in "" even though it was found.
                            but only
                            Qt platform plugin "xcb" in ""

                            My issue is that I don't have file libqxcb.so in Qt/plugins/platform directory at all.

                            I tried to compile it with -qt-xcb like several times before, but because this switch was removed, I tried it without that. Also, I tried "-xcb" switch too.

                            But although I have "X11 specific: XCB Xlib...yes" message during configuration, libqxcb.so file isn't created.

                            1 Reply Last reply
                            0
                            • L Offline
                              L Offline
                              ludek.vodicka
                              wrote on 19 Jun 2020, 06:29 last edited by
                              #16

                              Seems that adding following switches forces Qt to build libxcb.so

                              -xcb -xcb-xlib -bundled-xcb-input

                              (it's necessary to add all these switches based on my observations)

                              1 Reply Last reply
                              2
                              • J Offline
                                J Offline
                                Jawsh
                                wrote on 24 Sept 2020, 15:40 last edited by
                                #17

                                @ludek-vodicka, where do you specify those options? They are not part of configure, correct?

                                jsulmJ 1 Reply Last reply 25 Sept 2020, 06:19
                                0
                                • J Jawsh
                                  24 Sept 2020, 15:40

                                  @ludek-vodicka, where do you specify those options? They are not part of configure, correct?

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on 25 Sept 2020, 06:19 last edited by
                                  #18

                                  @Jawsh said in Build on Linux: -qt-xcb option?:

                                  They are not part of configure

                                  They are. Call configure with -h parameter and you will see.

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

                                  J 1 Reply Last reply 9 Oct 2020, 15:42
                                  1
                                  • jsulmJ jsulm
                                    25 Sept 2020, 06:19

                                    @Jawsh said in Build on Linux: -qt-xcb option?:

                                    They are not part of configure

                                    They are. Call configure with -h parameter and you will see.

                                    J Offline
                                    J Offline
                                    Jawsh
                                    wrote on 9 Oct 2020, 15:42 last edited by
                                    #19

                                    Actually, if I remove bundled-xcb-input it works on configure. However, I have run into a new error: "ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed." Anyone have any ideas? I have installed as many of the prerequisite libs as I could find listed.

                                    1 Reply Last reply
                                    0
                                    • J Offline
                                      J Offline
                                      Jawsh
                                      wrote on 9 Oct 2020, 17:17 last edited by
                                      #20

                                      Found this on: https://github.com/RudolfCardinal/camcops/issues/3

                                      sudo apt-get build-dep qt5-default
                                      
                                      (having enabled "Source code" option in Software and Updates > Ubuntu Software)
                                      

                                      After I did this, deleted config.cache, and reran configure then it worked.

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        SeanMurphy_6
                                        wrote on 22 Nov 2021, 18:57 last edited by
                                        #21

                                        I had this exact same problem and I found that if I combined the installing the packages listed by Joshua Fletcher on 16 Jun 2020:

                                        • libxcb-devel
                                        • libxkbcommon-devel
                                        • xcb-util-devel
                                        • xcb-util-image-devel
                                        • xcb-util-keysyms-devel
                                        • xcb-util-renderutil-devel
                                        • xcb-util-wm-devel
                                        • mesa-libGL-devel

                                        And then running configure with the options suggested by Ludek Vodicka on 19 Jun 2020:

                                        • -xcb
                                        • -xcb-xlib
                                        • -bundled-xcb-xinput

                                        Built Qt and correctly built the libqxcb.so under the platforms plugin directory, and now my applications compiled against Qt 5.15.2 launch without any errors.

                                        1 Reply Last reply
                                        1
                                        • N Offline
                                          N Offline
                                          nikhil-sethi
                                          wrote on 8 Jan 2022, 14:36 last edited by
                                          #22

                                          Hey everyone. I was facing the same issue on Ubuntu 20.04. This thread and @SeanMurphy_6's solution (23rd Nov) helped me a lot. Thanks for that.
                                          Just wanted to add that it is important to use the 'dev' versions of the xcb libraries. In my case I had the latest 'xcb xinerama0' library installed but libqxcb.so still didn't compile. Fixed it by installing the dev version (libxcb-xinerama0-dev on Debian/Ubuntu). If all xcb libraries are installed correctly, you should

                                          1. See a 'yes' for each xcb library on the CLI when running the configure command:
                                          Checking XCB XINERAMA .... yes 
                                          
                                          1. See a 'succeeded' for tests in the config.log file:
                                          test config.qtbase_gui.libraries.xcb_xinerama succeeded
                                          

                                          When compiled you should see libqxcb.so in the qtbase/plugins/platforms directory
                                          The original software ran perfectly after ensuring this.

                                          J 1 Reply Last reply 31 Jul 2022, 07:35
                                          0

                                          • Login

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