[Interest] Cross-compiling Qt-4.8

Christian Gagneraud chris at techworks.ie
Thu Jul 12 13:37:48 CEST 2012


On 11/07/12 21:32, Thiago Macieira wrote:
> On quarta-feira, 11 de julho de 2012 20.55.38, Christian Gagneraud wrote:
>> Hi all,
>>
>> I'm trying to re-add Qt to OpenWRT (it had basic support for 4.7.0
>> pre-release but have then been removed).
>>
>> For the moment, I would like to focus on QtCore, QtDBus and QtNetwork.
>>
>> Here is the spec file i'm using: http://pastebin.com/6p6tXg15
>>
>> But so far, the build fails on an atomic related error:
>> http://pastebin.com/LBLtAqiE
>>
>> Could anyone help me to understand this error and fix it?
>
> Error 1: it's missing a const or const_cast. Add it. Upgrading to 4.8 is also
> recommended since those issues might have been fixed there.

I'm actually using 4.8. I didn't expect to have to fix these kind of 
errors as Qt on ARM/Linux is widely used.

I do understand what's the problem here, but I don't see where the cast 
should take place.

It all starts with this line in qdbusintegrator.cpp:
Q_GLOBAL_STATIC_WITH_ARGS(const QString, orgFreedesktopDBusString, 
(QLatin1String(DBUS_SERVICE_DBUS)))

Should I change this:
bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *, void *, 
void *);

to this:
bool QBasicAtomicPointer_testAndSetOrdered(void * volatile * const, void 
*, void *);


>
> Error 2: you forgot to pass an -arch flag to configure to let it know what
> architecture you're compiling to. You probably want one of:
> 	-arch arm
> 	-arch armv6
> 	-arch mips

I tried that one, but it complained because i'm using "-embedded openwrt".

>
> The armv6 option is not necessary in 4.8: it detects ARMv6 and v7
> automatically. And the entire -arch option is not necessary in Qt 5.0.

thx,
Chris

>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>


-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/





More information about the Interest mailing list