January 14, 2011

Jinxxy Jinxxy
Lab Rat
4 posts

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:

  1. make[3]: Entering directory `/home/user/qt-embedded-4.7.1/examples/network/blockingfortuneclient'
  2. /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
  3. /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)
  4. /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_read_raw'
  5. /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_open'
  6. /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_fd'
  7. /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_config'
  8. /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_close'
  9. /home/user/qt-embedded-4.7.1/lib/libQtGui.so: undefined reference to `ts_read'
  10. collect2: ld returned 1 exit status
  11. 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

January 14, 2011

Jinxxy Jinxxy
Lab Rat
4 posts

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 ;-)

May 25, 2011

danger89 danger89
Lab Rat
3 posts

Thanks for your explanation!

April 2, 2012

soesanwynn soesanwynn
Lab Rat
1 posts

Hello,

I ran into the same problem.

It could also be solved by passing -lts flag.

 
  ‹‹ Regarding QT SDK installation      Compile errors in qdbusconnection.h ››

You must log in to post a reply. Not a member yet? Register here!