[Interest] Qt5 Cross Compiling for ARM

Dietrich.Gossen at continental-corporation.com Dietrich.Gossen at continental-corporation.com
Thu Feb 16 12:57:02 CET 2012


Hi,

thank you for your help.

I am using the linux-arm-gnueabi-g++ mkspecs now. 
@Thiago
> And the linux-g++-mx5x mkspec is 
> not present, is this something you created?

Yes I created it and copied it from 
http://imxcommunity.org/group/imxqt/forum/topics/building-qt-for-imx5x

That's how my new mkspecs looks like:

#
# 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)

# modifications to g++.conf
QMAKE_CC                = 
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc
QMAKE_CXX               = 
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK              = 
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB        = 
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR                = 
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-ar 
cqs
QMAKE_OBJCOPY           = 
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-objcopy
QMAKE_STRIP             = 
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-strip

QMAKE_RANLIB          = 
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-ranlib

# includes
QMAKE_INCDIR          = /home/lucid/ltib/rootfs/usr/include 
/home/lucid/ltib/rootfs/usr/include/glib-2.0 
/home/lucid/ltib/rootfs/usr/lib/glib-2.0/include/\
/home/lucid/ltib/rootfs/usr/include/gstreamer-0.10/ 
/home/lucid/ltib/rootfs/usr/include/libxml2/ 
/home/lucid/ltib/rootfs/usr/include/freetype2 \

# libs
QMAKE_LIBDIR          = /home/lucid/ltib/rootfs/usr/lib

QMAKE_LIBS            = -lglib-2.0 -lgthread-2.0 -lgstreamer-0.10 -lxml2 
-lz -lgmodule-2.0 -lgobject-2.0 -lts -lasound \
                         -lfreetype -lexpat -ljpeg -lfontconfig -lSM -lICE 
-lpng -lgsl -lgsl-fsl -lEGL -lGLESv2

# opengl
QMAKE_INCDIR_OPENGL_ES2 = /home/lucid/ltib/rootfs/usr/include/GLES2
QMAKE_LIBDIR_OPENGL_ES2 = /home/lucid/ltib/rootfs/usr/lib
QMAKE_INCDIR_EGL      = /home/lucid/ltib/rootfs/usr/include/EGL
QMAKE_LIBDIR_EGL      = /home/lucid/ltib/rootfs/usr/lib


QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 
QMAKE_LIBS_EGL        = -lEGL
QMAKE_LIBS_THREAD     = -lpthread

load(qt_config)

The new error I am getting is 
bi/bin/ld: cannot find -lgsl

It's about the gstreamer. Is it possible to turn it off in the configure 
command? 
-no-multimedia doesn't work.


Regards,

Dietrich Gossen
Continental Engineering Services




Von:    Thiago Macieira <thiago at kde.org>
An:     interest at qt-project.org
Datum:  16.02.2012 09:26
Betreff:        Re: [Interest] Qt5 Cross Compiling for ARM
Gesendet von:   
interest-bounces+dietrich.gossen=continental-corporation.com at qt-project.org



On quinta-feira, 16 de fevereiro de 2012 07.40.43, 
Dietrich.Gossen at continental-corporation.com wrote:
> Hi,
> 
> I am getting this error when I try to cross compile Qt5 for ARM.
> 
> Project ERROR: QMAKE_WAYLAND_SCANNER not defined for this mkspec

You should be able to ignore this error. The problem is that the configure 

script makes qmake parse all .pro files, even those that are not used.

> That's my configure command:
> ./configure -arch arm -xplatform linux-g++-mx5x -prefix
> /home/lucid/ltib/rootfs/usr/local/Trolltech/Qt -phonon-backend
> -little-endia -host-little-endian -fontconfig -sm -opengl es2

The -arch argument is no longer necessary. And the linux-g++-mx5x mkspec 
is 
not present, is this something you created?

> And that's my mkspecs:
[snip]
> Any ideas?

Yes, it seems too long...

You could try first including ../linux-g++/qmake.conf and changing only 
what 
you need. This is my old mkspec for compiling for MeeGo ARM:

include(../linux-g++/qmake.conf)

QMAKE_CC = armv7hl-meego-linux-gnueabi-gcc
QMAKE_LINK_C = armv7hl-meego-linux-gnueabi-gcc
QMAKE_LNK_C_SHLIB = armv7hl-meego-linux-gnueabi-gcc

QMAKE_CFLAGS += -march=armv7-a -mfpu=neon -Wno-psabi
QMAKE_CFLAGS_RELEASE   = -O3 -g

QMAKE_CXX = armv7hl-meego-linux-gnueabi-g++
QMAKE_LINK = armv7hl-meego-linux-gnueabi-g++
QMAKE_LINK_SHLIB = armv7hl-meego-linux-gnueabi-g++

QMAKE_CXXFLAGS        += $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE

QMAKE_LFLAGS     += $$QMAKE_CXXFLAGS
QMAKE_LFLAGS_RELEASE += $$QMAKE_CXXFLAGS_RELEASE

QMAKE_AR = armv7hl-meego-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = armv7hl-meego-linux-gnueabi-objcopy
QMAKE_RANLIB = armv7hl-meego-linux-gnueabi-ranlib


The qplatformdefs.h is just #include "../linux-g++/qplatformdefs.h".

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
[Anhang "signature" gelöscht von Dietrich Gossen/usr/cag] 
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
[Anhang "RMX-encryption-info.txt" gelöscht von Dietrich Gossen/usr/cag] 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120216/2cac6c15/attachment.html>


More information about the Interest mailing list