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

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



  • Hello Everyone, i am trying to configure the qt code for RPi.
    I am getting the following message:

    /home/bot1/tmp/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/bot1/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/bot1/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/bot1/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/bot1/raspi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o
    /home/bot1/tmp/raspi/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 crt1.o: No such file or directory
    /home/bot1/tmp/raspi/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 crti.o: No such file or directory
    /home/bot1/tmp/raspi/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
    Makefile:68: recipe for target 'verifyspec' failed
    make: *** [verifyspec] Error 1
    Note: Also available for Linux: linux-clang linux-icc

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

    I suppose its an issue with the crt*.o files and a relative path.

    Thank you!



  • I think that the main problem lays in the "ld" file, which does not incorporate crt1,crti and also -lm



  • It is worth mentioning that i am using this command to configure the project:

    ../qt-5.12.3-src/configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/home/bot1/tmp/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr -extprefix ~/raspi/sysroot/usr -hostprefix ~/raspi/qt5 -v -no-use-gold-linker -webengine-embedded-build -webengine-pepper-plugins -webengine-printing-and-pdf -webengine-proprietary-codecs -webengine-spellchecker -qt-sqlite -feature-webengine-embedded-build -feature-webengine-printing-and-pdf -skip qtscript -webengine-webrtc
    

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    I would try to get a more recent version of your cross-compiler. Gcc 4.8.3 is a bit outdated.


Log in to reply