Cross Compiling Qt for Embedded Arm: libpthread.so.0 not found

admin

Administrator
Staff member
I am trying to cross compile Qt with WebKit for an embedded arm device (freescale processor). I have a arm-none-linux-gnueabi toolchain.

Qt actually compiled, but I have run into problems when trying to compile the demos, in particular the WebKit ones, which is really what I am after.

The first problem I was having was that libjscore was not found, which was an error due to the way Qt handles static builds. Turns out you can copy the library and it works, see <a href="https://stackoverflow.com/questions...-i-am-trying-to-build-qt-4-7-1-static-library">here</a>.

Now compilation breaks again saying it can not find libpthread.so.0, which would seem to be a toolchain problem rather than a Qt problem.

Searching the directory tree in my toolchain, there are several libpthreads. A copy of the <strong><em>find | grep libpthread</em></strong> command's output is below for reference.

Code:
./arm-none-linux-gnueabi/sysroot/vfp/lib/libpthread-2.5.so
./arm-none-linux-gnueabi/sysroot/vfp/usr/lib/libpthread_nonshared.a
./arm-none-linux-gnueabi/sysroot/vfp/usr/lib/libpthread.a
./arm-none-linux-gnueabi/sysroot/vfp/usr/lib/libpthread.so_orig
./arm-none-linux-gnueabi/sysroot/vfp/usr/lib/libpthread.so
./arm-none-linux-gnueabi/sysroot/lib/libpthread-2.5.so
./arm-none-linux-gnueabi/sysroot/usr/lib/libpthread_nonshared.a
./arm-none-linux-gnueabi/sysroot/usr/lib/libpthread.a
./arm-none-linux-gnueabi/sysroot/usr/lib/libpthread.so_orig
./arm-none-linux-gnueabi/sysroot/usr/lib/libpthread.so

So it seems that there is something weird with the linker? Also, what needs to be symlinked to create the <em>libpthread.so.0</em>?

Note: the _libpthread.so_orig_ and <em>libpthread.so</em> follow this <a href="http://xc0ffee.wordpress.com/2011/04/28/linker-“ld-cannot-find-liblibpthread-so-0″/" rel="nofollow noreferrer">fix</a>.

Any help or suggestions are much appreciated. I've been banging my head against a wall for two days now.

Thanks