Welcome, Guest

Author Topic: Qt framework cross-compilation  (Read 3259 times)

Ntronics

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Qt framework cross-compilation
« on: April 17, 2014, 04:55:40 PM »
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

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Qt framework cross-compilation
« Reply #1 on: April 17, 2014, 09:21:14 PM »
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

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Qt framework cross-compilation
« Reply #2 on: April 20, 2014, 10:58:10 AM »
Dear,

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

regards,

Wavemill

Ntronics

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Qt framework cross-compilation
« Reply #3 on: April 23, 2014, 11:30:16 AM »
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

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Qt framework cross-compilation
« Reply #4 on: April 23, 2014, 11:54:08 AM »
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