Reputation: 746
I am cross-compiling a Qt Application. My host is a Ubuntu system and target is ARM board with buildroot based filesystem and I am using Qt 5.3.1. When I try to run make, I get the following error:
/home/hamzah/vibrante/toolchains/tegra-4.8.1-nv/usr/bin/armv7a-vfpv3-cortex_a15-linux-gnueabi/../../libexec/armv7a-vfpv3-cortex_a15-linux-gnueabi/gcc/arm-cortex_a15-linux-gnueabi/4.8.1/ld: cannot find /lib/libpthread.so.0
/home/hamzah/vibrante/toolchains/tegra-4.8.1-nv/usr/bin/armv7a-vfpv3-cortex_a15-linux-gnueabi/../../libexec/armv7a-vfpv3-cortex_a15-linux-gnueabi/gcc/arm-cortex_a15-linux-gnueabi/4.8.1/ld: cannot find /usr/lib/libpthread_nonshared.a
collect2: error: ld returned 1 exit status
As you can see, it is using absolute path in target for libpthread.so.0
and libpthread_nonshared.a
. This library is placed in the target filesystem hosted on my host. The target library search path has been added in qmake.conf
using QMAKE_LIBDIR
variable:
QMAKE_LIBDIR += /home/hamzah/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot
QMAKE_LIBDIR += /home/hamzah/buildroot/output/host/usr/arm-buildroot-linux-gueabihf/sysroot/usr/lib
I need to know how to make the ld
able to find this library using sysroot
variable or any other approach.
PS: I am compiling Qt Application. Pre-built Qt applications are running on both my host and target
Upvotes: 0
Views: 925
Reputation: 5956
Use the qmake built by Buildroot in output/host/usr/bin. This one has the right paths pre-configured. If it still doesn't work, please submit a bug report in the Buildroot bug tracker, with a simple test case to reproduce the problem, as well as the list of steps to reproduce it.
Upvotes: 2