Cross-compile QT5 For RPi - Error : Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
-
Hi, I am following [https://wiki.qt.io/Raspberry_Pi_Beginners_Guide] for cross-compile Qt5 for Raspberry Pi.
Completed all the steps till fixing symlinks. While trying to run ./configure script, getting following error.
~/opt/qt5/qtbase$ ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
<srcbase> = /home/arun/opt/qt5/qtbase
<bldbase> = /home/arun/opt/qt5/qtbase
<outbase> = /home/arun/opt/qt5/qtbase
Creating qmake...
.Done.This is the Qt Open Source Edition.
You have already accepted the terms of the Open Source license.
Running configuration tests...
Checking for valid makespec... Note: Also available for Linux: linux-clang linux-iccERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
Check config.log for details.
And config.log file is given below;
Command line: -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPI$
loaded result for config test config.qtbase.tests.machineTuple- /home/makersource/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -dum$
arm-linux-gnueabihf
test config.qtbase.tests.machineTuple succeeded
executing config test verifyspec- cd /home/makersource/opt/qt5/qtbase/config.tests/verifyspec && /home/makersource/opt/qt5/q$
- cd /home/makersource/opt/qt5/qtbase/config.tests/verifyspec && MAKEFLAGS= /usr/bin/$
rm -f verifyspec.o
rm -f *~ core *.core
/home/makersource/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -$
arm-linux-gnueabihf-g++: error: unrecognized command line option ‘-std=gnu++$
Makefile:181: recipe for target 'verifyspec.o' failed
make: *** [verifyspec.o] Error 1 -
@MakerSource said in Cross-compile QT5 For RPi - Error : Cannot compile a minimal program. The toolchain or QMakeSpec is broken.:
/opt/gcc-4.7-linaro-rpi-gnueabihf
You should try with 4.9
-
@jsulm Thank you very much.Let me try...
3/3