[Interest] Qt5 Cross Compiling for ARM

Thiago Macieira thiago at kde.org
Thu Feb 16 09:26:08 CET 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120216/2d8f9e60/attachment.sig>


More information about the Interest mailing list