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

Qt crosscompile for buildroot Raspberry Pi



  • Hi

    I am trying to cross compile Qt everywhere against buildroot Raspberry Pi I have stored in sysroot. After I run ./configure I get this error:
    ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.

    I can compile against full image (rootfs) of Raspberry Pi with no problem!

    What am I missing?

    kind regards Thomas


  • Lifetime Qt Champion

    @Tomaz Please check the config.log file to get more information. You will see the actual compiler or linker error there.



  • HI

    Ok. I fixed the broken sym links and made rsync to whole sysroot. No I got:

    Running configuration tests...

    • /home/tomaz/RaspberryPiEGLFS/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -dumpmachine

    arm-linux-gnueabihf
    Checking for valid makespec...

    • cd /home/tomaz/RaspberryPiEGLFS/qt-everywhere-src-5.12.5/config.tests/verifyspec && /home/tomaz/RaspberryPiEGLFS/qt-everywhere-src-5.12.5/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/tomaz/RaspberryPiEGLFS/sysroot" "QMAKE_CXXFLAGS += --sysroot=/home/tomaz/RaspberryPiEGLFS/sysroot" "QMAKE_LFLAGS += --sysroot=/home/tomaz/RaspberryPiEGLFS/sysroot" -early "CONFIG += cross_compile" /home/tomaz/RaspberryPiEGLFS/qt-everywhere-src-5.12.5/qtbase/config.tests/verifyspec
    • cd /home/tomaz/RaspberryPiEGLFS/qt-everywhere-src-5.12.5/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make clean && MAKEFLAGS= /usr/bin/make

    rm -f verifyspec.o
    rm -f *~ core *.core
    /home/tomaz/RaspberryPiEGLFS/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tomaz/RaspberryPiEGLFS/sysroot -O2 -std=gnu++11 -w -fPIC -I/home/tomaz/RaspberryPiEGLFS/qt-everywhere-src-5.12.5/qtbase/config.tests/verifyspec -I. -I/home/tomaz/RaspberryPiEGLFS/qt-everywhere-src-5.12.5/qtbase/mkspecs/devices/linux-rasp-pi-g++ -o verifyspec.o /home/tomaz/RaspberryPiEGLFS/qt-everywhere-src-5.12.5/qtbase/config.tests/verifyspec/verifyspec.cpp
    /home/tomaz/RaspberryPiEGLFS/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/tomaz/RaspberryPiEGLFS/sysroot -Wl,-O1 -Wl,-rpath-link,/home/tomaz/RaspberryPiEGLFS/sysroot/opt/vc/lib -Wl,-rpath-link,/home/tomaz/RaspberryPiEGLFS/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/tomaz/RaspberryPiEGLFS/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o
    /home/tomaz/RaspberryPiEGLFS/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:68: verifyspec] Error 1
    Note: Also available for Linux: linux-clang linux-icc

    ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.

    Thomas


Log in to reply