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.

Audio > Problems compiling Krawall under Linux

#24224 - FireOut - Fri Jul 30, 2004 1:42 am

Greetings,

I am currently developing a game under Linux along with 2 friends. Since a real musician will be composing the music, we decided to use Krawall for music since it has great sound quality as well as support for sfx and different file formats (CPU usage is not much of a problem for our game).

Well, here is the problem: I always compiled Krawall just fine under Windows, the example included in its free distribution works great. (with Devkitadv R4 or R5)

Under Linux, we couldn't compile anything audible, as much as we tried to tweak everything up.

We compiled our devkit following the steps provided in http://linux.gbadev.org/gcc-gba/ . It does work great for our soundless code ;), the compiled roms run on real hardware just fine.

Well, we tried swapping lnkscript's and crt0's but that didn't seem to do the trick. We could generate a .bin file in the end, but it just shows a flat white screen.

I compared both the Windows working compiled code and the Linux crappy compiled code, the files generated in the modules/ directory are the same. The .elf and .bin are obviously different.

Here are the warnings we get from the "free Krawall" example/Makefile under Linux:

Quote:

arm-thumb-elf-as -mthumb-interwork -marm7tdmi crt0.s -o crt0.o
arm-thumb-elf-gcc -c -O2 -mthumb-interwork -Wall -ffreestanding -I../include/ main.c -o main.o
arm-thumb-elf-gcc -mthumb -mthumb-interwork -Tlnkscript -nostartfiles -o example.bin.elf crt0.o main.o ../gcclib/krawall.lib modules/modules.lib
ld: Warning: _divsi3.o does not support interworking, whereas example.bin.elf does not
ld: Warning: _dvmd_tls.o does not support interworking, whereas example.bin.elf does not
ld: Warning: _call_via_rX.o does not support interworking, whereas example.bin.elf does not
ld: Warning: __main.o does not support interworking, whereas example.bin.elf does not
ld: Warning: _ctors.o does not support interworking, whereas example.bin.elf does not
ld: Warning: unwind-dw2-fde.o does not support interworking, whereas example.bin.elf does not
ld: Warning: atexit.o does not support interworking, whereas example.bin.elf does not
ld: Warning: bzero.o does not support interworking, whereas example.bin.elf does not
ld: Warning: impure.o does not support interworking, whereas example.bin.elf does not
ld: Warning: libcfunc.o does not support interworking, whereas example.bin.elf does not
ld: Warning: malloc.o does not support interworking, whereas example.bin.elf does not
ld: Warning: mallocr.o does not support interworking, whereas example.bin.elf does not
ld: Warning: memcpy.o does not support interworking, whereas example.bin.elf does not
ld: Warning: mlock.o does not support interworking, whereas example.bin.elf does not
ld: Warning: sbrkr.o does not support interworking, whereas example.bin.elf does not
ld: Warning: strlen.o does not support interworking, whereas example.bin.elf does not
ld: Warning: syscalls.o does not support interworking, whereas example.bin.elf does not
ld: Warning: errno.o does not support interworking, whereas example.bin.elf does not
ld: Warning: findfp.o does not support interworking, whereas example.bin.elf does not
ld: Warning: freer.o does not support interworking, whereas example.bin.elf does not
ld: Warning: fwalk.o does not support interworking, whereas example.bin.elf does not
ld: Warning: memset.o does not support interworking, whereas example.bin.elf does not
ld: Warning: reent.o does not support interworking, whereas example.bin.elf does not
ld: Warning: stdio.o does not support interworking, whereas example.bin.elf does not
ld: Warning: writer.o does not support interworking, whereas example.bin.elf does not
ld: Warning: closer.o does not support interworking, whereas example.bin.elf does not
ld: Warning: fflush.o does not support interworking, whereas example.bin.elf does not
ld: Warning: lseekr.o does not support interworking, whereas example.bin.elf does not
ld: Warning: readr.o does not support interworking, whereas example.bin.elf does not
ld: __main.o(__gccmain): warning: interworking not enabled.
ld: first occurrence: main.o: arm call to thumb



I could compile AAS without much trouble, but I really wanted to use Krawall for the reasons mentioned above.

Is there anything we are doing wrong?
Anyone ever managed to get Krawall running under Linux?

Thank you for reading (or trying to ;) ).

#24236 - wintermute - Fri Jul 30, 2004 7:39 am

That tutorial is missing a rather vital part of the build process for GBA - you need to enable the interworking parts of the multilibs. I'd also recommend not using the source packages specified in that document, they're quite old versions now.

Easiest option is to grab the linux build of devkitARM from http://www.devkit.tk or, if you really want to build it from source, grab the build scripts from the DIY section. The scripts *should* work on most linux variants but you may have a little trouble on BSD systems. I have someone helping to sort that one out so hopefully there'll be a script update soon.

#24245 - FireOut - Fri Jul 30, 2004 3:04 pm

Thanks a lot, wintermute.

We are using Gentoo here, but we don't have root access in our university network (lucky them ;) ).

We actually had tried the devkitARM binaries before but there were some wierd errors, so I had completely ignored it. I just compiled it using the (pretty impressive) script in DIY you suggested, and it worked great.

Three guys are really grateful here, thank you again.