Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile a minimal program. The toolchain or QMakeSpec is broken #14

Open
ghost opened this issue Apr 18, 2019 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Apr 18, 2019

I get this message when the script tries to build Qt5:

This is the Qt Open Source Edition.
You have already accepted the terms of the Open Source license.

Running configuration tests...
Checking for gold linker... yes
Checking for machine tuple... yes
Checking for valid makespec... Note: Also available for Linux: linux-clang linux-icc

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

Check config.log for details.

Here the config.log output:

Command line: -release -opengl es2 -device linux-rasp-pi-g++ -qpa eglfs -no-libinput -no-linuxfb -no-xcb -no-kms -no-gbm -no-gtk -no-widgets -no-compile-examples -no-sql-tds -device-option CROSS_COMPILE=/home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/arm-linux-gnueabihf- -sysroot /home/mark/opt/rpi-ramdisk/sysroot/sysroot -opensource -confirm-license -make libs -strip -optimize-size -prefix /opt/qt -extprefix /home/mark/opt/rpi-ramdisk/packages/qt/stage//opt/qt -hostprefix /home/mark/opt/rpi-ramdisk/packages/qt/qt-host
executing config test use_gold_linker
+ cd /home/mark/opt/rpi-ramdisk/packages/qt/qtbase/config.tests && /home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/arm-linux-gnueabihf-g++ -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -fuse-ld=gold -o conftest-out conftest.cpp
test config.qtbase.tests.use_gold_linker succeeded
executing config test machineTuple
+ /home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/arm-linux-gnueabihf-g++ -dumpmachine
> arm-linux-gnueabihf
test config.qtbase.tests.machineTuple succeeded
executing config test verifyspec
+ cd /home/mark/opt/rpi-ramdisk/packages/qt/qtbase/config.tests/verifyspec && /home/mark/opt/rpi-ramdisk/packages/qt/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/mark/opt/rpi-ramdisk/sysroot/sysroot" "QMAKE_CXXFLAGS += --sysroot=/home/mark/opt/rpi-ramdisk/sysroot/sysroot" "QMAKE_LFLAGS += --sysroot=/home/mark/opt/rpi-ramdisk/sysroot/sysroot" -early "CONFIG += cross_compile" /home/mark/opt/rpi-ramdisk/packages/qt/qtbase/config.tests/verifyspec
> Info: creating stash file /home/mark/opt/rpi-ramdisk/packages/qt/qtbase/config.tests/.qmake.stash
+ cd /home/mark/opt/rpi-ramdisk/packages/qt/qtbase/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make
> /home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/mark/opt/rpi-ramdisk/sysroot/sysroot -O2 -w -fPIC  -I. -I/home/mark/opt/rpi-ramdisk/packages/qt/qtbase/mkspecs/devices/linux-rasp-pi-g++ -o verifyspec.o verifyspec.cpp
> /home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/mark/opt/rpi-ramdisk/sysroot/sysroot -Wl,-O1 -fuse-ld=gold -Wl,-rpath-link,/home/mark/opt/rpi-ramdisk/sysroot/sysroot/opt/vc/lib -Wl,-rpath-link,/home/mark/opt/rpi-ramdisk/sysroot/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/mark/opt/rpi-ramdisk/sysroot/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o      
> /home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/../lib/gcc/arm-linux-gnueabihf/6.4.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open crt1.o: File o directory non esistente
> /home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/../lib/gcc/arm-linux-gnueabihf/6.4.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open crti.o: File o directory non esistente
> /home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/../lib/gcc/arm-linux-gnueabihf/6.4.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open crtn.o: File o directory non esistente
> /home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/../lib/gcc/arm-linux-gnueabihf/6.4.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lm
> /home/mark/opt/rpi-ramdisk/sysroot/toolchain/bin/../lib/gcc/arm-linux-gnueabihf/6.4.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lc
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:66: verifyspec] Error 1

if the linker searches for cross-compiler libs they are in:

/home/mark/opt/rpi-ramdisk/sysroot/toolchain/arm-linux-gnueabihf/libc/usr/lib/

so it should find them.
Any idea?

@ghost
Copy link
Author

ghost commented Apr 19, 2019

I don't know if it's the right way fix but I've issued:

cp -r sysroot/toolchain/arm-linux-gnueabihf/libc/ sysroot/sysroot/

and it was able to continue configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants