PDA

View Full Version : qmake not executable on buildplatform because it is compiled for the target :(



chriwi
4th December 2007, 09:59
Hello,

I try to crosscompile qtcore or qt-embedded for stlinux (sh4-g++).
Now the configure- or buildprocess always fails with the errormessage ".../qmake: canot execute binary" because qmake wasalready compiled with the sh4-gcc crosscompiler and should be used on the x86 build platform.

wysota
4th December 2007, 11:06
Build Qt for your desktop then as well and use its qmake to generate makefiles for the other platform.

chriwi
4th December 2007, 11:25
Hello Wysota,

I already thougt about this, but I canot imagine that this is the only possibility and canot be the intention of an automatic configuration for a crosscompilation. :(

wysota
4th December 2007, 11:35
I don't really understand... That's a standard procedure with every cross compilation - you need tools that are built for the platform you are compiling on. It's like if you said this is a problem because you have to have the crosscompiler instead of having a single compiler building for all possible platforms and on all possible platforms.

chriwi
4th December 2007, 12:30
Hello wysota,

probably you are right, I am new to crosscompilation or at least to crosscompilation where you have to build your own tools before I only used Crosscompilers where the complete toolchain cam from the CVS.
I alredy noticed the fact that here alsosome tools have to be build for the system I compile on, I was only starteled that this is not both part of one configure- or makeprocess and that the binaries for the different platforms are not kept apart in differen directories like /bin/host and /bin/trget.

thank you for your help

wysota
4th December 2007, 19:24
probably you are right, I am new to crosscompilation or at least to crosscompilation where you have to build your own tools before I only used Crosscompilers where the complete toolchain cam from the CVS.
Did it come as sources or as binary? If the former, then that's the exact same situation - you need to build a tool from sources for the correct platform. The difference might be that tools you used were meant for a single platform. In case of Qt and friends the same set of sources is meant to work on all platforms.