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. Cross compile Qt with -xcb failed

Cross compile Qt with -xcb failed

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
28 Posts 3 Posters 13.0k 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.
  • HupeH Hupe

    I use arm-linux-gnueabihf- to cross-compile QT 5.15.2 for rk3288, since I run the executable file failed with not found "xcb"
    , I add -xcb during the configuration. Then it failed with the following logs:

    Trying source 0 (type pkgConfig) of library xcb ...
    pkg-config use disabled globally.
      => source produced no result.
    Trying source 1 (type inline) of library xcb ...
    + cd /home/matinal/workstation/Qt/qt-everywhere-src-5.15.2/config.tests/xcb && /home/matinal/workstation/Qt/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" -early "CONFIG += cross_compile" 'QMAKE_USE += xcb' 'QMAKE_LIBS_XCB = -lxcb' /home/matinal/workstation/Qt/qt-everywhere-src-5.15.2/config.tests/xcb
    + cd /home/matinal/workstation/Qt/qt-everywhere-src-5.15.2/config.tests/xcb && MAKEFLAGS= /usr/bin/make
    > arm-linux-gnueabihf-g++ -c -pipe -O2 -w -fPIC  -I. -I/home/matinal/workstation/Qt/qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-arm-gnueabihf-g++ -o main.o main.cpp
    > arm-linux-gnueabihf-g++ -Wl,-O1 -o xcb main.o   -lxcb
    > /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lxcb
    > collect2: error: ld returned 1 exit status
    > make: *** [Makefile:67: xcb] Error 1
     => source failed verification.
    
    
    
    ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed.
    
    ERROR: Feature 'xcb-xlib' was enabled, but the pre-condition 'features.xlib && libs.xcb_xlib' failed.
    

    It seems that I need to install some extra packages but I don't know which ones are. Does anyone has solved the same problem?

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

    @Hupe said in Cross compile Qt with -xcb failed:

    cannot find -lxcb

    You do not have libxcb in your sysroot. What did you see when you called configure?

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

    HupeH 1 Reply Last reply
    1
    • HupeH Hupe

      I use arm-linux-gnueabihf- to cross-compile QT 5.15.2 for rk3288, since I run the executable file failed with not found "xcb"
      , I add -xcb during the configuration. Then it failed with the following logs:

      Trying source 0 (type pkgConfig) of library xcb ...
      pkg-config use disabled globally.
        => source produced no result.
      Trying source 1 (type inline) of library xcb ...
      + cd /home/matinal/workstation/Qt/qt-everywhere-src-5.15.2/config.tests/xcb && /home/matinal/workstation/Qt/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" -early "CONFIG += cross_compile" 'QMAKE_USE += xcb' 'QMAKE_LIBS_XCB = -lxcb' /home/matinal/workstation/Qt/qt-everywhere-src-5.15.2/config.tests/xcb
      + cd /home/matinal/workstation/Qt/qt-everywhere-src-5.15.2/config.tests/xcb && MAKEFLAGS= /usr/bin/make
      > arm-linux-gnueabihf-g++ -c -pipe -O2 -w -fPIC  -I. -I/home/matinal/workstation/Qt/qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-arm-gnueabihf-g++ -o main.o main.cpp
      > arm-linux-gnueabihf-g++ -Wl,-O1 -o xcb main.o   -lxcb
      > /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lxcb
      > collect2: error: ld returned 1 exit status
      > make: *** [Makefile:67: xcb] Error 1
       => source failed verification.
      
      
      
      ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed.
      
      ERROR: Feature 'xcb-xlib' was enabled, but the pre-condition 'features.xlib && libs.xcb_xlib' failed.
      

      It seems that I need to install some extra packages but I don't know which ones are. Does anyone has solved the same problem?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #3

      @Hupe
      first of all see this:
      https://doc.qt.io/qt-5/linux-requirements.html

      Also Qt creates a small test application and tries to compile it in order to check if all libs are present.
      This for example is for the "tests.xcb_syslibs":
      https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/configure.json?h=5.15.2#n1057

      So you need to have the following libs installed:

      "use": "xcb_icccm xcb_util xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xcb"

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      HupeH 1 Reply Last reply
      3
      • jsulmJ jsulm

        @Hupe said in Cross compile Qt with -xcb failed:

        cannot find -lxcb

        You do not have libxcb in your sysroot. What did you see when you called configure?

        HupeH Offline
        HupeH Offline
        Hupe
        wrote on last edited by
        #4

        @jsulm
        The above log is part of the configure log. The overall log during the configuration is too long to paste. I cut the log that contains "xcb".
        I have installed

        libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev  libxkbcommon-dev libxkbcommon-x11-dev libxcb-xinerama0-dev
        

        as https://doc.qt.io/qt-5/linux-requirements.html shows in my host machine.

        1 Reply Last reply
        0
        • raven-worxR raven-worx

          @Hupe
          first of all see this:
          https://doc.qt.io/qt-5/linux-requirements.html

          Also Qt creates a small test application and tries to compile it in order to check if all libs are present.
          This for example is for the "tests.xcb_syslibs":
          https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/configure.json?h=5.15.2#n1057

          So you need to have the following libs installed:

          "use": "xcb_icccm xcb_util xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xcb"

          HupeH Offline
          HupeH Offline
          Hupe
          wrote on last edited by
          #5

          @raven-worx said in Cross compile Qt with -xcb failed:

          icccm

          I have installed

          libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev  libxkbcommon-dev libxkbcommon-x11-dev libxcb-xinerama0-dev
          

          in my host machine before configuration. But it still reports errors as above shows.

          jsulmJ 1 Reply Last reply
          0
          • HupeH Hupe

            @raven-worx said in Cross compile Qt with -xcb failed:

            icccm

            I have installed

            libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev  libxkbcommon-dev libxkbcommon-x11-dev libxcb-xinerama0-dev
            

            in my host machine before configuration. But it still reports errors as above shows.

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

            @Hupe said in Cross compile Qt with -xcb failed:

            in my host machine before configuration

            It does not matter at all what you install on your host machine. As you are cross compiling you need the lib in your sysroot.

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

            raven-worxR HupeH 2 Replies Last reply
            1
            • jsulmJ jsulm

              @Hupe said in Cross compile Qt with -xcb failed:

              in my host machine before configuration

              It does not matter at all what you install on your host machine. As you are cross compiling you need the lib in your sysroot.

              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by raven-worx
              #7

              @jsulm said in Cross compile Qt with -xcb failed:

              It does not matter at all what you install on your host machine. As you are cross compiling you need the lib in your sysroot.

              a sysroot is not necessarily needed, since the "arm-linux-gnueabihf-g++" compiler selects the libraries automatically from the armhf lib paths.

              @Hupe said in Cross compile Qt with -xcb failed:

              I have installed
              libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb-xinerama0-dev

              its mandatory that you install the armhf packages.
              This means you need to install it like this:

              libfontconfig1-dev:armhf libfreetype6-dev:armhf ...

              Is this the case?
              The way you listed the packages would install the host variants of the packages (probably amd64?)

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              HupeH 1 Reply Last reply
              2
              • jsulmJ jsulm

                @Hupe said in Cross compile Qt with -xcb failed:

                in my host machine before configuration

                It does not matter at all what you install on your host machine. As you are cross compiling you need the lib in your sysroot.

                HupeH Offline
                HupeH Offline
                Hupe
                wrote on last edited by
                #8

                @jsulm

                I have installed these packages in my rootfs and selected it as my sysroot. But compile with qt still failed with the same error.

                1 Reply Last reply
                0
                • raven-worxR raven-worx

                  @jsulm said in Cross compile Qt with -xcb failed:

                  It does not matter at all what you install on your host machine. As you are cross compiling you need the lib in your sysroot.

                  a sysroot is not necessarily needed, since the "arm-linux-gnueabihf-g++" compiler selects the libraries automatically from the armhf lib paths.

                  @Hupe said in Cross compile Qt with -xcb failed:

                  I have installed
                  libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb-xinerama0-dev

                  its mandatory that you install the armhf packages.
                  This means you need to install it like this:

                  libfontconfig1-dev:armhf libfreetype6-dev:armhf ...

                  Is this the case?
                  The way you listed the packages would install the host variants of the packages (probably amd64?)

                  HupeH Offline
                  HupeH Offline
                  Hupe
                  wrote on last edited by
                  #9

                  @raven-worx

                  It seems that my repository doesn't have a version of armhf. Do you know which repository could install armhf version on the X86 host machine?

                  raven-worxR 1 Reply Last reply
                  0
                  • HupeH Hupe

                    @raven-worx

                    It seems that my repository doesn't have a version of armhf. Do you know which repository could install armhf version on the X86 host machine?

                    raven-worxR Offline
                    raven-worxR Offline
                    raven-worx
                    Moderators
                    wrote on last edited by
                    #10

                    @Hupe
                    what is your host system? Ubuntu/Debian?
                    see https://wiki.debian.org/Multiarch/HOWTO

                    i personally prefer building Qt in a docker image. This way you have a (reusable) closed environment with all you need without messing with your host environment.

                    For a debian based image the following should be enough:

                    dpkg --add-architecture armhf
                    apt update
                    apt -y install mypackage-dev:armhf ....
                    apt clean
                    

                    What is the target OS on the device?

                    --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                    If you have a question please use the forum so others can benefit from the solution in the future

                    HupeH 2 Replies Last reply
                    0
                    • raven-worxR raven-worx

                      @Hupe
                      what is your host system? Ubuntu/Debian?
                      see https://wiki.debian.org/Multiarch/HOWTO

                      i personally prefer building Qt in a docker image. This way you have a (reusable) closed environment with all you need without messing with your host environment.

                      For a debian based image the following should be enough:

                      dpkg --add-architecture armhf
                      apt update
                      apt -y install mypackage-dev:armhf ....
                      apt clean
                      

                      What is the target OS on the device?

                      HupeH Offline
                      HupeH Offline
                      Hupe
                      wrote on last edited by
                      #11

                      @raven-worx
                      I tried to install the development kits as you said, But apt returned an error to install these armhf packages. My host machine runs an Ubuntu 20.04. Now I am trying to start a Debian container to do this.

                      1 Reply Last reply
                      0
                      • raven-worxR raven-worx

                        @Hupe
                        what is your host system? Ubuntu/Debian?
                        see https://wiki.debian.org/Multiarch/HOWTO

                        i personally prefer building Qt in a docker image. This way you have a (reusable) closed environment with all you need without messing with your host environment.

                        For a debian based image the following should be enough:

                        dpkg --add-architecture armhf
                        apt update
                        apt -y install mypackage-dev:armhf ....
                        apt clean
                        

                        What is the target OS on the device?

                        HupeH Offline
                        HupeH Offline
                        Hupe
                        wrote on last edited by
                        #12

                        @raven-worx

                        I can't install these armhf packages even in debian or ubuntu container. It returned with error:

                        E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.38 80]
                        E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.142 80]
                        E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.142 80]
                        E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.142 80]
                        E: Some index files failed to download. They have been ignored, or old ones used instead.
                        
                        
                        raven-worxR 1 Reply Last reply
                        0
                        • HupeH Hupe

                          @raven-worx

                          I can't install these armhf packages even in debian or ubuntu container. It returned with error:

                          E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.38 80]
                          E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.142 80]
                          E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.142 80]
                          E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.142 80]
                          E: Some index files failed to download. They have been ignored, or old ones used instead.
                          
                          
                          raven-worxR Offline
                          raven-worxR Offline
                          raven-worx
                          Moderators
                          wrote on last edited by raven-worx
                          #13

                          @Hupe
                          did you run apt update before you tried to install?

                          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                          If you have a question please use the forum so others can benefit from the solution in the future

                          HupeH 1 Reply Last reply
                          0
                          • raven-worxR raven-worx

                            @Hupe
                            did you run apt update before you tried to install?

                            HupeH Offline
                            HupeH Offline
                            Hupe
                            wrote on last edited by
                            #14

                            @raven-worx
                            Yes, I did.

                            HupeH 1 Reply Last reply
                            0
                            • HupeH Hupe

                              @raven-worx
                              Yes, I did.

                              HupeH Offline
                              HupeH Offline
                              Hupe
                              wrote on last edited by
                              #15

                              @Hupe

                              I will pay 300 doges if anyone could teach me how to cross-compile QT with xcb, opengl and webengine.

                              raven-worxR 1 Reply Last reply
                              0
                              • HupeH Hupe

                                @Hupe

                                I will pay 300 doges if anyone could teach me how to cross-compile QT with xcb, opengl and webengine.

                                raven-worxR Offline
                                raven-worxR Offline
                                raven-worx
                                Moderators
                                wrote on last edited by raven-worx
                                #16

                                @Hupe
                                the repo urls you posted with the errors contain "bionic" (Ubuntu 18.04), but yousaid you are running 20.04, so there is your issue i guess.

                                This is my (minimal) working "/etc/apt/sources.list" with armhf repos for Ubuntu 20.04:

                                deb [arch=amd64,i386] http://at.archive.ubuntu.com/ubuntu/ focal main restricted
                                deb [arch=armhf] http://ports.ubuntu.com/ focal main restricted
                                deb [arch=amd64,i386] http://at.archive.ubuntu.com/ubuntu/ focal-updates main restricted
                                deb [arch=armhf] http://ports.ubuntu.com/ focal-updates main restricted
                                deb [arch=amd64,i386] http://at.archive.ubuntu.com/ubuntu/ focal universe
                                deb [arch=amd64,i386] http://at.archive.ubuntu.com/ubuntu/ focal-updates universe
                                deb [arch=armhf] http://ports.ubuntu.com/ focal universe
                                deb [arch=armhf] http://ports.ubuntu.com/ focal-updates universe
                                deb [arch=amd64,i386] http://at.archive.ubuntu.com/ubuntu/ focal multiverse
                                deb [arch=amd64,i386] http://at.archive.ubuntu.com/ubuntu/ focal-updates multiverse
                                deb [arch=armhf] http://ports.ubuntu.com/ focal multiverse
                                deb [arch=armhf] http://ports.ubuntu.com/ focal-updates multiverse
                                deb [arch=amd64,i386] http://at.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
                                deb [arch=armhf] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse
                                deb [arch=amd64,i386] http://security.ubuntu.com/ubuntu focal-security main restricted
                                deb [arch=amd64,i386] http://security.ubuntu.com/ubuntu focal-security universe
                                deb [arch=amd64,i386] http://security.ubuntu.com/ubuntu focal-security multiverse
                                deb [arch=armhf] http://ports.ubuntu.com/ focal-security main restricted
                                deb [arch=armhf] http://ports.ubuntu.com/ focal-security universe
                                deb [arch=armhf] http://ports.ubuntu.com/ focal-security multiverse

                                backup your old sources.list, replace it with that one and run "apt update" again

                                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                                If you have a question please use the forum so others can benefit from the solution in the future

                                1 Reply Last reply
                                2
                                • HupeH Offline
                                  HupeH Offline
                                  Hupe
                                  wrote on last edited by Hupe
                                  #17

                                  @Hupe said in Cross compile Qt with -xcb failed:

                                  libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb-xinerama0-dev

                                  thanks,I have added armhf source with ubuntu-ports successful. I installed armhf dependencies listed in [https://wiki.qt.io/Building_Qt_5_from_Git](link URL) both in the host machine and target machine. Now the -lxcb can be found, But config still fail with error :

                                  Trying source 0 (type pkgConfig) of library xcb_xlib ...
                                  + PKG_CONFIG_SYSROOT_DIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary PKG_CONFIG_LIBDIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/share/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors x11-xcb
                                  + PKG_CONFIG_SYSROOT_DIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary PKG_CONFIG_LIBDIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/share/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --modversion x11-xcb
                                  > 1.6.9
                                  + PKG_CONFIG_SYSROOT_DIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary PKG_CONFIG_LIBDIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/share/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-L x11-xcb
                                  > -L/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/arm-linux-gnueabihf
                                  + PKG_CONFIG_SYSROOT_DIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary PKG_CONFIG_LIBDIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/share/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-l x11-xcb
                                  > -lX11-xcb -lX11 -lxcb
                                  + PKG_CONFIG_SYSROOT_DIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary PKG_CONFIG_LIBDIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/share/pkgconfig:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --cflags x11-xcb
                                  X11/Xlib-xcb.h not found in [] and global paths.
                                    => source produced no result.
                                  Trying source 1 (type inline) of library xcb_xlib ...
                                  X11/Xlib-xcb.h not found in [] and global paths.
                                    => source produced no result.
                                  
                                  

                                  I don't know which library is still missed, Could you please help me. orz

                                  1 Reply Last reply
                                  0
                                  • HupeH Offline
                                    HupeH Offline
                                    Hupe
                                    wrote on last edited by
                                    #18

                                    I could find X11/Xlib-xcb.h manually:

                                    :/usr/include# find ./ -name Xlib-xcb.h
                                    ./X11/Xlib-xcb.h
                                    

                                    And I found a lot of missing header files in config.log:

                                    matinal@matinal-host:~/workstation/Qt/qt-everywhere-src-5.15.2$ grep -rn "not found in \[\] and global paths" config.log 
                                    109:dbus/dbus.h not found in [] and global paths.
                                    173:libudev.h not found in [] and global paths.
                                    176:libudev.h not found in [] and global paths.
                                    391:unicode/utypes.h not found in [] and global paths.
                                    392:unicode/ucol.h not found in [] and global paths.
                                    393:unicode/ustring.h not found in [] and global paths.
                                    438:pcre2.h not found in [] and global paths.
                                    441:pcre2.h not found in [] and global paths.
                                    454:sys/slog2.h not found in [] and global paths.
                                    477:double-conversion/double-conversion.h not found in [] and global paths.
                                    506:openssl/ssl.h not found in [] and global paths.
                                    507:openssl/opensslv.h not found in [] and global paths.
                                    584:xcb/xcb_icccm.h not found in [] and global paths.
                                    587:xcb/xcb_icccm.h not found in [] and global paths.
                                    640:EGL/egl.h not found in [] and global paths.
                                    643:EGL/egl.h not found in [] and global paths.
                                    716:VG/openvg.h not found in [] and global paths.
                                    723:harfbuzz/hb.h not found in [] and global paths.
                                    734:jpeglib.h not found in [] and global paths.
                                    762:md4c.h not found in [] and global paths.
                                    767:tslib.h not found in [] and global paths.
                                    776:vulkan/vulkan.h not found in [] and global paths.
                                    799:X11/Xlib-xcb.h not found in [] and global paths.
                                    802:X11/Xlib-xcb.h not found in [] and global paths.
                                    815:xkbcommon/xkbcommon.h not found in [] and global paths.
                                    818:xkbcommon/xkbcommon.h not found in [] and global paths.
                                    829:cups/cups.h not found in [] and global paths.
                                    836:sqlcli.h not found in [] and global paths.
                                    837:sqlcli1.h not found in [] and global paths.
                                    844:ibase.h not found in [] and global paths.
                                    861:mysql.h not found in [] and global paths.
                                    868:mysql.h not found in [] and global paths.
                                    871:mysql.h not found in [] and global paths.
                                    878:oci.h not found in [] and global paths.
                                    887:sql.h not found in [] and global paths.
                                    888:sqlext.h not found in [] and global paths.
                                    902:libpq-fe.h not found in [] and global paths.
                                    907:sqlite.h not found in [] and global paths.
                                    959:jasper/jasper.h not found in [] and global paths.
                                    966:libmng.h not found in [] and global paths.
                                    973:tiffio.h not found in [] and global paths.
                                    980:webp/decode.h not found in [] and global paths.
                                    981:webp/encode.h not found in [] and global paths.
                                    982:webp/demux.h not found in [] and global paths.
                                    983:webp/mux.h not found in [] and global paths.
                                    1101:wayland-version.h not found in [] and global paths.
                                    1110:wayland-egl.h not found in [] and global paths.
                                    1113:wayland-egl.h not found in [] and global paths.
                                    1122:wayland-version.h not found in [] and global paths.
                                    1439:vpx/vpx_encoder.h not found in [] and global paths.
                                    1440:vpx/vp8cx.h not found in [] and global paths.
                                    1497:snappy.h not found in [] and global paths.
                                    1582:alsa/asoundlib.h not found in [] and global paths.
                                    

                                    I wonder is there any pre-config that should do for pkg-config?

                                    raven-worxR 2 Replies Last reply
                                    0
                                    • HupeH Hupe

                                      I could find X11/Xlib-xcb.h manually:

                                      :/usr/include# find ./ -name Xlib-xcb.h
                                      ./X11/Xlib-xcb.h
                                      

                                      And I found a lot of missing header files in config.log:

                                      matinal@matinal-host:~/workstation/Qt/qt-everywhere-src-5.15.2$ grep -rn "not found in \[\] and global paths" config.log 
                                      109:dbus/dbus.h not found in [] and global paths.
                                      173:libudev.h not found in [] and global paths.
                                      176:libudev.h not found in [] and global paths.
                                      391:unicode/utypes.h not found in [] and global paths.
                                      392:unicode/ucol.h not found in [] and global paths.
                                      393:unicode/ustring.h not found in [] and global paths.
                                      438:pcre2.h not found in [] and global paths.
                                      441:pcre2.h not found in [] and global paths.
                                      454:sys/slog2.h not found in [] and global paths.
                                      477:double-conversion/double-conversion.h not found in [] and global paths.
                                      506:openssl/ssl.h not found in [] and global paths.
                                      507:openssl/opensslv.h not found in [] and global paths.
                                      584:xcb/xcb_icccm.h not found in [] and global paths.
                                      587:xcb/xcb_icccm.h not found in [] and global paths.
                                      640:EGL/egl.h not found in [] and global paths.
                                      643:EGL/egl.h not found in [] and global paths.
                                      716:VG/openvg.h not found in [] and global paths.
                                      723:harfbuzz/hb.h not found in [] and global paths.
                                      734:jpeglib.h not found in [] and global paths.
                                      762:md4c.h not found in [] and global paths.
                                      767:tslib.h not found in [] and global paths.
                                      776:vulkan/vulkan.h not found in [] and global paths.
                                      799:X11/Xlib-xcb.h not found in [] and global paths.
                                      802:X11/Xlib-xcb.h not found in [] and global paths.
                                      815:xkbcommon/xkbcommon.h not found in [] and global paths.
                                      818:xkbcommon/xkbcommon.h not found in [] and global paths.
                                      829:cups/cups.h not found in [] and global paths.
                                      836:sqlcli.h not found in [] and global paths.
                                      837:sqlcli1.h not found in [] and global paths.
                                      844:ibase.h not found in [] and global paths.
                                      861:mysql.h not found in [] and global paths.
                                      868:mysql.h not found in [] and global paths.
                                      871:mysql.h not found in [] and global paths.
                                      878:oci.h not found in [] and global paths.
                                      887:sql.h not found in [] and global paths.
                                      888:sqlext.h not found in [] and global paths.
                                      902:libpq-fe.h not found in [] and global paths.
                                      907:sqlite.h not found in [] and global paths.
                                      959:jasper/jasper.h not found in [] and global paths.
                                      966:libmng.h not found in [] and global paths.
                                      973:tiffio.h not found in [] and global paths.
                                      980:webp/decode.h not found in [] and global paths.
                                      981:webp/encode.h not found in [] and global paths.
                                      982:webp/demux.h not found in [] and global paths.
                                      983:webp/mux.h not found in [] and global paths.
                                      1101:wayland-version.h not found in [] and global paths.
                                      1110:wayland-egl.h not found in [] and global paths.
                                      1113:wayland-egl.h not found in [] and global paths.
                                      1122:wayland-version.h not found in [] and global paths.
                                      1439:vpx/vpx_encoder.h not found in [] and global paths.
                                      1440:vpx/vp8cx.h not found in [] and global paths.
                                      1497:snappy.h not found in [] and global paths.
                                      1582:alsa/asoundlib.h not found in [] and global paths.
                                      

                                      I wonder is there any pre-config that should do for pkg-config?

                                      raven-worxR Offline
                                      raven-worxR Offline
                                      raven-worx
                                      Moderators
                                      wrote on last edited by
                                      #19

                                      @Hupe
                                      back to the start. please show your Qt configure line.

                                      PKG_CONFIG_SYSROOT_DIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary

                                      did you specify a sysroot? if so the libs should be contained in the sysroot, which they are not by simply installing it on your host system of course.

                                      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                                      If you have a question please use the forum so others can benefit from the solution in the future

                                      1 Reply Last reply
                                      0
                                      • HupeH Offline
                                        HupeH Offline
                                        Hupe
                                        wrote on last edited by
                                        #20

                                        This is my configure line now:

                                        
                                        #~/bin/bash
                                        ./configure \
                                                -v \
                                                -extprefix /opt/Qt5.15.2-armhf  \
                                                -hostprefix /opt/Qt5.15.2-armhf-host \
                                                -sysroot /home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary \
                                                -xplatform linux-arm-gnueabihf-g++ \
                                                -opensource \
                                                -confirm-license \
                                                -shared \
                                                -strip \
                                                -xcb-xlib \
                                                -xcb \
                                                -gui \
                                                -make libs \
                                                -make tools \
                                                -widgets \
                                                -nomake examples
                                        
                                        

                                        I have installed the pre-required libs in my sysroot and could find X11/Xlib-xcb.h

                                        1 Reply Last reply
                                        0
                                        • HupeH Offline
                                          HupeH Offline
                                          Hupe
                                          wrote on last edited by
                                          #21

                                          I don't know what that global in "not found in [] and global paths" mean. I checked the config.log and found that pkg-config finds the include directory correctly. The problem is that the global path seems to be null. Should I add the include path of sysroot to the environment of my host machine? I will try to set the environment both of my host machine and my target sysroot. Hope it will work.

                                          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