We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 832

Summary: SDL_mixer-1.2.9 not yet building on Haiku
Product: SDL_mixer Reporter: Scott McCreary <scottmc2>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86   
OS: BeOS   
Attachments: patch to fix load_flac.c and music_flac.c for gcc2 builds

Description Scott McCreary 2009-10-08 13:02:48 UTC
I'm now getting further into the build.  I had to patch load_flac.c and music_flac.c and it's picking up an unneeded -lc somehwere, but removing that I can get as far as playwave, but then run into this, which seems to indicate that it's not picking up the SDL_mixer.h file maybe?

~/develop/sdl-mixer> make
/bin/sh ./libtool --mode=compile gcc -g -O2  -D_GNU_SOURCE=1 -I/boot/common/include/SDL -D_GNU_SOURCE=1 -DCMD_MUSIC -DWAV_MUSIC -DMOD_MUSIC -I/boot/common/include -pthread -D_REENTRANT -DMOD_DYNAMIC=\"libmikmod.so.3\" -DMID_MUSIC -DUSE_TIMIDITY_MIDI -I./timidity -DOGG_MUSIC -DOGG_DYNAMIC=\"libvorbisfile.so.3\" -DFLAC_MUSIC -DFLAC_DYNAMIC=\"libFLAC.so.8\" -DMP3_MUSIC -I/boot/common/include -I/boot/common/include/smpeg -I/boot/common/include/SDL -D_GNU_SOURCE=1  -c playwave.c -o build/playwave.lo
libtool: compile:  gcc -g -O2 -D_GNU_SOURCE=1 -I/boot/common/include/SDL -D_GNU_SOURCE=1 -DCMD_MUSIC -DWAV_MUSIC -DMOD_MUSIC -I/boot/common/include -pthread -D_REENTRANT -DMOD_DYNAMIC=\"libmikmod.so.3\" -DMID_MUSIC -DUSE_TIMIDITY_MIDI -I./timidity -DOGG_MUSIC -DOGG_DYNAMIC=\"libvorbisfile.so.3\" -DFLAC_MUSIC -DFLAC_DYNAMIC=\"libFLAC.so.8\" -DMP3_MUSIC -I/boot/common/include -I/boot/common/include/smpeg -I/boot/common/include/SDL -D_GNU_SOURCE=1 -c playwave.c  -DPIC -o build/.libs/playwave.o
gcc: unrecognized option `-pthread'
libtool: compile:  gcc -g -O2 -D_GNU_SOURCE=1 -I/boot/common/include/SDL -D_GNU_SOURCE=1 -DCMD_MUSIC -DWAV_MUSIC -DMOD_MUSIC -I/boot/common/include -pthread -D_REENTRANT -DMOD_DYNAMIC=\"libmikmod.so.3\" -DMID_MUSIC -DUSE_TIMIDITY_MIDI -I./timidity -DOGG_MUSIC -DOGG_DYNAMIC=\"libvorbisfile.so.3\" -DFLAC_MUSIC -DFLAC_DYNAMIC=\"libFLAC.so.8\" -DMP3_MUSIC -I/boot/common/include -I/boot/common/include/smpeg -I/boot/common/include/SDL -D_GNU_SOURCE=1 -c playwave.c -o build/playwave.o >/dev/null 2>&1
/bin/sh ./libtool --mode=link gcc -o build/playwave build/playwave.lo -I/boot/common/include/SDL -D_GNU_SOURCE=1 -L/boot/common/lib -lSDL build/libSDL_mixer.la
libtool: link: gcc -o build/.libs/playwave build/.libs/playwave.o -I/boot/common/include/SDL -D_GNU_SOURCE=1  -L/boot/common/lib build/.libs/libSDL_mixer.so /boot/common/lib/libSDL.so /boot/common/lib/libiconv.so -lGL -lroot -lbe -lmedia -lgame -ldevice -ltextencoding 
build/.libs/playwave.o: In function `still_playing':
/boot/home/develop/sdl-mixer/playwave.c:152: undefined reference to `Mix_Playing'
build/.libs/playwave.o: In function `CleanUp':
/boot/home/develop/sdl-mixer/playwave.c:276: undefined reference to `Mix_FreeChunk'
/boot/home/develop/sdl-mixer/playwave.c:280: undefined reference to `Mix_CloseAudio'
build/.libs/playwave.o: In function `flip_sample':
/boot/home/develop/sdl-mixer/playwave.c:314: undefined reference to `Mix_QuerySpec'
build/.libs/playwave.o: In function `main':
/boot/home/develop/sdl-mixer/playwave.c:419: undefined reference to `Mix_OpenAudio'
/boot/home/develop/sdl-mixer/playwave.c:423: undefined reference to `Mix_QuerySpec'
/boot/home/develop/sdl-mixer/playwave.c:445: undefined reference to `Mix_LoadWAV_RW'
/boot/home/develop/sdl-mixer/playwave.c:460: undefined reference to `Mix_SetReverseStereo'
/boot/home/develop/sdl-mixer/playwave.c:468: undefined reference to `Mix_PlayChannelTimed'
collect2: ld returned 1 exit status
make: *** [build/playwave] Error 1
~/develop/sdl-mixer>
Comment 1 Scott McCreary 2009-10-08 13:06:29 UTC
Created attachment 403 [details]
patch to fix load_flac.c and music_flac.c for gcc2 builds

not sure this is the optimum fix for this, but it seemed to work on Haiku.  This fixes the two listed files, but I'm not stuck at playwave.c
Comment 2 Sam Lantinga 2009-10-10 03:23:46 UTC
This should be fixed in subversion.

Thanks!