Cross Compile Linux App


michu

Still Fresh
Joined
Mar 6, 2006
Messages
60
Website
www.neophob.com
hey all

well i using the gp2x usb-over-serial "tool", so im able to connect my gp2x via terminal. i think midnight commander would be great for browsing arround on your gp2x...

ive installed devkit pro (im using win-xp), and im abel to compile some example codes... but how do i compile applications, that need ./configure?

when i run ./configre, i get this messages:

sh-2.04$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

so 1 question:
-i686-pc-mingw32 is the wrong target, as i would like to compile for arm arch.

the path env. variable should be right (minigw and devkit arm are in path):
PATH=c:\_TOOLS\_gp2xdev\bin;c:\_TOOLS\_gp2xdev\arm-linux\bin;C:\_TOOLS\_gp2xdev\minsys\bin

any hints?

regards
michu
 
hey oddbot, thanks for your reply.. well i just reinstalled devkitpro v1.2.7 to be sure that everything is clean...

so the command:
C:\_download\gp2x\mc\mc-4.6.1>sh
sh-2.04$ CC=arm-elf-gcc ./configure --host=arm-linux --disable-shared --prefix=/c/devkitPro/devkitARM
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-linux-strip... no
checking for strip... :
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-mingw32
checking host system type... arm-unknown-linux
checking for style of include used by make... GNU
checking for arm-linux-gcc... arm-elf-gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables

does not succeed, as written in the config.log:
...
configure:2284: checking for C compiler default output file name
configure:2287: arm-elf-gcc conftest.c >&5
c:\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: crt0.o: No such file: No such file or directory

any hints, where i can find the arm crt0.o ? or im complete wrong?

thanks for any hints
michu
 
ok.. i know now from #gp2xdev that some tools are not compatible with cross compiling.. too bad! someone allready portet glib1.2*/glib2.0? they need to be compiled on the gp2x itself, but as long as i dont have a psu, this is not fun ;)

im trying to compile midnight commander (mc), so its easier to use the serial interface.. but mc need glibc...

someone allready did that job?

cheers
 
i did 2 mistakes

nr1) i was using devkit pro = no support atm for gp2x

nr2) those crosscompile errors means you need to compile this stuff on the gp2x itself

thanks anyway!

and btw, the lama song kicks ass!
 
michu posted on Mar 8 2006 at 12:49 PM said:
i did 2 mistakes

nr1) i was using devkit pro = no support atm for gp2x

nr2) those crosscompile errors means you need to compile this stuff on the gp2x itself

thanks anyway!

and btw, the lama song kicks ass!
I compiled glib1.2 for gp2x using ooPo's toolchain. What I did was install andlinux(thats really easy but if you are using linux, you wont need this), then installed ooPo's toolchain using his perl script (thats easy too, I wanted to use ooPo's toolchain cause he had Paeryn's hardware accelerated SDL libs and he was updating the files regularly). Followed the instructions in readme file from oopo's toolchain on glib1.2 and mc4.6.1 (The readme file tells you how to do ./configure --prefix= ... ). Had to make some slight modifications. But you dont need to compile on gp2x itself. The most difficult thing I manged to compile so far was BasiliskII which had to run some programs during the compilation to generate some files, the compile those files and then link everything together. I used qemu-arm for that (manually changed the make file so that intead of running "build68k" I set it to run "qemu-arm build68k"
I've uploaded the modified source code for glib1.2, mc 4.6.1 BasiliskII1.0 on www.gp2x.de archive.
 
Last edited by a moderator:
Back
Top