Qt framework cross-compilation

Started by Ntronics, April 17, 2014, 04:55:40 pm

Previous topic - Next topic

Ntronics

Hi guys,

I've spent a lot of time trying to cross-compile Qt 4.8.5 framework on Debian VirtualBox machine, but without any luck unfortunately. Now I really wonder if it is possible at all.

I tried to compile it with both Linaro and Emdebian tool-chains. The Emdebian 4.7 gets stuck at ui-validators.h step and never finishes the compilation process.

I have some success with Linaro 4.7. It succeeds in cross-compilation, but when the application is run, it fails with the message: "bash: line 1:  2092 Illegal instruction     DISPLAY=:0.0 /root/test -qws"

I desperately need to get Qt working on A10 board and willing to pay for support if somebody will be able to help me.

Kreega

I've never tried to do what you're doing. But I would ask QT users/developers because they know it best.


"bash: line 1:  2092 Illegal instruction     DISPLAY=:0.0 /root/test -qws"

Can you run /root/test -qws

That has to be run from a terminal inside a desktop

How about ls -l /root/test

wavemill

Dear,

I tried also, but without success.
Have you find a solution?

regards,

Wavemill

Ntronics

I'm getting the following message when the application is executed with olimex and root user account privelleges:

Error opening framebuffer device /dev/fb0
QScreenLinuxFb::connect: Permission denied

Both fb0 and fb1 files are present in /dev/ directory. I have also disabled "slim" service via sysv-rc-conf utility.

Perhaps I should share my qmake.conf contents if anybody wishes to compile the Qt framework:

QMAKE_INCDIR += /opt/tslib-olimex-linaro/include
QMAKE_LIBDIR += /opt/tslib-olimex-linaro/lib
QMAKE_LFLAGS = -lts

QMAKE_CFLAGS_RELEASE    = -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -ffast-math -Ofast -mfloat-abi=hard
QMAKE_CXXFLAGS_RELEASE  = -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -ffast-math -Ofast -mfloat-abi=hard

# LINARO

# modifications to g++.conf
QMAKE_CC                = /home/jay/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-gcc
QMAKE_CXX               = /home/jay/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-g++
QMAKE_LINK              = /home/jay/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB        = /home/jay/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-g++

# modifications to linux.conf
QMAKE_AR                = /home/jay/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY           = /home/jay/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-objcopy
QMAKE_STRIP             = /home/jay/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-strip

The tslib must be prepared first. I've achieved it by prepending compilers bin directory to PATH:

export PATH=/home/jay/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin:$PATH

Then run:

./autogen-clean.sh
./autogen.sh
./configure --prefix=/opt/tslib-olimex-linaro --host=arm-linux-gnueabihf

Then the config.h file must be edited by commenting out the line containing "define malloc rpl_malloc", otherwise make will fail during build process. Then run:

./make -j2
sudo make install

After tslib is ready, the Qt framework can be built

Ntronics

I configured Qt as follows:

./configure \
-v \
-opensource \
-confirm-license \
-prefix /opt/qt-olimex-linaro \
-embedded arm \
-platform qws/linux-x86-g++ \
-xplatform qws/linux-olimex-linaro-g++ \
-depths 16,24,32 \
-no-mmx -no-3dnow \
-no-sse \
-no-sse2 \
-no-glib \
-no-cups \
-no-largefile \
-no-accessibility \
-no-openssl \
-no-gtkstyle \
-qt-mouse-pc \
-plugin-mouse-pc \
-qt-mouse-tslib \
-fast \
-little-endian \
-host-big-endian \
-no-pch \
-no-sql-ibase \
-no-sql-mysql \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-sqlite2 \
-no-webkit \
-no-qt3support \
-nomake examples \
-nomake demos \
-nomake docs \
-nomake translations