Cross Compile Qt on BBB issue

Hello,

I’m trying to cross compile Qt SDK for BBB (with Ubuntu or Debian).

I managed to compile it well with -embedded arm option …

But with this option I have to execute my programs with -qws option… And I have some issues with the mouse pointer, it doesn’t clic where I want and it move my application windows … I guess it’s because I use a touch screen and the calibration needs X11 maybe…??

So I would like to cross compile Qt without the -embedded arm option to support and use X11 … but I need X11 libs for ARM to do this… so I tried a chroot on a minimal arm file system ubuntu on my PC desktop and link to this librairy in the qmake.conf and made this:

./configure -opensource -confirm-license -prefix /usr/local/Qt-4.8.5-arm-X11 -xplatform linux-arm-gnueabi-g++

But it doesn’t work…

I’ve got this error message:

Basic XLib functionality test failed!

You might need to modify the include and library search paths by editing

QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/franck/qt-everywhere-opensource-src-4.8.5/mkspecs/linux-arm-gnueabi-g++.

and here is my qmake.conf:

franck@VB:~/qt-everywhere-opensource-src-4.8.5/mkspecs/linux-arm-gnueabi-g++$ cat qmake.conf

qmake configuration for building with arm-linux-gnueabi-g++

MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib

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

QMAKE_INCDIR_X11 +=/home/franck/chroot-armhf/fs/usr/include/X11/
QMAKE_LIBDIR _X11 +=/home/franck/chroot-armhf/fs/usr/lib/arm-linux-gnueabihf/

modifications to g++.conf

QMAKE_CC = /home/franck/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-gcc
QMAKE_CXX = /home/franck/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++
QMAKE_LINK = /home/franck/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = /home/franck/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++

modifications to linux.conf

QMAKE_AR = /home/franck/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY = /home/franck/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-objcopy
QMAKE_STRIP = /home/franck/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-strip

load(qt_config)

So I decided to compile Qt SDK directly in the arm file system “chrooted”:

I made

./configure -opensource -confirm-license -prefix /usr/local/Qt-4.8.5-arm-X11 -no-qt3support -nomake demos -nomake examples

Now I’ve got this error message:

make[1]: *** […/…/lib/libQtCore.so.4.8.5] Error 1
make[1]: Leaving directory `/home/ubuntu/qt-everywhere-opensource-src-4.8.5/src/corelib’
make: *** [sub-corelib-make_default-ordered] Error 2

If someone has an idea… ^^

for information I installed this packages in my chroot:

apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev build-essential

To fix your calibration issue watch this video https://www.youtube.com/watch?v=kP7uvOu9hoQ&noredirect=1
at the middle of the video, the guy explain how to fix the calibration issue with Qt programs using tslib-calibrate package.

Thanks for the link ^^

Can you try this setup.
http://www.cloud-rocket.com/2013/07/building-qt-for-beaglebone/

I used this one
http://treyweaver.blogspot.com.ar/2010/10/setting-up-qt-development-environment.html

but I needed some adaptations.

Thanks for your answer… I think the problem is that the configure command has -embedded arm option. So it’s made to work with a frame buffer and without X11… That’s why I’m trying to compile it for X11 support…

In fact, you can’t use framebuffer (-qws) and X11 at the same time…

you can find a discussion here about this subject:
https://qt-project.org/forums/viewthread/26578

Thanks for your answer… I think the problem is that the configure command has -embedded arm option. So it’s made to work with a frame buffer and without X11… That’s why I’m trying to compile it for X11 support…

In fact, you can’t use framebuffer (-qws) and X11 at the same time…

you can find a discussion here about this subject:
https://qt-project.org/forums/viewthread/26578

Do you really need X11? Why not use EGLFS platform? I use this with QT5.1.1 with SGX on V3.12 kernel.

Regards,
John

Well, it’s because I’ve got a project where I have to use some gnome programs like a virtual keyboard, or launch others programs from my application and I need a windows manager… Maybe there are other ways to do this sort of things?

What do you mean by GLFS platform?

Well, it’s because I’ve got a project where I have to use some gnome programs like a virtual keyboard, or launch others programs from my application and I need a windows manager… Maybe there are other ways to do this sort of things?

What do you mean by GLFS platform?

http://qt-project.org/forums/viewthread/24299

BTW, you should retain part of the previous conversation so that everyone else can understand the context of your question.

Regards,
John

Thanks for your link…

Well, I guess that GLFS is a platform working with Qt5 only? (maybe I miss something important?)

( I was’nt retain part of the previous conversation thinking to be clearer… I’m not used with google groups^^ )

Hello again,

Well I tried to use tslib-calibrate but the problem is that it isn’t on the Ubuntu’s repository (I don’t use Angstrom)… If someone has an idea…^^

well , so maybe I’ll try to compile tslib on the BBB:

https://github.com/kergoth/tslib

What do you think about it?

Well I compiled tslib.; but I still have some issue…

I set the environment variable like this:

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_CONFFILE=/etc/ts.conf

export TSLIB_PLUGINDIR=/usr/local/lib/ts

export TSLIB_TSDEVICE=/dev/input/event1

I tried also this :

export TSLIB_TSDEVICE=/dev/input/mouse0 (and all others input devices… )

event1 and mouse0 are the two files that output something when I do :

cat /dev/input/event1 or cat /dev/input/mouse0 and I touch the screen.

but even if I configure the environment variable like above, I’ve got this message when I execute ts_calibrate:

No raw module loaded.

ts_config: No such file or directory

have you got an idea? ( in /etc/ts.conf, the line module_raw input (linux input layer event interface) is not commented…)

Make sure you’re using the same toolchain for tslibs that was used for the kernel/rootfs. all the RCN stuff uses hard float point toolchain.
https://launchpad.net/linaro-toolchain-binaries/trunk/2013.10/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.xz

I had this problem when I first switched from Angstrom to RCN kernel and debian rootfs. I just continued to use the old toolchain from Angstrom without giving it much thought.

Thanks for you help.
Well I compiled tslib directly on the BBB…

So I tried something else…
I compiled it on my PC desktop with the cross tool chain I used to compile my kernell (provide with my file system arm-hf: http://www.armhf.com/index.php/boards/beaglebone-black/#precise ) and so I did this:

./configure --prefix=/usr --sysconfdir=/etc

make ARCH=arm CROSS_COMPILE=/home/ana/Téléchargements/BBB/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-

and copy all files in the “good” directories on the BBB . I mean all needed *.la and *.so in /usr/lib/ts and the all needed binaries like _s_calibrate in /usr/bin … and I copy also tslib directory with source files (with all *.o thats also seems to be needed) .,

and now I have this error message:

ts_calibrate.o: file not recognized: File format not recognized

collect2: ld return 1 exit statuts

Really I don’t know what to do now…