Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.2.1, 5.3.0
-
None
-
Ubuntu 12.04.4 LTS, (cross) gcc 4.8, Ubuntu Core 13.10
Description
I'm trying to crosscompile Qt5 5.2.1 for ARM Tegra2.
I'm using the Linaro ARMhf 4.8 toolchain and the Ubuntu Core 13.10 root file system with build dependencies installed.
I'm configuring Qt with the following command:
./configure -prefix /opt/qt5 -developer-build -opensource -confirm-license -device tegra2 -device-option CROSS_COMPILE=/home/siro/sys/arm/usr/bin/arm-linux-gnueabihf- -no-eglfs -no-directfb -no-linuxfb -no-kms -qpa xcb -sysroot /home/siro/projects/ubuntu/dev -opengl es2 -v
and I slightly changed linux-tegra2-g++ configuration to fit the path inside the Ubuntu Core root file system (gnueabihf, instead of gnueabi).
The configuration runs smoothly, however, after building pretty much all the object file of qtbase, I get the following error when building libQt5Core.so.5.3.0:
/home/siro/sys/arm/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: /home/siro/projects/ubuntu/dev/usr/lib/arm-linux-gnueabihf/libz.a(compress.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC /home/siro/projects/ubuntu/dev/usr/lib/arm-linux-gnueabihf/libz.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status
Every object file is already compiled as position independent code, thus, I do not understand what's the issue here. Is the linker asking for a position independent version of compress.o? If so, why isn't it using the libz.so?