Raspberry Cross Compiler Setting Cannot run target compiler
-
./qt-everywhere-src-5.15.2/configure -opengl es2 -device linux-rasp-pi4-v3d-g++ -device-option CROSS_COMPILE=/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf- -sysroot /opt/qt5pi/sysroot -prefix /usr/local/qt5pi/ -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtdatavis3d -nomake examples -make libs -pkg-config -no-use-gold-linker -v
I got this error while configuring qt cross compilation. Any solution?
Project ERROR: Cannot run target compiler '/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf-g++'. Output:I got this error. Where should I look? Thank you in advance.
-
@IknowQT said in Raspberry Cross Compiler Setting Cannot run target compiler:
/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf-g++
What happens if you run it manually?
-
@IknowQT it looks like your CROSS_COMPILE value is not set properly.
In post #1 you said it was:
-device-option CROSS_COMPILE=/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf-
Then in post #3 from screenshot you used:
-device-option CROSS_COMPILE=/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/
Please take a look at this guide just in case.
It looks like your CROSS_COMPILE option should be (not tested!):-device-option CROSS_COMPILE=/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
You can test it manually by doing:
/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
and see you have some output from the compiler
BTW, please don't post screenshots just copy/paste/format the text ouput. It's easier for others to copy/use that data when replying...
-
This is the output when I run it manually
sudo /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
arm-linux-gnueabihf-g++: fatal error: no input files
compilation terminated.@jsulm
When running manually, the message content is 'There is no such file or directory.' -
@IknowQT said in Raspberry Cross Compiler Setting Cannot run target compiler:
arm-linux-gnueabihf-g++: fatal error: no input files
Great, so your option should be:
-device-option CROSS_COMPILE=/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
-
../qt-everywhere-src-5.15.2/configure -opengl es2 -device-option CROSS_COMPILE=/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /opt/qt5pi/sysroot -prefix /usr/local/qt5pi -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtdatavis3d -nomake examples -make libs -pkg-config -no-use-gold-linker -v
- cd qtbase
- /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/configure -top-level -opengl es2 -device-option CROSS_COMPILE=/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /opt/qt5pi/sysroot -prefix /usr/local/qt5pi -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtdatavis3d -nomake examples -make libs -pkg-config -no-use-gold-linker -v
Performing shadow build...
Preparing build tree...
Creating qmake...
make: 'first'을(를) 위해 할 일이 없습니다.
Command line: -opengl es2 -device-option CROSS_COMPILE=/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /opt/qt5pi/sysroot -prefix /usr/local/qt5pi -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtdatavis3d -nomake examples -make libs -pkg-config -no-use-gold-linker -v
Info: creating stash file /opt/qt5pi/qt5build/.qmake.stash
This is the Qt Open Source Edition.
You have already accepted the terms of the Open Source license.
Running configuration tests...
Checking for machine tuple...- /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -dumpmachine
arm-linux-gnueabihf
test config.qtbase.tests.machineTuple succeeded
Checking for valid makespec...- cd /opt/qt5pi/qt5build/config.tests/verifyspec && /opt/qt5pi/qt5build/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/opt/qt5pi/sysroot" "QMAKE_CXXFLAGS += --sysroot=/opt/qt5pi/sysroot" "QMAKE_LFLAGS += --sysroot=/opt/qt5pi/sysroot" -early "CONFIG += cross_compile" /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/verifyspec
- cd /opt/qt5pi/qt5build/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make
g++ -c -pipe --sysroot=/opt/qt5pi/sysroot -O2 -w -fPIC -I/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/verifyspec -I. -I/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-g++ -o verifyspec.o /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/verifyspec/verifyspec.cpp
g++ --sysroot=/opt/qt5pi/sysroot -Wl,-O1 -o verifyspec verifyspec.o
test config.qtbase.tests.verifyspec succeeded
Checking for target architecture...- cd /opt/qt5pi/qt5build/config.tests/arch && /opt/qt5pi/qt5build/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/opt/qt5pi/sysroot" "QMAKE_CXXFLAGS += --sysroot=/opt/qt5pi/sysroot" "QMAKE_LFLAGS += --sysroot=/opt/qt5pi/sysroot" -early "CONFIG += cross_compile" /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/arch
- cd /opt/qt5pi/qt5build/config.tests/arch && MAKEFLAGS= /usr/bin/make
g++ -c -pipe --sysroot=/opt/qt5pi/sysroot -O2 -w -fPIC -I/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/arch -I. -I/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-g++ -o arch.o /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/arch/arch.cpp
In file included from /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/arch/arch.cpp:43:
/opt/qt5pi/sysroot/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: 그런 파일이나 디렉터리가 없습니다
27 | #include <bits/libc-header-start.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:174: arch.o] 오류 1
Project ERROR: Could not determine target architecture. See config.log for details. -
../qt-everywhere-src-5.15.2/configure -opengl es2 -device linux-rasp-pi4-v3d-g++ -device-option CROSS_COMPILE=/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /opt/qt5pi/sysroot -prefix /usr/local/qt5pi -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtdatavis3d -nomake examples -make libs -pkg-config -no-use-gold-linker -v
ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
============================================================================================
/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -dumpmachine
arm-linux-gnueabihf
Checking for valid makespec...
cd /opt/qt5pi/qt5build/config.tests/verifyspec && /opt/qt5pi/qt5build/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/opt/qt5pi/sysroot" "QMAKE_CXXFLAGS += --sysroot=/opt/qt5pi/sysroot" "QMAKE_LFLAGS += --sysroot=/opt/qt5pi/sysroot" -early "CONFIG += cross_compile" /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/verifyspec
cd /opt/qt5pi/qt5build/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make clean && MAKEFLAGS= /usr/bin/make
rm -f verifyspec.o
rm -f *~ core *.core
/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a72 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/opt/qt5pi/sysroot -O2 -w -fPIC -I/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/verifyspec -I. -I/opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/mkspecs/devices/linux-rasp-pi4-v3d-g++ -o verifyspec.o /opt/qt5pi/qt-everywhere-src-5.15.2/qtbase/config.tests/verifyspec/verifyspec.cpp
/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/opt/qt5pi/sysroot -Wl,-O1 -Wl,-rpath-link,/opt/qt5pi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/opt/qt5pi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o
/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: 그런 파일이나 디렉터리가 없습니다
/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: 그런 파일이나 디렉터리가 없습니다
/opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
collect2: error: ld returned 1 exit status
make: *** [Makefile:68: verifyspec] 오류 1
Note: Also available for Linux: linux-clang linux-iccI got this error. What can I do?