[Development] Harmattan - broken qmake

Simon Hausmann simon.hausmann at digia.com
Fri Sep 28 13:38:18 CEST 2012


On Thursday, September 27, 2012 07:46:57 PM Laszlo Papp wrote:
> > Can you do what it says?
> 
> I have spent a couple of hours with figuring this problem out, and it
> seems the following change in qmake has made the build policy about
> errors stricter:
> https://codereview.qt-project.org/#change,35183
> 
> I think this change is actually a good idea, so I do not blame Ossi.
> 
> :-) However my concern was that this reveals a previously seen error
> 
> more straight-forwardly:
> 
> "Project ERROR: CROSS_COMPILE needs to be set via -device-option
> CROSS_COMPILE=<path>
> Could not read qmake configuration file
> /usr/src/packages/BUILD/mkspecs/devices/linux-maemo-n9-g++/qmake.conf."
> 
> Then I have tried to pay attention to Thiago's suggestion and that
> indeed seems to prove the assumption:
> 
> https://build.pub.meego.com/package/live_build_log?arch=armv7el&package=qt5-
> base&project=home%3Arzr%3Aharmattan&repository=MeeGo_1.2_Harmattan_Maemo.org
> _MeeGo_1.2_Harmattan_standard

Ahhh, that's what made it seem like qmake crashed when it actually error'ed 
out. Well spotted!
 
> Current situation
> * Maemo mkspecs file: harcoded toolchain name as for now.
> * N9 device mkspecs file: toolchain prefixed with the CROSS_COMPILE
> variable which is empty in scratchbox, but that was intentional in
> environments like scratchbox
> 
> Requirement
> I believe we need to have a way of building Qt the same way in
> scratchbox, native environment, and things like Madde.
> 
> Alternatives
>  * Smart automated CROSS_COMPILE variable detection provided nothing
> is issued explicitely to the "configure" script. If the automated
> detection failed based on "sysroot" and so forth, then the error would
> for sure remain. This would very well fit into the bigger picture to
> solve any cross-platform development related issues as this issue is
> in fact not any Harmattan/MeeGo specific. Although this is a bit
> intrusive change in the configure script most likely.

Yeah, I think that may be tricky, given that the sysroot is technically not 
tied to a particular toolchain. You can have multiple toolchains compiling 
against the same sysroot for example.
 
> * new mkspecs file introduction (like
> linux-maemo-scratchbox/native-g++ or something similar). I do not
> think this is a nice way.

Agreed.
 
> Workaround
> The current workaround is to make the packaging scratchbox and native
> builds specific, but it is a bit nasty. I do not have any pragmatic
> workaround that would be better than that for now.

Is your workaround for building inside scratchbox to set the CROSS_COMPILE 
variable to empty, i.e. pass -device-option CROSS_COMPILE="" ?


Simon



More information about the Development mailing list