Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.0 Alpha
-
None
-
19e61ac2907fd453d629d270668139cd1da7e10b
Description
Do a cross compilation for a 64-bit target, f.ex. Intel x64 using the recently added linux-nuc-g++ device.
Running configure on the clean tree results in:
Testing size of pointers ... (/home/agocs/Data/intel_yocto/openembedded-core/build/qtbase/mkspecs/devices/linux-nuc-g++ yes /home/agocs/Data/intel_yocto/openembedded-core/build/qtbase /home/agocs/Data/intel_yocto/openembedded-core/build/qtbase) rm -f ptrsizetest.o rm -f *~ core *.core /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++ -c -pipe -m64 -g -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-nuc-g++ -o ptrsizetest.o ptrsizetest.cpp /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++ -o ptrsizetest ptrsizetest.o /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find crt1.o: No such file or directory /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find crti.o: No such file or directory /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find crtbegin.o: No such file or directory /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find -lstdc++ /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find -lm /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find -lgcc_s /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find -lgcc /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find -lc /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find -lgcc_s /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find -lgcc /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find crtend.o: No such file or directory /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/4.9.3/real-ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status make: *** [ptrsizetest] Error 1 Pointer size: 4
4 is obviously wrong. It breaks V4 in qtdeclarative and potentially others.
Invoking configure for the second time gives:
Testing size of pointers ... (/home/agocs/Data/intel_yocto/openembedded-core/build/qtbase/mkspecs/devices/linux-nuc-g++ yes /home/agocs/Data/intel_yocto/openembedded-core/build/qtbase /home/agocs/Data/intel_yocto/openembedded-core/build/qtbase) rm -f ptrsizetest.o rm -f *~ core *.core /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++ -c -pipe -m64 --sysroot=/home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/corei7-64-oe-linux -g -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-nuc-g++ -o ptrsizetest.o ptrsizetest.cpp /home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++ --sysroot=/home/agocs/Data/intel_yocto/openembedded-core/build/toolchain/sysroots/corei7-64-oe-linux -o ptrsizetest ptrsizetest.o Pointer size: 8
which is correct.
The difference lies in the --sysroot argument.
For 32-bit targets (like all ARM devices for now) the difference is negligible since the size is set to 4 anyhow. This could be the reason for not discovering the issue earlier.