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.

DS development > libmad compilation problem

#79972 - Freixa - Mon Apr 17, 2006 9:21 pm

Hi!

I need a mp3 lib for nds and I think libmad will be good for it, it can be compiled to ARM and some people in this forum spoke well about it. But I can't install the lib, I try to compile it but i can't. I run the configuration script a few times with a few diferent arguments, like ./configure --host=arm, ./configure --enable-fpm=arm, etc... The configure script goes ok, but when I try to execute the Makefile I recived this errors:

synth.c: In function `dct32':
synth.c:218: warning: asm operand 5 probably doesn't match constraints
synth.c:218: warning: asm operand 6 probably doesn't match constraints
(...)
synth.c:218: inconsistent operand constraints in an `asm'
synth.c:219: inconsistent operand constraints in an `asm'
(...)
synth.c: In function `synth_full':
synth.c:611: warning: asm operand 3 probably doesn't match constraints
synth.c:611: warning: asm operand 4 probably doesn't match constraints
(...)
synth.c: In function `synth_half':
synth.c:748: warning: asm operand 3 probably doesn't match constraints
synth.c:748: warning: asm operand 4 probably doesn't match constraints

Anyone knows what I'm doing wrong?

Thnxs a lot and sorry for my bad english.
freixa


Last edited by Freixa on Mon Apr 17, 2006 10:12 pm; edited 1 time in total

#79979 - tepples - Mon Apr 17, 2006 10:07 pm

It may have something to do with subtle changes in inline assembly language syntax between GCC versions.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#81056 - FluBBa - Wed Apr 26, 2006 10:57 pm

Freixa wrote:

synth.c: In function `dct32':
synth.c:218: warning: asm operand 5 probably doesn't match constraints
synth.c:218: warning: asm operand 6 probably doesn't match constraints

Not sure but it sounds like it's for a little more advanced ARM than the one in the DS?
_________________
I probably suck, my not is a programmer.

#81084 - josath - Thu Apr 27, 2006 1:09 am

Try compiling it and disabling the optimized ASM. I'm pretty sure it includes C code for all the algorithms, which should work, but possibly be a bit slower.

#81751 - Freixa - Mon May 01, 2006 9:15 pm

Thnxs to all!

Well, I think the problem was in the version of GCC like tepples said, I tried other versions and it compiles ok, but when I try to call any function of the library the program hang. The program hangs with any function of the lib, I tried to compile with other flags and with no optimization but it hangs again. It hangs in Dualis and in the DS too.

Any suggestions???

Thnxs in advance
freixa

#81757 - dovoto - Mon May 01, 2006 10:05 pm

Well, i never had a configurable make file work out well for me on consoles...when i ported libmad a long while back the the DS i just stole the makefile out of libnds and modified it a bit.

I was able to get non-realtime playback of mp3's going with only a couple of hours of work (ie i decompressed to a buffer then played the buffer although it seemed to decompress slightly faster than it took to play back the sample which bodes well for implementing some sort of cyclic buffer).

I still have the package at home (i think) but it was several versions of devkitarm ago...may even have been before ndslib was libnds and before devkitarm had any ds support...i will look though and post it if i find it...may even try to fix it first.
_________________
www.drunkencoders.com

#83327 - wintermute - Mon May 15, 2006 4:37 pm

I had a look at this earlier, it configured and built just fine. The configure command was as follows, run from an msys shell with devkitarm in the path.

Code:

CFLAGS=-mthumb-interwork LDFLAGS=-specs=ds_arm9.specs ../../libmad-0.15.1b/configure --host=arm-elf --enable-speed --enable-fpm=arm

_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog