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 12.4k 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.
  • 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
                              • 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
                                #22

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

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

                                this is the host version (outside of your specified sysroot).

                                Do you really need a sysroot? Either use the sysroot to get your libs or the armhf ones installed on the host. But a mixture of both wont work.

                                --- 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
                                1
                                • raven-worxR raven-worx

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

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

                                  this is the host version (outside of your specified sysroot).

                                  Do you really need a sysroot? Either use the sysroot to get your libs or the armhf ones installed on the host. But a mixture of both wont work.

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

                                  @raven-worx
                                  I found these header files in my specified sysroot after running chroot. I use sysroot because compiling webengine needs pkg-config which requires sysroot.
                                  The problem I encountered now is that config-test can't search my sysroot as a default path automatically. That is, the "global paths" in "X11/Xlib-xcb.h not found in [] and global paths." seems not to include the PKG_CONFIG_SYSROOT_DIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary
                                  Besides, I added my sysroot include directory```
                                  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/include

                                  raven-worxR 1 Reply Last reply
                                  0
                                  • HupeH Hupe

                                    @raven-worx
                                    I found these header files in my specified sysroot after running chroot. I use sysroot because compiling webengine needs pkg-config which requires sysroot.
                                    The problem I encountered now is that config-test can't search my sysroot as a default path automatically. That is, the "global paths" in "X11/Xlib-xcb.h not found in [] and global paths." seems not to include the PKG_CONFIG_SYSROOT_DIR=/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary
                                    Besides, I added my sysroot include directory```
                                    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/include

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

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

                                    I found these header files in my specified sysroot after running chroot.

                                    i still dont get it.
                                    you chroot into your sysroot?! If so, this is wrong in so many ways...

                                    I use sysroot because compiling webengine needs pkg-config which requires sysroot.

                                    i cross-compiled Qt (incl. webengine) quite a few times now, and i never used a sysroot.

                                    Besides, I added my sysroot include directory```
                                    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary/usr/include

                                    LD_LIBRARY_PATH isnt used to specify include directories, but rather to find libs during runtime (by the runtime linker)!

                                    --- 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 Hupe
                                      #25

                                      Sorry for my broken English. I didn't chroot to my sysroot when building qt. I just chroot to my sysroot to find these missing header files.

                                      That is what I got if I configure without sysroot. The warinng shows that pkg-config is required to build QtWebEngine, and sysroot is required to pkg-config.

                                      Note: Also available for Linux: linux-clang linux-icc
                                      
                                      Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
                                      
                                      Note: The following modules are not being compiled in this configuration:
                                          3dcore
                                          3drender
                                          webenginecore
                                          webengine
                                          webenginewidgets
                                          pdf
                                          pdfwidgets
                                      
                                      WARNING: Cross compiling without sysroot. Disabling pkg-config
                                      
                                      WARNING: A pkg-config support is required to build QtWebEngine.
                                      
                                      WARNING: A pkg-config support is required to build QtPdf.
                                      
                                      WARNING: QtWebEngine will not be built.
                                      
                                      WARNING: QtPdf will not be built.
                                      
                                      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.
                                      
                                      ERROR: The OpenGL functionality tests failed!
                                      You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
                                      QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
                                      

                                      I exported both LD_LIBRARY_PATH and C_INCLUDE_PATH but they all didn't work

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

                                        I configure successfully after adding my sysroot include directory to the -I variable.

                                        Now there is only some warings:

                                        Note: Also available for Linux: linux-clang linux-icc
                                        
                                        Note: PKG_CONFIG_LIBDIR automatically set to /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
                                        
                                        Note: PKG_CONFIG_SYSROOT_DIR automatically set to /home/matinal/workstation/rk-source/rk3288-linux/linux/ubuntu/binary
                                        
                                        Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.
                                        
                                        Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
                                        
                                        WARNING: Thumb instruction set is required to build ffmpeg for QtWebEngine.
                                        
                                        WARNING: Building without node.js will disable some features of QtWebEngine DevTools.
                                        
                                        Qt is now configured for building. Just run 'make'.
                                        Once everything is built, you must run 'make install'.
                                        Qt will be installed into '/opt/Qt5.15.2-armhf'.
                                        
                                        Prior to reconfiguration, make sure you remove any leftovers from
                                        the previous build.
                                        
                                        

                                        I will try to find the solution of this warings. Thanks a lot! Do you have dogecoin address?

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

                                          I encountered error as follows:

                                          [8/8701] /usr/bin/g++ -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -Wl,--as-needed -m64 -Wl,-O2 -Wl,--gc-sections -pie -Wl,--disable-new-dtags -L/usr/lib/arm-linux-gnueabihf -o "host/transport_security_state_generator" -Wl,--start-group @"host/transport_security_state_generator.rsp"  -Wl,--end-group  -ldl -lpthread -lrt -lnss3 -lnssutil3 -lsmime3 -lplds4 -lplc4 -lnspr4
                                          FAILED: host/transport_security_state_generator 
                                          /usr/bin/g++ -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -Wl,--as-needed -m64 -Wl,-O2 -Wl,--gc-sections -pie -Wl,--disable-new-dtags -L/usr/lib/arm-linux-gnueabihf -o "host/transport_security_state_generator" -Wl,--start-group @"host/transport_security_state_generator.rsp"  -Wl,--end-group  -ldl -lpthread -lrt -lnss3 -lnssutil3 -lsmime3 -lplds4 -lplc4 -lnspr4
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libdl.so when searching for -ldl
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libdl.a when searching for -ldl
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libpthread.so when searching for -lpthread
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libpthread.a when searching for -lpthread
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/librt.so when searching for -lrt
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/librt.a when searching for -lrt
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libm.so when searching for -lm
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libm.a when searching for -lm
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libgcc_s.so.1 when searching for libgcc_s.so.1
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libc.so when searching for -lc
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libc.a when searching for -lc
                                          /usr/bin/ld: skipping incompatible /usr/lib/arm-linux-gnueabihf/libgcc_s.so.1 when searching for libgcc_s.so.1
                                          collect2: error: ld returned 1 exit status
                                          

                                          It's wired that /usr/bin/ld in my X86 host machine tried to search for the libraries in /usr/lib/arm-linux-gnueabihf/. It's there any other config that should do to select the proper ld tool or library path?

                                          raven-worxR 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