PDA

View Full Version : Error compiling Qtdeclarative for arm / cannot find existing libraries



Plox
12th November 2013, 18:29
Good day fellow programmers,
I am trying to cross-compile Qt 5.1.1 for a Nitrogen6x running Debian Wheezy.
The host is an Ubuntu 12.10 32bit machine and the toolchain is gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.

Qtbase has successfully been build, using only static libraries support though.
What I am having problems with is compiling qtdeclarative which runs into errors during the make process (qtjsbackend compiled just fine).

This is the error output:


/home/finn/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
/home/finn/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
/home/finn/qt/qtbase/lib/libQt5Core.a(qlibrary_unix.o): In function `QLibraryPrivate::load_sys()':
qlibrary_unix.cpp:(.text+0xaac): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/finn/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lqxcb
/home/finn/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/arm-linux-gnueabihf/libpthread.so.0
/home/finn/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find /usr/lib/arm-linux-gnueabihf/libpthread_nonshared.a
collect2: error: ld returned 1 exit status


Here is a part of my qmake file:


QMAKE_INCDIR = /media/finn/d6ff8d38-92e1-465a-a512-2be56071338d/usr/include
QMAKE_INCDIR +=/media/finn/d6ff8d38-92e1-465a-a512-2be56071338d/usr/include/arm-linux-gnueabihf/
QMAKE_LIBDIR = /media/finn/d6ff8d38-92e1-465a-a512-2be56071338d/usr/lib
QMAKE_LIBDIR +=/media/finn/d6ff8d38-92e1-465a-a512-2be56071338d/usr/lib/arm-linux-gnueabihf/


The libraries it is asking for are present in the directories specified in qmake.
I already tried adding
LIBRARY_PATH=/media/finn/d6ff8d38-92e1-465a-a512-2be56071338d/usr/lib/arm-linux-gnueabihf to the make command but this sadly didn't change a thing.

What I think is strange is that I've encountered pretty much the same error when I tried to compile qtbase with shared libraries instead of static ones.

Does anyone has an idea how to fix this?
Any help will be greatly appreciated!

Plox
13th November 2013, 19:40
It's me again and I found the solution to my problem:
Simply reinstall the host machine.

It sure isn't an elegant solution but it's working for me.