forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compiling SuperTux

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
_MakeFile_



Joined: 05 Jan 2006
Posts: 15

PostPosted: Thu Jan 05, 2006 10:50 am    Post subject: Compiling SuperTux Reply with quote

Has anyone tried to compile the game SuperTux? I have tried several times with no luck. Here is the source code for the game.
http://www.dcemu.co.uk/vbulletin/attachment.php?attachmentid=2168
You have to have PSPSDK and SDL_Mixer installed in your Cygwin enviroment and SDL package installed as well which I do all. These are the errors I am getting when compiling the game...

/usr/local/pspdev/psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_getsome'
:
/home/Owner/trunk/sdl_mixer/music_ogg.c:161: undefined reference to `ov_read'
/home/Owner/trunk/sdl_mixer/music_ogg.c:173: undefined reference to `ov_info'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_delete':

/home/Owner/trunk/sdl_mixer/music_ogg.c:237: undefined reference to `ov_clear'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_jump_to_
time':
/home/Owner/trunk/sdl_mixer/music_ogg.c:245: undefined reference to `ov_time_see
k'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(load_ogg.o): In function `Mix_LoadOGG_R
W':
/home/Owner/trunk/sdl_mixer/load_ogg.c:93: undefined reference to `ov_open_callb
acks'
/home/Owner/trunk/sdl_mixer/load_ogg.c:93: undefined reference to `ov_open_callb
acks'
/home/Owner/trunk/sdl_mixer/load_ogg.c:101: undefined reference to `ov_info'
/home/Owner/trunk/sdl_mixer/load_ogg.c:112: undefined reference to `ov_pcm_total
'
/home/Owner/trunk/sdl_mixer/load_ogg.c:124: undefined reference to `ov_read'
/home/Owner/trunk/sdl_mixer/load_ogg.c:130: undefined reference to `ov_read'
/home/Owner/trunk/sdl_mixer/load_ogg.c:140: undefined reference to `ov_clear'
collect2: ld returned 1 exit status
make: *** [SuperTux.elf] Error 1

Owner@scu ~/supertux1/src
$

Can anyone help? I would really appriciate it. Thanks
Back to top
View user's profile Send private message
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Thu Jan 05, 2006 11:06 am    Post subject: Reply with quote

are you linking against libogg or libtremor or whichever library provides t ogg decoding?
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
_MakeFile_



Joined: 05 Jan 2006
Posts: 15

PostPosted: Thu Jan 05, 2006 11:12 am    Post subject: Reply with quote

I am linking against libtremor because that is the default lib that SDL_Mixer uses when compiling the SDL_Mixer library. This is the configuration I used when compiling SDL_Mixer
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --with-sdl-prefix=`psp-config --psp-prefix` \
--disable-music-mp3 --prefix=`psp-config --psp-prefix`
Should I change something?
Thanks
Back to top
View user's profile Send private message
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Thu Jan 05, 2006 11:18 am    Post subject: Reply with quote

Seems to me that the sdl code cant find the ogg decoder.
Perhaps the link order in the makefile is incorrect? I dont have specific experience with sdl...
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
_MakeFile_



Joined: 05 Jan 2006
Posts: 15

PostPosted: Thu Jan 05, 2006 11:21 am    Post subject: Reply with quote

Perhaps. I will try to look over the makefile and maybe recompile my librabries again. Thanks for replying.
Back to top
View user's profile Send private message
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Thu Jan 05, 2006 11:24 am    Post subject: Reply with quote

I was actually leaning more to how you are compiling the app, all libs *should* be fine.

Is -ltremor before -lsdl in the makefile for your application?
Even tho you compiled sdl against tremor, I dont know if the actual code was pulled in (looks like no) so you'd need to link tremor and sdl when building the game.
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
_MakeFile_



Joined: 05 Jan 2006
Posts: 15

PostPosted: Fri Jan 06, 2006 5:40 am    Post subject: Reply with quote

I am still not able to compile this game. I ahve been trying for a long time also. Here is what the make file says that is included in the source code. Maybe someone can try to compile this game and let me know how it went.

Makefile

__cplusplus=1
PSP=1
SRCPATH = ./
PSPSDK = $(shell psp-config --pspsdk-path)
PSPLIBSDIR = $(PSPSDK)/..
TARGET = SuperTux
OBJS = badguy.o bitmask.o button.o collision.o configfile.o intro.o
OBJS += gameloop.o globals.o high_scores.o level.o leveleditor.o lispreader.o
OBJS += menu.o particlesystem.o physic.o player.o scene.o screen.o setup.o
OBJS += sound.o special.o supertux.o text.o texture.o timer.o title.o
OBJS += type.o world.o worldmap.o tile.o mousecursor.o resources.o gameobjs.o
OBJS += sprite.o sprite_manager.o music_manager.o musicref.o
OBJS += progress.o
LIBS = -lstdc++ -lc -lSDLmain -lSDL_ttf -lSDL_mixer -lSDL_gfx -lSDL_image -lz -lpng -lgl -ljpeg

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = SuperTux

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
ASFLAGS = $(CFLAGS)

PSPBIN = $(PSPSDK)/../bin
CFLAGS += `$(PSPBIN)/sdl-config --cflags`
LIBS += `$(PSPBIN)/sdl-config --libs`
include $(PSPSDK)/lib/build.mak

I appriciate any help. Thank you
Back to top
View user's profile Send private message
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Fri Jan 06, 2006 8:56 am    Post subject: Reply with quote

Ok, well, like I said Im not sure on the exact details of linking and the ogg functions (ov_read, etc) may not have been pulled from libtremor into libsdl when you build that. Maybe it should, maybe it had, i don't know but thats how it looks to me.


_MakeFile_ wrote:
LIBS = -lstdc++ -lc -lSDLmain -lSDL_ttf -lSDL_mixer -lSDL_gfx -lSDL_image -lz -lpng -lgl -ljpeg
Perhaps should be
Code:
LIBS = -lstdc++ -lc -ltremor -lSDLmain -lSDL_ttf -lSDL_mixer -lSDL_gfx -lSDL_image -lz -lpng -lgl -ljpeg

Might not fix it, but is definately something I would try if it were me trying to compile this.
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
_MakeFile_



Joined: 05 Jan 2006
Posts: 15

PostPosted: Fri Jan 06, 2006 10:42 am    Post subject: Reply with quote

I tried changing that also in my makefile. I still get the same errors. I think the errors are coming from my SDL_Mixer folder when I complied it in my trunk. I am going to try to redownload the SDL_Mixer folder from subversion again and recompile everything all over again and see if that helps. I posted the source code link for the game Supertux that I am trying to compile so that if anyone wants to try to compile it and see if they can compile it with no errors, let me know. Thanks
Back to top
View user's profile Send private message
_MakeFile_



Joined: 05 Jan 2006
Posts: 15

PostPosted: Mon Jan 16, 2006 10:57 am    Post subject: Reply with quote

I solved the problem. SDL_mixer has to be linked to lib vorbis. It finally now compiles. I also fixed this problem with abrick from the pspware repository. Before abrick could not be compiled because SDL_mixer wasn't linked right. I uploaded a new makefile for abrick to svn and now you all should be able to compile abrick and play it on your psp. Thanks for your help cheriff
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group