[Development] Issues with cross-compilation

Jon Trulson jon at radscan.com
Thu Mar 22 20:22:28 CET 2012


On Thu, 22 Mar 2012, Pierre Vorhagen wrote:

> Hello,
>
> I have had 2 issues with cross-compilation of Qt 5 to an ARM board, that
> I have not found clean solutions for.
>
> 1. For libbootstrap, qmake seems to pick up the cross-compiler, instead
> of the one of the development system. This results in failure when said
> library is seen to be in the wrong format.
>
> Adding "QMAKE_CC = gcc" in bootstrap.pro fixes this. However, that is
> not a very clean solution, and I was wondering if this happened to
> anyone else, or if it could be a bug somewhere. In any case, I'm quite
> sure that there must be another solution...
>

I too do daily corss-compiles on arm with qt5.  I have only seen the
problem you describe when I set QMAKESPEC to the arm mkspec I use.  I
would recommend not using that at all for a cross compile.  You should
not need it.

> 2. When configuring with a -prefix specific to my target system, I
> install qtbase with INSTALL_ROOT=<some_development_directory>, so that I
> can continue building other modules, and possibly tweak the current qt
> installation before putting it onto the actual board, at the location
> configured with -prefix. However, that results in the mkspec not being
> found, which can be resolved by setting QMAKESPEC but then fails when
> not finding syncqt.
>

I have not seen this - but then I do not use INSTALL_ROOT.  I install
directly to the configured target (-prefix and -prefix-install)
a;ways.  Easy enough to remove and regenerate if I need to.

[...]
> A 3rd issue would be the one I am currently on, that is hardfloat config
> test now failing when trying to build qtjsbackend, although I've built a
> functional Qt5 before, with the same toolchain... that would need more
> investigating on my part though, but if someone knows  how to resolve
> it, I would save some time. :)
>

Previously I had a somewhat nasty hack working around the HARDFLOAT
issue on my board.  The fix (0b1bc97509c34881b1ee2f3bc7283a5772be9a44)
for qtjsbackend solved that problem for me.  Haven't had a problem
with it since.

Good luck!

-- 
Jon Trulson

"I drank what?!" - Socrates




More information about the Development mailing list