Hi everyone,
I’m building Qt 5.2.1 for ARM/Linux/X11.
My target platform is Nvidia Tegra 2 and I configured Qt with the following command (sorry, it’s pretty long):
./configure -prefix /opt/QtTegra2 -opensource -confirm-license -mtdev -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -no-glib -make libs -nomake examples -no-cups -no-pch -no-dbus -device tegra2 -device-option CROSS_COMPILE=/opt/local/bin/arm-linux-gnueabihf- -no-eglfs -no-directfb -no-linuxfb -no-kms -qpa xcb -sysroot /home/siro/ubuntu/rootfs -opengl es2 2>&1 | tee configure.log
After compiling the components of libQt5Core.so comes the linking issue.
The resulting error follows:
/opt/local/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: /home/siro/ubuntu/rootfs/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/ubuntu/rootfs/usr/lib/arm-linux-gnueabihf/libz.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
I’m kind of lost since I couldn’t find any solution to this issue.
Any help?
PS: -fPIC is among the options employed to compile objects since I’m not using the -static option of the configure script and the pkgconfig of libz inside usr/lib/arm-linux-gnueabihf/pkgconfig seems correct.
↧