gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > devkitARM linker error

#36866 - neon - Wed Mar 02, 2005 5:47 pm

I'm tring to get some code compiled with devkitARM under OS X

This is my test.c file:
Code:
int main() {
        return 0;
}

When i try to compile test.c i get the following error:
Code:
$ arm-elf-gcc -mthumb-interwork -c test.c -o test.o
$ arm-elf-gcc -mthumb-interwork -specs=gba.specs test.o -o test.elf
/Users/neon/devkitARM_r11/projects/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/bin/ld:/Users/neon/devkitARM_r11/projects/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/lib/gba_cart.ld:262: parse error
collect2: ld returned 1 exit status


Any idea?

#36909 - wintermute - Thu Mar 03, 2005 10:45 am

my apologies. It looks like the build on SF compile farm caused some problems, I'll fix this asap.

In the meantime you can fix things by grabbing the latest buildscripts from http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=124206&release_id=309873

extract the archive and use the following commands

Code:

$cd <path to>/buildscripts
$export INSTALLDIR=<path to>/devkitARM
$dka-scripts/build-crtls.sh

#36912 - neon - Thu Mar 03, 2005 1:00 pm

Thank you. It works... ;)

btw i don't know if it's only my system but...
make doesn't find arm-elf-gcc (~/devkitARM_r11/bin is in $PATH)
Code:
$ dka-scripts/build-crtls.sh
arm-elf-gcc  -marm -c gba_crt0.s -ogba_crt0.o
make: arm-elf-gcc: Command not found
make: *** [all] Error 127


if i try to compile libs manually:
Code:
$ arm-elf-gcc  -marm -c gba_crt0.s -ogba_crt0.o
/usr/libexec/gcc/darwin/ppc/as: I don't understand 'm' flag!
/usr/libexec/gcc/darwin/ppc/as: I don't understand 'c' flag!
/usr/libexec/gcc/darwin/ppc/as: I don't understand 'p' flag!
/usr/libexec/gcc/darwin/ppc/as: I don't understand 'u' flag!
/usr/libexec/gcc/darwin/ppc/as: I don't understand '=' flag!
/usr/libexec/gcc/darwin/ppc/as: I don't understand 'a' flag!
[...]

arm-elf-gcc wants to execute "as" and not "arm-elf-as"

Finally i got it working:
Code:
$ arm-elf-as gba_crt0.s -ogba_crt0.o