GP2X Trouble Compiling Duke3d...


cheap-plastic

Still Fresh
Joined
Nov 24, 2005
Messages
49
Location
Belgium
Website
Visit site
I'm trying to compile woogal's Duke3D code. After a bit of struggling, I think I got it to the link-process, but now I'm stuck with this:
Code:
duke3d/source$ make
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o actors.o actors.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o animlib.o animlib.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o control.o control.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o config.o config.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o game.o game.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o gamedef.o gamedef.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o global.o global.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o keyboard.o keyboard.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o menues.o menues.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o player.o player.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o premap.o premap.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o rts.o rts.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o scriplib.o scriplib.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o sector.o sector.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o sounds.o sounds.c
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o fx_man.o fx_man.c
arm-linux-gcc -static actors.o animlib.o control.o config.o game.o gamedef.o global.o keyboard.o menues.o player.o premap.o rts.o scriplib.o sector.o sounds.o fx_man.o buildengine/cache1d.o buildengine/engine.o buildengine/sdl_driver.o buildengine/mmulti.o buildengine/pragmas.o buildengine/unix_compat.o buildengine/a.o -lSDL_mixer -lvorbisidec -L/usr/local/arm-dev/arm-linux/usr/lib -Wl,-rpath,/usr/local/arm-dev/arm-linux/usr/lib -lSDL -lpthread -lm -ldl -L. -lSDL  -o duke3d
buildengine/engine.o: In function `krecipasm':
/home/klaasdc/documenten/c/duke3d/source/buildengine/engine.c:543: undefined reference to `__floatsisf'
buildengine/sdl_driver.o: In function `VBE_setPalette':
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2132: undefined reference to `__floatsisf'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2132: undefined reference to `__addsf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2132: undefined reference to `__extendsfdf2'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2132: undefined reference to `__divdf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2132: undefined reference to `__muldf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2133: undefined reference to `__floatsisf'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2133: undefined reference to `__addsf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2133: undefined reference to `__extendsfdf2'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2133: undefined reference to `__divdf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2133: undefined reference to `__muldf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2134: undefined reference to `__floatsisf'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2134: undefined reference to `__addsf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2134: undefined reference to `__extendsfdf2'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2134: undefined reference to `__divdf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2134: undefined reference to `__muldf3'
buildengine/sdl_driver.o: In function `VBE_getPalette':
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2172: undefined reference to `__floatsisf'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2172: undefined reference to `__addsf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2172: undefined reference to `__extendsfdf2'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2172: undefined reference to `__divdf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2172: undefined reference to `__muldf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2173: undefined reference to `__floatsisf'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2173: undefined reference to `__addsf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2173: undefined reference to `__extendsfdf2'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2173: undefined reference to `__divdf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2173: undefined reference to `__muldf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2174: undefined reference to `__floatsisf'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2174: undefined reference to `__addsf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2174: undefined reference to `__extendsfdf2'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2174: undefined reference to `__divdf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/sdl_driver.c:2174: undefined reference to `__muldf3'
buildengine/a.o: In function `setupslopevlin':
/home/klaasdc/documenten/c/duke3d/source/buildengine/a.c:693: undefined reference to `__floatsisf'
buildengine/a.o: In function `slopevlin':
/home/klaasdc/documenten/c/duke3d/source/buildengine/a.c:708: undefined reference to `__floatsisf'
/home/klaasdc/documenten/c/duke3d/source/buildengine/a.c:708: undefined reference to `__addsf3'
/home/klaasdc/documenten/c/duke3d/source/buildengine/a.c:732: undefined reference to `__addsf3'
collect2: ld returned 1 exit status
make: *** [duke3d] Error 1

I'm using the arm-linux sdk built by the gph_sdk_installer script from the wiki.
Does anyone know how to fix this?
 
The Spider Mastermind posted on Mar 6 2006 at 09:15 AM said:
Can you compile the test programs? It looks like its not linking to SDL properly somewhere along the line. Try reinstalling SDL.

Do you mean the SDL-demo programs on the wiki? They compile fine

theoddbot posted on Mar 6 2006 at 09:19 AM said:
-msoft-float in your CFLAGS and LDFLAGS ??

also, you might have to move -lm after -lSDL, but its not causing this problem.

edit: doh, try -lgcc ??

I've added -msoft-float in the makefile:
Code:
<...>
arm-linux-gcc -c -g -I/usr/local/arm-dev/arm-linux/usr/include/SDL -D_REENTRANT -msoft-float -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -DUSE_EXECINFO=1 -DVOLUMEALL -DCONTROLS_CONFIG_MENU=1 -funsigned-char -DUDP_NETWORKING=1 -fno-strict-aliasing -O2 -o fx_man.o fx_man.c
arm-linux-gcc -static actors.o animlib.o control.o config.o game.o gamedef.o global.o keyboard.o menues.o player.o premap.o rts.o scriplib.o sector.o sounds.o fx_man.o buildengine/cache1d.o buildengine/engine.o buildengine/sdl_driver.o buildengine/mmulti.o buildengine/pragmas.o buildengine/unix_compat.o buildengine/a.o -lSDL_mixer -lvorbisidec -L/usr/local/arm-dev/arm-linux/usr/lib -Wl,-rpath,/usr/local/arm-dev/arm-linux/usr/lib -lSDL -lpthread -lm -ldl -L. -msoft-float -lSDL  -o duke3d
/usr/local/arm-dev/arm-linux/bin/ld: cannot find -lfloat
collect2: ld returned 1 exit status
make: *** [duke3d] Error 1

and with -lgcc I get the same "undefined reference" again :(
 
Last edited by a moderator:
Not sure if this will help, but I'm using a crossdev environment built with ooPo's script, and I don't have problems compiling duke3d with soft float. Maybe the script you use did not compile gcc with it?

FWIW, ooPo's script uses this configure line for gcc:
Code:
./configure --prefix=$GP2XDEV --target=\$target --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-shared --enable-c99 --enable-__cxa_atexit --enable-cxx-flags=-mcpu=arm920t --enable-languages='c,c++' --enable-long-long --enable-symvers=gnu --enable-threads=posix --with-cpu=arm920t --with-float=soft
You may be missing the "--with-float=soft" line

I'm toying with duke2x compilation myself to get rid of it trying to write to /mnt/tmp (bad idea when the root filesystem is read-only ;) ), but I'm stuck with the "sound playing too fast on fw 1.4" problem (and no midi either for now...)
 
Voyageur posted on Mar 6 2006 at 07:05 PM said:
Not sure if this will help, but I'm using a crossdev environment built with ooPo's script, and I don't have problems compiling duke3d with soft float. Maybe the script you use did not compile gcc with it?

FWIW, ooPo's script uses this configure line for gcc:
Code:
./configure --prefix=$GP2XDEV --target=\$target --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-shared --enable-c99 --enable-__cxa_atexit --enable-cxx-flags=-mcpu=arm920t --enable-languages='c,c++' --enable-long-long --enable-symvers=gnu --enable-threads=posix --with-cpu=arm920t --with-float=soft
You may be missing the "--with-float=soft" line

I'm toying with duke2x compilation myself to get rid of it trying to write to /mnt/tmp (bad idea when the root filesystem is read-only ;) ), but I'm stuck with the "sound playing too fast on fw 1.4" problem (and no midi either for now...)

I'm compiling it for the same reason :D Anyway, I'm now building the whole toolchain with ooPo's perl script, but it's taking hours on this machine :lol:
 
Last edited by a moderator:
I've never seen those errors before so I'm afraid I can't help you. They do certainly look like they've got something to do with soft-float though.

Anyway, I've already fixed the /mnt/tmp problem (fixed it last week without realising - only switched to theoddbots cramfs kernel a couple of days ago) and the sound still seems normal speed on 1.4, but I've broken something else while trying to fix saves so I can't release it just yet. I'm going to take a look now and see if I can fix what I broke.
 
Hum, "fixed" the fast song problem... I switched my libmikmod.a with the one from Guyfawkes's pre-compiled libs and it goes fine now...

Woogal, is the source zip on archive.gp2x.de up to date with 0.02? (well 0.03 now as it looks like from your site ;) ). The Mix_LoadMUS goes well, but I can't hear any music (while 0.03 binary does play it without a problem).
Anyway, great great work, playing good old duke3d sure can impress many people around me B)
 
I installed ooPo's newtoolchain from scratch and now I got this:
/usr/local/gp2xdev/bin/gp2x-gcc -static actors.o animlib.o control.o config.o game.o gamedef.o global.
o keyboard.o menues.o player.o premap.o rts.o scriplib.o sector.o sounds.o fx_man.o buildengine/cache1
d.o buildengine/engine.o buildengine/sdl_driver.o buildengine/mmulti.o buildengine/pragmas.o buildengi
ne/unix_compat.o buildengine/a.o -lSDL_mixer -lvorbisidec -L/usr/local/gp2xdev/lib -Wl,-rpath,/usr/loc
al/gp2xdev/lib -lSDL -lpthread -L. -lSDL -o duke3d
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `music_internal_position':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:841: undefined reference to `SMPEG_skip'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:830: undefined reference to `Player_SetPosition'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:843: undefined reference to `SMPEG_rewind'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:844: undefined reference to `SMPEG_play'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `music_internal_volume':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:924: undefined reference to `SMPEG_setvolume'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:900: undefined reference to `Player_SetVolume'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `open_music':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:393: undefined reference to `MikMod_InfoDriver'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:397: undefined reference to `MikMod_InfoLoader'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:400: undefined reference to `MikMod_Init'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:401: undefined reference to `MikMod_strerror'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:399: undefined reference to `MikMod_RegisterAllLoad
ers'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `MikMod_RegisterAllDriv
ers'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `md_mode'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `md_mixfreq'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `md_volume'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `md_pansep'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `md_reverb'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `md_device'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `md_musicvolume'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `md_sndfxvolume'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:395: undefined reference to `MikMod_errno'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `music_internal_halt':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:992: undefined reference to `SMPEG_stop'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:968: undefined reference to `Player_Stop'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `music_internal_play':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:750: undefined reference to `SMPEG_enableaudio'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:751: undefined reference to `SMPEG_enablevideo'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:752: undefined reference to `SMPEG_play'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:724: undefined reference to `Player_Start'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `Mix_FreeMusic':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:663: undefined reference to `SMPEG_delete'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:639: undefined reference to `Player_Free'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `music_internal_playing':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:1115: undefined reference to `SMPEG_status'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:1085: undefined reference to `Player_Active'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `music_mixer':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:318: undefined reference to `SMPEG_playAudio'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:232: undefined reference to `VC_WriteBytes'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:277: undefined reference to `VC_WriteBytes'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `Mix_SetSynchroValue':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:1177: undefined reference to `Player_Active'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `Mix_GetSynchroValue':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:1199: undefined reference to `Player_Active'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `close_music':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:1223: undefined reference to `MikMod_Exit'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `MikMod_LoadSongRW':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:1297: undefined reference to `Player_LoadGeneric'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `Mix_LoadMUS_RW':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:1342: undefined reference to `MikMod_strerror'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:1322: undefined reference to `MikMod_errno'
/usr/local/gp2xdev/lib/libSDL_mixer.a(music.o): In function `Mix_LoadMUS':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:568: undefined reference to `SMPEG_new'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:580: undefined reference to `Player_Load'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:573: undefined reference to `SMPEG_actualSpec'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:582: undefined reference to `MikMod_strerror'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/music.c:582: undefined reference to `MikMod_errno'
/usr/local/gp2xdev/lib/libSDL_mixer.a(instrum.o): In function `load_instrument':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/timidity/instrum.c:524: undefined reference to `pow'
/usr/local/gp2xdev/lib/libSDL_mixer.a(mix.o): In function `update_tremolo':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/timidity/mix.c:188: undefined reference to `sin'
/usr/local/gp2xdev/lib/libSDL_mixer.a(resample.o): In function `update_vibrato':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/timidity/resample.c:349: undefined reference to `sin'
/usr/local/gp2xdev/lib/libSDL_mixer.a(filter.o): In function `designfir':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/timidity/filter.c:88: undefined reference to `sin'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/timidity/filter.c:92: undefined reference to `log'
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/timidity/filter.c:92: undefined reference to `exp'
/usr/local/gp2xdev/lib/libSDL_mixer.a(filter.o): In function `kaiser':
/home/klaasdc/newtoolchain/SDL_mixer-1.2.6/timidity/filter.c:70: undefined reference to `sqrt'
collect2: ld returned 1 exit status
make: *** [duke3d] Error 1

I really don't get it. Everything seems to be in place and compiling stuff that doesn't use SDL goes fine...
 
Voyageur posted on Mar 6 2006 at 11:21 PM said:
Woogal at is the source zip on archive.gp2x.de up to date with 0.02? (well 0.03 now as it looks like from your site ;) ).
The source on the archive is 0.02 (still need to get it updated to 0.03).

cheap-plastic posted on Mar 8 2006 at 04:42 PM said:
I really don't get it. Everything seems to be in place and compiling stuff that doesn't use SDL goes fine...
The version of SDL_Mixer you're using looks like it needs the other libs to be supplied too. You'll have to find out what they're called (-lmikmod is probably one of them, don't know the syntax for smpeg or anything else you might need). You're also missing -lm.
 
Last edited by a moderator:
Yes, getting the right -lxx can get funny when static-compiling. This one may have a few things that are unnecessary, but it works :)
Code:
gp2x-gcc -static actors.o animlib.o control.o config.o game.o gamedef.o global.o keyboard.o menues.o player.o premap.o rts.o scriplib.o sector.o sounds.o fx_man.o buildengine/cache1d.o buildengine/engine.o buildengine/sdl_driver.o buildengine/mmulti.o buildengine/pragmas.o buildengine/unix_compat.o buildengine/a.o -lSDL_mixer -lvorbisidec -static -L/usr/local/gp2xdev/lib -Wl,-rpath,/usr/local/gp2xdev/lib -lSDL -lpthread -lm -ldl -lmikmod -lsmpeg -lm -L. -lSDL  -o duke3d
derived fro my makefile:
Code:
SDL_LDFLAGS := -static $(shell $(GP2XDEV)/bin/sdl-config --static-libs) -lmikmod -lsmpeg -lm -L.

btw, my midi problem came from the timidity.cfg that somehow ended up with dos line endings. A dos2unix later, everything works now B)
 
Voyageur posted on Mar 8 2006 at 07:07 PM said:
Yes, getting the right -lxx can get funny when static-compiling. This one may have a few things that are unnecessary, but it works :)
Code:
gp2x-gcc -static actors.o animlib.o control.o config.o game.o gamedef.o global.o keyboard.o menues.o player.o premap.o rts.o scriplib.o sector.o sounds.o fx_man.o buildengine/cache1d.o buildengine/engine.o buildengine/sdl_driver.o buildengine/mmulti.o buildengine/pragmas.o buildengine/unix_compat.o buildengine/a.o -lSDL_mixer -lvorbisidec -static -L/usr/local/gp2xdev/lib -Wl,-rpath,/usr/local/gp2xdev/lib -lSDL -lpthread -lm -ldl -lmikmod -lsmpeg -lm -L. -lSDL  -o duke3d
derived fro my makefile:
Code:
SDL_LDFLAGS := -static $(shell $(GP2XDEV)/bin/sdl-config --static-libs) -lmikmod -lsmpeg -lm -L.

btw, my midi problem came from the timidity.cfg that somehow ended up with dos line endings. A dos2unix later, everything works now B)

It worked :D Thank you!
 
Last edited by a moderator:
Back
Top