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

Build on Linux: -qt-xcb option?

Scheduled Pinned Locked Moved Unsolved General and Desktop
25 Posts 13 Posters 22.8k Views 1 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.
  • L Offline
    L Offline
    ludek.vodicka
    wrote on 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 last edited by
      #17

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

      jsulmJ 1 Reply Last reply
      0
      • J Jawsh

        @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 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
        1
        • jsulmJ jsulm

          @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 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 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 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 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
                0
                • N nikhil-sethi

                  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 Offline
                  J Offline
                  jrb1
                  wrote on last edited by
                  #23

                  In case this might help someone, there appears to be a bug in configure with respect to the iccc such that with Qt-5.12.6 on RHEL7, despite having it installed the config log says:

                  loaded result for library config.qtbase_gui.libraries.xcb_icccm
                  Trying source 0 (type pkgConfig) of library xcb_icccm ...
                  + /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
                  

                  I'm very sure I have that package installed (RHEL7's latest which is 0.27.1) which should have passed that version check, if I run that command myself I see it should have found it:

                  bash-4.2$ /bin/pkg-config --exists --silence-errors xcb-icccm '>=' 0.3.9
                  bash-4.2$ echo $?
                  0
                  

                  Now pick a version I know I don't have to check pkg-config is working:

                  bash-4.2$ /bin/pkg-config --exists --silence-errors xcb-icccm '>=' 0.28.9
                  bash-4.2$ echo $?
                  1
                  bash-4.2$ /bin/pkg-config --version xcb-icccm
                  0.27.1
                  bash-4.2$ /bin/pkg-config --libs xcb-icccm
                  -lxcb-icccm -lxcb 
                  

                  echoing $? gives you the result of the last command, 0 is "success" on unix-like OSes, non-zero is fail. Something odd is happening in that test.

                  If you were looking to install this library on RHEL7 the package name you need is xcb-util-wm-devel. Unfortunately that doesn't help in this case.

                  1 Reply Last reply
                  1
                  • M Offline
                    M Offline
                    mschilling
                    wrote on last edited by mschilling
                    #24

                    @jrb1 Using the latest version of RHEL7, I had this issue and found that I had to install xcb-util-wm-devel before installing other xcb* libraries. I tested this by removing xcb-util-wm-devel and xcb-util-wm then re-installing just xcb-util-wm-devel and re-configuring. There seems to be a bug in RHEL7 with the way this it is packaged.

                    Thank you for your post, you helped me fix my issue, along with @SeanMurphy_6 and @ludek-vodicka posts.

                    1 Reply Last reply
                    0
                    • JonathonMJ Offline
                      JonathonMJ Offline
                      JonathonM
                      wrote on last edited by
                      #25

                      This thread helped me immensely. I found on my CentOS 7 system, I also had to install libxkbcommon-x11-devel.
                      Hope this helps someone.

                      1 Reply Last reply
                      0
                      • H hmserenade referenced this topic on
                      • A al072072 referenced this topic on

                      • Login

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