Problem building Qt/Embedded for ARM - linking libts
Hi All,
I have been trying to cross-compile/build Qt Embedded for ARM.
I am getting stuck with a link error to libts when building the examples.
I feel like I’m almost there as this is quite a way into the build process!
Full error below:
- make[3]: Entering directory `/home/user/qt-embedded-4.7.1/examples/network/blockingfortuneclient'
- /usr/local/arm/cross-gcc-4.4.1-armv5te-soft/i686-pc-linux-gnu/bin/arm-926ejs-linux-gnueabi-g++ -Wl,-rpath-link,/home/user/qt-embedded-4.7.1/lib -Wl,-O1 -Wl,-rpath,/usr/local/Qt/lib -Wl,-rpath,/usr/local/Qt/lib -o blockingfortuneclient .obj/release-shared-emb-arm/blockingclient.o .obj/release-shared-emb-arm/main.o .obj/release-shared-emb-arm/fortunethread.o .obj/release-shared-emb-arm/moc_blockingclient.o .obj/release-shared-emb-arm/moc_fortunethread.o -L/home/user/qt-embedded-4.7.1/lib -L/usr/local/tslib/lib -lQtGui -L/home/user/qt-embedded-4.7.1/lib -L/usr/local/tslib/lib -lQtNetwork -lQtCore -lpthread
- /usr/local/arm/cross-gcc-4.4.1-armv5te-soft/i686-pc-linux-gnu/lib/gcc/arm-926ejs-linux-gnueabi/4.4.1/../../../../arm-926ejs-linux-gnueabi/bin/ld: warning: libts-1.0.so.0, needed by /home/user/qt-embedded-4.7.1/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
- /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_read_raw'
- /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_open'
- /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_fd'
- /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_config'
- /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_close'
- /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_read'
- collect2: ld returned 1 exit status
- make[3]: *** [blockingfortuneclient] Error 1
A bit of further info.
I am trying to build on debian5 (in a VM) using arm-926ejs-linux-gnueabi-gcc v4.4.1
I have built and installed tslib as follows
./autogen.sh
./configure CC=arm-926ejs-linux-gnueabi-gcc CXX=arm-926ejs-linux-gnueabi-g++ PLUGIN_DIR=/usr/local/arm/tslib/plugins -prefix=/usr/local/tslib -host=arm-926ejs-linux-gnueabi
make -k
su
export PATH=/usr/local/arm/cross-gcc-4.4.1-armv5te-soft/i686-pc-linux-gnu/bin:$PATH
make -k install
I have edited the qmake.conf to add full paths to the arm toolchain and added
QMAKE_INCDIR = /usr/local/tslib/include # path to compiled includes
QMAKE_LIBDIR = /usr/local/tslib/lib # path to compiled libs
configured with:
./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -prefix /usr/local/Qt -qt-mouse-tslib -little-endian -no-webkit -no-qt3support -no-cups -no-largefile -optimized-qmake -no-openssl -nomake -opensource -confirm-license
then run make, where I get the errors!
Can anyone offer any assistance :-(
3 replies
After lots of googling I found this snippet:
Qt bug report – Not linking with tslib [bugreports.qt.nokia.com]
It seems you also need to add this to the qmake.conf :
QMAKE_LFLAGS += -Wl,-rpath-link=/usr/local/tslib/lib
All seems to build now!
Wish I’d found this 2 days ago ;-)
You must log in to post a reply. Not a member yet? Register here!
