PDA

View Full Version : Qt Embedded and tslib?



newstead
14th May 2009, 10:11
Hi,
I'm developing a Qt-application for a embedded Linux device with a touchscreen and when I try to configure Qt to use tslib I get an error message as follows:

The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in
/home/andreas/QT/qt-embedded-linux-opensource-src-4.5.1/mkspecs/qws/linux-arm-g++.


My procedure for building tslib:

# ./autogen.sh
# ./configure CC=arm-none-linux-gnueabi-gcc CXX=arm-none-linux-gnueabi-g++ \
-host=arm-none-linux-gnueabi -target=arm-none-linux-gnueabi \
-enable-static=no -enable-shared=yes
# make -k
# su -c "make -k install"


And Qt procedure:

# make confclean
# ./configure -embedded arm -shared -release -no-largefile -qt-sql-sqlite \
-no-qt3support -no-phonon -no-svg -no-scripttools -nomake demo -nomake \
examples -nomake doc -qt-decoration-default -no-opengl -qt-gfx-linuxfb \
-little-endian -no-phonon-backend -no-cups -qt-mouse-tslib \
-no-feature-cursor -no-kbd-usb -no-kbd-tty -no-mouse-linuxtp \
-no-gfx-multiscreen

Then it fails with the error message above...

How do I get passed that? Detailed instructions would be appreciated :)

wysota
14th May 2009, 11:55
Where are the include files and libraries from tslib? Are they in /usr/lib or /usr/local/lib or where?

newstead
14th May 2009, 13:02
The libraries are in /usr/local/lib and include files in /usr/local/include

wysota
14th May 2009, 13:10
Does /usr/local/lib reside in your ld.so.conf? If not, you have to add it there and run ldconfig or pass appropriate flags to configure so that it looks for libraries there. By the way, probably placing the lib in /usr/local/lib doesn't make much sense if it is a library for architecture other than your native one. It'd be better if you created a separate directory structure for ARM files and pointed the configuration scripts to it.

newstead
15th May 2009, 15:19
Regardless of which path I place tslib in, do I get Qt to use it with the -L and -I flags when I configure Qt? Or is it something else I have missed?

Edit: Yes, /usr/local/lib resides in ld.so.conf

wysota
15th May 2009, 16:58
What does ldd on the tslib return?

newstead
18th May 2009, 07:06
"not a dynamically executable binary"
Or what it could look like in english :D


Edit: Are there any other options beside tslib for using Qt on an ARM embedded system?

Have to edit again.... this is what i get with ldd now:
libdl.so.2 => /lib/libdl.so.2 (0x4000b000)
libc.so.6 => /lib/libc.so.6 (0x40016000)
/lib/ld-linux.so.3 (0x2a000000)

wysota
18th May 2009, 10:52
This looks like a library compiled for your system, not for ARM.

newstead
18th May 2009, 11:44
This looks like a library compiled for your system, not for ARM.

That's from running ldd on the ARM-board. Running ldd on the same file at my host brings the "not an executable..." message

If I run "file libts-0.0.so.0.1.1" I get:
libts-0.0.so.0.1.1: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
So it's definitely compiled for the ARM-arch. Therefore, the question still remains: How do I use tslib from Qt?

wysota
18th May 2009, 19:14
You need to point Qt's configure script to tslib's include files and you need the tslib library available in a place where the linker can find it.

newstead
19th May 2009, 13:52
You need to point Qt's configure script to tslib's include files and you need the tslib library available in a place where the linker can find it.

I'm past that now. It seems however that there is some problems not related to Qt since these commands:


mknod /dev/input/event1 c 13 65
rm -f /etc/pointercal

export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts

export LD_LIBRARY_PATH=/usr/lib

results in:

xres = 480, yres = 640
selected device is not a touchscreen I understand

Even though it might not belong in a Qt-forum, maybe you have an idea why tslib doesn't recognise the device as a touchscreen?

wysota
19th May 2009, 14:02
I have no experience in using tslib, so no, I don't have any idea. I might guess that either the event source (/dev/input/event*) or the kernel module is not configured/running properly.

newstead
4th June 2009, 08:05
Problem solved. It actually turned out to be a HW-error but thanks for your help anyway!

iesuser
16th March 2012, 09:10
Hi,

I am having the same problem. can you please post the steps you followed to solve this problem.

Thanks!