Compiling Sdl_Sound


Joined
Feb 19, 2005
Messages
162
Age
35
Location
Madrid
Has anyone tried to compile SDL_sound for the Wiz? (specifically, with OGG support via Tremor). Since I couldn't get the official "configure" script to work, I tried using code::blocks and the latest official libraries (the ones that come with the recently released 10.02 SDK). After a few tries it compiled and linked fine (my first attempts didn't link correctly and returned "symbol lookup errors"). I could see my example program starting on Qtopia's terminal and output some preliminary debug messages, but then it'd exit on this error:

Code:
*** glibc detected *** malloc(): memory corruption: 0x000bd840 ***

The same program runs fine on the PC.

I had to change a couple of lines in the source code so it'd use libivorbis (fixed point Vorbis implementation, it comes preinstalled in the Wiz) instead of the standard libvorbis which SDL_sound uses on the PC. Maybe those changes broke something, I don't know. Would this be worth debugging? I mean, I come from a Java background and I'm still catching up, so maybe the problem is a bit advanced for me yet.

If anyone has tried compiling SDL_sound with OGG support and is willing to share their findings (and, why not, binaries and sources :p ), I'd be grateful. I know this same library was ported to the GP2X but I only found the binaries (I'd have to ask the authors for the code) and they don't seem to come with OGG support (or at least I didn't see anything relevant with readelf).
 
Segata Sanshiro said:
Has anyone tried to compile SDL_sound for the Wiz? (specifically, with OGG support via Tremor). Since I couldn't get the official "configure" script to work, I tried using code::blocks and the latest official libraries (the ones that come with the recently released 10.02 SDK). After a few tries it compiled and linked fine (my first attempts didn't link correctly and returned "symbol lookup errors"). I could see my example program starting on Qtopia's terminal and output some preliminary debug messages, but then it'd exit on this error:

Code:
*** glibc detected *** malloc(): memory corruption: 0x000bd840 ***

The same program runs fine on the PC.

I had to change a couple of lines in the source code so it'd use libivorbis (fixed point Vorbis implementation, it comes preinstalled in the Wiz) instead of the standard libvorbis which SDL_sound uses on the PC. Maybe those changes broke something, I don't know. Would this be worth debugging? I mean, I come from a Java background and I'm still catching up, so maybe the problem is a bit advanced for me yet.

If anyone has tried compiling SDL_sound with OGG support and is willing to share their findings (and, why not, binaries and sources :p ), I'd be grateful. I know this same library was ported to the GP2X but I only found the binaries (I'd have to ask the authors for the code) and they don't seem to come with OGG support (or at least I didn't see anything relevant with readelf).

Be aware there may be alignment issues with SDL_sound. Try running with
echo 2 > /proc/cpu/alignment
You can also use gdb from the gp2x (if you see pthread errors just hit 'c'
 
Last edited by a moderator:
Thanks, that seems to have worked :) I'm now getting another error though:

Code:
./2DTutorial.gpe: /lib/libvorbisidec.so.1: no version information available (required by ./libSDL_sound.so)
Aborted

I didn't find anything relevant related to versions and such in the source code. How could I fix it?
 
Segata Sanshiro said:
Thanks, that seems to have worked :) I'm now getting another error though:

Code:
./2DTutorial.gpe: /lib/libvorbisidec.so.1: no version information available (required by ./libSDL_sound.so)
 Aborted

I didn't find anything relevant related to versions and such in the source code. How could I fix it?

is libvorbisidec.so.1 in the same folder as your binary 2DTutorial.gpe?
The abort may not be related to the library message, ive seen that message and had ill effects. I would use gdb and set a breakpoint at main and see if you get there and if so how far can you run until the abort occurs
 
Last edited by a moderator:
Pickle said:
Segata Sanshiro said:
Thanks, that seems to have worked :) I'm now getting another error though:

Code:
./2DTutorial.gpe: /lib/libvorbisidec.so.1: no version information available (required by ./libSDL_sound.so)
 Aborted

I didn't find anything relevant related to versions and such in the source code. How could I fix it?

is libvorbisidec.so.1 in the same folder as your binary 2DTutorial.gpe?


It wasn't, I moved it there and it now works great, thank you :) My SDL_sound port crackles and segfaults but that's another story :p The program starts and runs fine, which was the point, so I'll now try debugging SDL_sound, although it doesn't seem like an easy task. Thanks again.

(If anyone is working on an SDL_sound port with OGG support I'll be glad to hear about it).
 
Last edited by a moderator:
Segata Sanshiro said:
Pickle said:
Segata Sanshiro said:
Thanks, that seems to have worked :) I'm now getting another error though:

Code:
./2DTutorial.gpe: /lib/libvorbisidec.so.1: no version information available (required by ./libSDL_sound.so)
  Aborted

I didn't find anything relevant related to versions and such in the source code. How could I fix it?

is libvorbisidec.so.1 in the same folder as your binary 2DTutorial.gpe?


It wasn't, I moved it there and it now works great, thank you :) My SDL_sound port crackles and segfaults but that's another story :p The program starts and runs fine, which was the point, so I'll now try debugging SDL_sound, although it doesn't seem like an easy task. Thanks again.

(If anyone is working on an SDL_sound port with OGG support I'll be glad to hear about it).

you could always use vorbis directly
 
Last edited by a moderator:
Back
Top