Started by nicholas on utilitybasenicholas
Posted: 2007-Apr-17 23:19:05 · Edited by: nicholas
I'm new to this so don't shout! ;-)
I am trying to cross-compile an SDL C++ Linux program to MorphOS, I have installed the Linux x86 crosscompiler and SDK from zerohero.se and have also copied the PowerSDL SDK to the relevant directories.
I run the configure script with: CC=/usr/local/amiga/bin/ppc-morphos-gcc CXX=/usr/local/amiga/bin/ppc-morphos-g++ ./configure --libdir=/usr/local/amiga/ppc-morphos/lib/ --includedir=/usr/local/amiga/ppc-morphos/include/ --bindir=/usr/local/amiga/ppc-morphos/bin/ --target=powerpc-unknown-morphos --host=powerpc-unknown-morphos
So far so good, the only error I get is:
checking whether argument type for signal handlers is "int"... configure: error: cannot run test program while cross compiling"
Which I don't think is anything to worry about for the moment.
I then run make with:
CC=/usr/local/amiga/bin/ppc-morphos-gcc CXX=/usr/local/amiga/bin/ppc-morphos-g++ make
Which plods along nicely compiling the relevant source files then finishes with no errors displayed.
Only problem is the resulting executable is an x86 Linux program.
Obviously I've missed something out, but what?
Thanks in advance,
Posted: 2007-Apr-18 07:40:44
I'm not completly sure, but the host parameter shoudl't it be something like i386-linux-gnu. Because that's your host system where you compile?
I would suggest trie out to change it.
Posted: 2007-Apr-18 17:52:13
Why dont you configure/compile in MorphOS?
Posted: 2007-Apr-18 22:06:33
Why don't I configure/compile in MorphOS?
Well, I could do (and have LOL) but I'm trying to learn how to cross compile. No particular reason other than I just fancied learning something new.
Posted: 2007-Apr-19 09:27:27
nicholas I think the problem you have is that the configure script is trying to execute a compiled program to configure something (reading from the output you quoted it seems it tried to know if signal handlers takes an int argument or not). For this particular project you won't be able to cross-compile because there is no solution : either you are compiling a PPC program but then configure script won't be able to determine the argument, either ou are compiling a X86 program but then you won't be able to execute the resulting executable on MOS.
You have two solution either you compile on MOS, either you tweak the configure script to skip this part.
Posted: 2007-Apr-19 09:42:50
it's common that like balaban says, programs try to execute things locally to check for features an similar.
However, once the script is aware that you are cross compiling, there is a chance that it will ignore errors and continue. Setting an explicit --build=i686-linux or similar might help, similar to what mightymax suggested.
If this doesn't work, please paste entire output and/or config.log for instance here: http://utilitybase.com/paste