2

I'm very new to cross compilation and ARM boards. Currently I have basic idea on cross compilation and binary execution on ARM boards. I want to build a QT application to run on an ARM based board, which supports a touch screen. The board is already configured with QT 5 and tslib. But to cross compile applications with qmake, I need a cross compiled QT with tslib in my ubuntu PC. I was able to build such one without tslib and successfully displayed an application in my board. But when I try to configure qt with -tslib, configuration process results in termination with these messages:

Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
WARNING: Cross compiling without sysroot. Disabling pkg-config
ERROR: Feature 'tslib' was enabled, but the pre-condition 'libs.tslib' failed.
Check config.log for details. 

Here's my qtbase/mkspecs/linux-arm-gnueabi-g++ content:

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental
QMAKE_INCREMENTAL_STYLE = sublib

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

QMAKE_INCDIR += /home/tslib/include/
QMAKE_LIBDIR += /home/tslib/lib/

# modifications to g++.conf
QMAKE_CC                = arm-none-linux-gnueabi-gcc
QMAKE_CXX               = arm-none-linux-gnueabi-g++
QMAKE_LINK              = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB        = arm-none-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR                = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY           = arm-none-linux-gnueabi-objcopy
QMAKE_NM                = arm-none-linux-gnueabi-nm -P
QMAKE_STRIP             = arm-none-linux-gnueabi-strip
load(qt_config)

Here's config. command:

./configure -opensource -confirm-license -xplatform linux-arm-gnueabi-g++ -prefix /usr/local/qt5.8embd -nomake examples -no-opengl -no-iconv -silent -qpa linuxfb -no-gtk -tslib

Truth is I'm drawning in wrong methods available via google. I would like someone to suggest neat working steps to cross compile QT 5.8.0 with -tslib enabled.

Foot note: Can I build QT application in an indirect way? I have all required .so files in my target board. I could copy them into my PC and could I cross compile a Qt project only using my toolchain?

ffox
  • 21
  • 1
  • 2
  • Qt needs the shared object for linking. I would suggest that you just ditch TsLib. If you have a capacitive touch, it is not really needed and will just overly complicate things. See: [QT tslib and ft5x06](http://stackoverflow.com/questions/26346019/cant-get-tslib-to-work-with-ft5x06) for issues once you get linking to work... As per the suggest answer, you should use 'sysroot' with a shadow of the target directory structure. The directory location of shared objects can be as important as getting the correct one on the host. Paths are put in the generated binaries. – artless noise Mar 14 '17 at 17:41
  • Is your problem solved?I have same problem – H.Ghassami May 17 '17 at 06:43
  • Yes. Try this configuration: ./configure -opensource -confirm-license -xplatform linux-arm-gnueabi-g++ -prefix /usr/local/qt5.8embd -nomake examples -no-opengl -no-iconv -silent -qpa linuxfb -no-gtk -qt-libjpeg -qt-libpng – ffox May 17 '17 at 06:57

1 Answers1

0

What is your target device ?

What is usually done when doing cross-development like that is either:

  1. Use the sysroot provided by the cross-toolchain (take a look a Linaro for example)
  2. Use your target file system as sysroot

In the first case, you'll have to cross-compile all the dependencies you need and add them to the cross-toolchain sysroot.

In the second case, you install the development packages of the dependencies you need directly on the target. Then, depending on how you have setup your development environment, either you copy this "new version" of the device filesystem on your development machine or make it available through e.g. sshfs.

SGaist
  • 906
  • 8
  • 33
  • 109
  • Thanks., I use a cross-toolchain (arm-none-linux-gnueabi-*). Dependencies are already installed in the development board. My aim is to build a qt 5 GUI application to run on that board. As I mentioned I was able to execute a GUI application in my target. I seek help in building tslib library for touch applications. – ffox Mar 14 '17 at 13:57
  • What Linux distribution are you running on that board ? – SGaist Mar 14 '17 at 14:01
  • while running command uname it shows 3.18.24-tcc armv7l GNU/Linux – ffox Mar 14 '17 at 15:00
  • What does `uname -a` return ? Also, are you building this completely yourself ? Using Yocto ? Other means ? – SGaist Mar 14 '17 at 15:41
  • Linux tcc8971-lcn-2.0 3.18.24-tcc #6 SMP PREEMPT Tue Nov 15 11:12:22 KST 2016 armv7l GNU/Linux – ffox Mar 14 '17 at 15:55
  • Is that the device like described in this [article](http://blog.qt.io/blog/2017/01/09/qt-together-telechips/) ? – SGaist Mar 14 '17 at 20:55
  • Yes. It is. How could I configure and build qt5 with tslib for this device? – ffox Mar 15 '17 at 03:37
  • With what are you creating the root file system of the device ? – SGaist Mar 15 '17 at 22:48
  • Do you mean toochain used? Linux-none-arm-gnueabi- – ffox Mar 16 '17 at 17:06
  • No, like I asked before: are you using a distribution like Yocto where you build everything ? Something else ? – SGaist Mar 16 '17 at 22:24