Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Cross compile Qt with -xcb failed



  • 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?


  • Lifetime Qt Champion

    @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?


  • Moderators

    @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"



  • @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.



  • @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.


  • Lifetime Qt Champion

    @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.


  • Moderators

    @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?)



  • @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.



  • @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?


  • Moderators

    @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?



  • @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.



  • @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.
    
    

  • Moderators

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



  • @raven-worx
    Yes, I did.



  • @Hupe

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


  • Moderators

    @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



  • @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



  • 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?


  • Moderators

    @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.



  • 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



  • 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.


  • Moderators

    @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.



  • @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


  • Moderators

    @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)!



  • 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



  • 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?



  • 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?


  • Moderators

    @Hupe
    i also encountered the last error in transport_security_state_generator

    You can replace the incorrect armhf lib dir with something like that:

    sed -i -e 's/-L/usr/lib/arm-linux-gnueabihf//g' <BUILD-DIR>/qtwebengine/src/core/release/host/obj/net/tools/transport_security_state_generator/transport_security_state_generator.ninja

    Note that the ninja file is generated during build time.
    After replacing simply switch in your build directory and call make to continue the build.


Log in to reply