| View previous topic :: View next topic |
| Author |
Message |
fungos
Joined: 31 Oct 2007 Posts: 41 Location: cwb br
|
Posted: Fri Nov 16, 2007 12:11 pm Post subject: need help: porting library to psp (SDL_mixer problem now) |
|
|
I'm trying to port a library to psp, and I'm getting this error (config.log):
| Code: |
configure:2778: checking for C++ compiler default output file name
configure:2805: psp-g++ -L/home/fungos/dev/psp/dev/psp/sdk/lib -lc -lpspuser conftest.cpp >&5
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_exit.o): In function `_exit':
../../../../../../newlib/libc/sys/psp/libcglue.c:864: undefined reference to `sceKernelSelfStopUnloadModule'
../../../../../../newlib/libc/sys/psp/libcglue.c:871: undefined reference to `sceKernelExitThread'
(... and so on ...)
|
Note: I changed configuire.in and config.sub only (based on the ones from SDL), I just doesn't understand dist tools/files yet, any help is appreciated.
Note2: The library is fully OO and uses SDL and/or OpenGL.
Thanks, I hope I can be able to contribute one great library to psp development.
Bye
Last edited by fungos on Sun Nov 18, 2007 7:49 am; edited 2 times in total |
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Fri Nov 16, 2007 1:06 pm Post subject: |
|
|
| I got a gut feeling you'll have to link more libraries than that. |
|
| Back to top |
|
 |
fungos
Joined: 31 Oct 2007 Posts: 41 Location: cwb br
|
Posted: Sat Nov 17, 2007 12:10 am Post subject: |
|
|
Ok, I found where I was defining that two libraries (lol, my psplibraries own build script....)
I added more libraries until I got stuck here:
| Code: |
configure:2778: checking for C++ compiler default output file name
configure:2805: psp-g++ -L/home/fungos/dev/psp/dev/psp/sdk/lib -lc -lpsplibc -lpspuser -lpspkernel conftest.cpp >&5
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(fdman.o): In function `__psp_fdman_init':
../../../../../../newlib/libc/sys/psp/fdman.c:29: undefined reference to `sceKernelStdin'
../../../../../../newlib/libc/sys/psp/fdman.c:35: undefined reference to `sceKernelStdout'
../../../../../../newlib/libc/sys/psp/fdman.c:41: undefined reference to `sceKernelStderr'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_nonblocking_write':
../../../../../../newlib/libc/sys/psp/pipe.c:293: undefined reference to `sceKernelTrySendMsgPipe'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_write':
../../../../../../newlib/libc/sys/psp/pipe.c:262: undefined reference to `sceKernelSendMsgPipe'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_read':
../../../../../../newlib/libc/sys/psp/pipe.c:218: undefined reference to `sceKernelReceiveMsgPipe'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_close':
../../../../../../newlib/libc/sys/psp/pipe.c:104: undefined reference to `sceKernelDeleteMsgPipe'
|
I searched trough pspsdk libraries (with nm and grep) and havent found these symbols anywhere else than pspuser and pspkernel. What I'm doing wrong or missing this time?
The problem is with psp-g++... if I try to compile with psp-gcc it works. But I need use psp-g++. |
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Sat Nov 17, 2007 12:41 am Post subject: |
|
|
| odd :/ I cant find them either.. Maybe its an external library.. One of the more experienced members will have to help you.. |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
|
| Back to top |
|
 |
fungos
Joined: 31 Oct 2007 Posts: 41 Location: cwb br
|
Posted: Sat Nov 17, 2007 6:51 am Post subject: |
|
|
Thanks jimparis, I read all threads about that issue, but I still having some problem with this.
The two -lc worked, but now I still get some errors.
these are the current errors, and again, I can only find these calls on pspuser and pspkernel.
| Code: |
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_write.o): In function `_write':
../../../../../../newlib/libc/sys/psp/libcglue.c:308: undefined reference to `sceIoWrite'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_nonblocking_write':
../../../../../../newlib/libc/sys/psp/pipe.c:293: undefined reference to `sceKernelTrySendMsgPipe'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_write':
../../../../../../newlib/libc/sys/psp/pipe.c:262: undefined reference to `sceKernelSendMsgPipe'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_read':
../../../../../../newlib/libc/sys/psp/pipe.c:218: undefined reference to `sceKernelReceiveMsgPipe'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_close':
../../../../../../newlib/libc/sys/psp/pipe.c:104: undefined reference to `sceKernelDeleteMsgPipe'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `pipe':
../../../../../../newlib/libc/sys/psp/pipe.c:54: undefined reference to `sceKernelCreateMsgPipe'
../../../../../../newlib/libc/sys/psp/pipe.c:74: undefined reference to `sceKernelDeleteMsgPipe'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_peekmsgsize':
../../../../../../newlib/libc/sys/psp/pipe.c:38: undefined reference to `sceKernelReferMsgPipeStatus'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(pipe.o): In function `__psp_pipe_nonblocking_read':
../../../../../../newlib/libc/sys/psp/pipe.c:156: undefined reference to `sceKernelTryReceiveMsgPipe'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_close.o): In function `_close':
../../../../../../newlib/libc/sys/psp/libcglue.c:236: undefined reference to `sceIoClose'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_fstat.o): In function `_fstat':
../../../../../../newlib/libc/sys/psp/libcglue.c:580: undefined reference to `sceIoLseek'
../../../../../../newlib/libc/sys/psp/libcglue.c:582: undefined reference to `sceIoLseek'
../../../../../../newlib/libc/sys/psp/libcglue.c:583: undefined reference to `sceIoLseek'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_lseek.o): In function `_lseek':
../../../../../../newlib/libc/sys/psp/libcglue.c:345: undefined reference to `sceIoLseek'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_read.o): In function `_read':
../../../../../../newlib/libc/sys/psp/libcglue.c:271: undefined reference to `sceIoRead'
/home/fungos/dev/psp/dev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_stat.o): In function `_stat':
../../../../../../newlib/libc/sys/psp/libcglue.c:642: undefined reference to `sceIoGetstat'
|
So, to be easier help me, this is what I'm trying to get working:
| Code: |
psp-g++ -L`psp-config --pspsdk-path`/lib -lc -lc -lpspuser conftest.cpp
|
Just remembering... If I use psp-gcc with -lstdc++ it works ok. But I can't change it, because its the automatic ./configure compiler detection. Thank you for all the help, I hope I can get this library working for you people. :)
EDIT:
Ok, -fno-exceptions did the work. But I want to know more about this problem (if someone can explain me why the need for no-exceptions). |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Sat Nov 17, 2007 7:06 am Post subject: |
|
|
| -Wl,--start-group would also work. It is just a linker ordering issue (all dependences must come after the functions that use them) and exceptions probably adds more libraries to the end. |
|
| Back to top |
|
 |
fungos
Joined: 31 Oct 2007 Posts: 41 Location: cwb br
|
Posted: Sat Nov 17, 2007 7:38 am Post subject: |
|
|
| I found a good topic about this problem, and you was explaining the problems with this in psptoolchain. Thank you for your help! I get the configure to work, now I'm fixing other minor problems. |
|
| Back to top |
|
 |
fungos
Joined: 31 Oct 2007 Posts: 41 Location: cwb br
|
Posted: Sat Nov 17, 2007 8:21 am Post subject: |
|
|
Well, the things are each time worse. The library that I'm trying to port is called guichan (take a look at it http://guichan.sourceforge.net/), its a very good GUI framework that uses SDL and/or OpenGL.
After being able to compile the library, I was trying to get it sample program running, but as expected, It failed.
Anyway, my current problem is very weird, I never saw error messages like these .rodata and vtable errors.
| Code: |
fungos@Darkbrain:~/dev/psp/psplibraries/guichan/guichanffdemo-0.7.1$ psp-g++ -I. -I/home/fungos/dev/psp/dev/psp/sdk/include -lc -O2 -G0 -Wall -fno-exceptions -fno-rtti -I/home/fungos/dev/psp/dev/psp/include/SDL -Dmain=SDL_main -I/usr/local/include -lSDLmain -lguichan_opengl -lguichan_sdl -lguichan -D_PSP_FW_VERSION=150 -L. -L/home/fungos/dev/psp/dev/psp/sdk/lib src/ffcharacterchooser.o src/ffcontainer.o src/ffdemo.o src/fflistbox.o src/ffscrollarea.o src/guichanffdemo.o -lstdc++ -L/home/fungos/dev/psp/dev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/home/fungos/dev/psp/dev/psp/sdk/lib -lc -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel
/home/fungos/dev/psp/dev/psp/lib/libSDLmain.a(SDL_psp_main.o): In function `main':
psp/SDL_psp_main.c:178: undefined reference to `SDL_main'
src/ffcharacterchooser.o: In function `FFCharacterChooser::keyPressed(gcn::KeyEvent&)':
ffcharacterchooser.cpp:(.text+0xa4): undefined reference to `gcn::KeyEvent::getKey() const'
ffcharacterchooser.cpp:(.text+0xac): undefined reference to `gcn::Key::getValue() const'
ffcharacterchooser.cpp:(.text+0xc0): undefined reference to `gcn::KeyEvent::getKey() const'
ffcharacterchooser.cpp:(.text+0xc8): undefined reference to `gcn::Key::getValue() const'
ffcharacterchooser.cpp:(.text+0xdc): undefined reference to `gcn::KeyEvent::getKey() const'
ffcharacterchooser.cpp:(.text+0xe4): undefined reference to `gcn::Key::getValue() const'
ffcharacterchooser.cpp:(.text+0x170): undefined reference to `gcn::Widget::generateAction()'
src/ffcharacterchooser.o: In function `FFCharacterChooser::~FFCharacterChooser()':
ffcharacterchooser.cpp:(.text+0x1d4): undefined reference to `gcn::Widget::~Widget()'
src/ffcharacterchooser.o: In function `FFCharacterChooser::~FFCharacterChooser()':
ffcharacterchooser.cpp:(.text+0x238): undefined reference to `gcn::Widget::~Widget()'
src/ffcharacterchooser.o: In function `FFCharacterChooser::~FFCharacterChooser()':
ffcharacterchooser.cpp:(.text+0x290): undefined reference to `gcn::Widget::~Widget()'
src/ffcharacterchooser.o: In function `FFCharacterChooser::FFCharacterChooser()':
ffcharacterchooser.cpp:(.text+0x2c0): undefined reference to `gcn::Widget::Widget()'
ffcharacterchooser.cpp:(.text+0x2e4): undefined reference to `gcn::Widget::setWidth(int)'
ffcharacterchooser.cpp:(.text+0x2f0): undefined reference to `gcn::Widget::setHeight(int)'
ffcharacterchooser.cpp:(.text+0x320): undefined reference to `gcn::Image::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
..
..
..
..
src/ffscrollarea.o:(.rodata._ZTV12FFScrollArea[vtable for FFScrollArea]+0x1f4): undefined reference to `gcn::ScrollArea::getUpButtonDimension()'
src/ffscrollarea.o:(.rodata._ZTV12FFScrollArea[vtable for FFScrollArea]+0x1f8): undefined reference to `gcn::ScrollArea::getDownButtonDimension()'
src/ffscrollarea.o:(.rodata._ZTV12FFScrollArea[vtable for FFScrollArea]+0x1fc): undefined reference to `gcn::ScrollArea::getLeftButtonDimension()'
src/ffscrollarea.o:(.rodata._ZTV12FFScrollArea[vtable for FFScrollArea]+0x200): undefined reference to `gcn::ScrollArea::getRightButtonDimension()'
src/ffscrollarea.o:(.rodata._ZTV12FFScrollArea[vtable for FFScrollArea]+0x204): undefined reference to `gcn::ScrollArea::getVerticalBarDimension()'
src/ffscrollarea.o:(.rodata._ZTV12FFScrollArea[vtable for FFScrollArea]+0x208): undefined reference to `gcn::ScrollArea::getHorizontalBarDimension()'
src/ffscrollarea.o:(.rodata._ZTV12FFScrollArea[vtable for FFScrollArea]+0x20c): undefined reference to `gcn::ScrollArea::getVerticalMarkerDimension()'
src/ffscrollarea.o:(.rodata._ZTV12FFScrollArea[vtable for FFScrollArea]+0x210): undefined reference to `gcn::ScrollArea::getHorizontalMarkerDimension()'
..
..
..
..
|
|
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Sat Nov 17, 2007 5:02 pm Post subject: |
|
|
The first error (undefined SDL_main) is because you need to put the main() function inside an 'extern "C" {}' block, search other threads for more discussion on SDL and C++.
The other undefined references are probably because you're missing some library or object file where those symbols are defined (gcn::KeyEvent::GetKey, etc). |
|
| Back to top |
|
 |
fungos
Joined: 31 Oct 2007 Posts: 41 Location: cwb br
|
Posted: Sun Nov 18, 2007 1:20 am Post subject: |
|
|
Thanks again, you're being very nice and helpful :)
Now, what I think is the last problem:
When linking without -lSDL_mixer:
| Code: |
psp-gcc -I. -I/home/fungos/dev/psp/dev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti -I/home/fungos/dev/psp/dev/psp/include/SDL -Dmain=SDL_main -I/usr/local/include -D_PSP_FW_VERSION=150 -L. -L/home/fungos/dev/psp/dev/psp/sdk/lib src/ffcharacterchooser.o src/ffcontainer.o src/ffdemo.o src/fflistbox.o src/ffscrollarea.o src/guichanffdemo.o -lguichan_opengl -lguichan_sdl -lguichan -lSDL_image -lpng -lz -lfreetype -ljpeg -lSDL_gfx -lSDL_ttf -lvorbisfile -lvorbis -logg -lSDL -lm -L/home/fungos/dev/psp/dev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/home/fungos/dev/psp/dev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower -lstdc++ -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o guichan.psp.elf
src/ffdemo.o: In function `FFDemo::~FFDemo()':
ffdemo.cpp:(.text+0x770): undefined reference to `Mix_FreeChunk'
ffdemo.cpp:(.text+0x778): undefined reference to `Mix_FreeChunk'
ffdemo.cpp:(.text+0x780): undefined reference to `Mix_CloseAudio'
src/ffdemo.o: In function `FFDemo::~FFDemo()':
ffdemo.cpp:(.text+0x9fc): undefined reference to `Mix_FreeChunk'
ffdemo.cpp:(.text+0xa04): undefined reference to `Mix_FreeChunk'
ffdemo.cpp:(.text+0xa0c): undefined reference to `Mix_CloseAudio'
src/ffdemo.o: In function `FFDemo::~FFDemo()':
ffdemo.cpp:(.text+0xc88): undefined reference to `Mix_FreeChunk'
ffdemo.cpp:(.text+0xc90): undefined reference to `Mix_FreeChunk'
ffdemo.cpp:(.text+0xc98): undefined reference to `Mix_CloseAudio'
src/ffdemo.o: In function `FFDemo::input()':
ffdemo.cpp:(.text+0xebc): undefined reference to `Mix_PlayChannelTimed'
ffdemo.cpp:(.text+0xf1c): undefined reference to `Mix_PlayChannelTimed'
src/ffdemo.o: In function `FFDemo::FFDemo()':
ffdemo.cpp:(.text+0x563c): undefined reference to `Mix_OpenAudio'
ffdemo.cpp:(.text+0x565c): undefined reference to `Mix_LoadWAV_RW'
ffdemo.cpp:(.text+0x567c): undefined reference to `Mix_LoadWAV_RW'
src/ffdemo.o: In function `FFDemo::FFDemo()':
ffdemo.cpp:(.text+0x636c): undefined reference to `Mix_OpenAudio'
ffdemo.cpp:(.text+0x638c): undefined reference to `Mix_LoadWAV_RW'
ffdemo.cpp:(.text+0x63ac): undefined reference to `Mix_LoadWAV_RW'
collect2: ld returned 1 exit status
make[1]: *** [guichan.psp.elf] Error 1
make[1]: Leaving directory `/home/fungos/dev/psp/psplibraries/guichan/guichanffdemo-0.7.1'
make: *** [psp] Error 2
|
When linking with -lSDL_mixer:
| Code: |
psp-gcc -I. -I/home/fungos/dev/psp/dev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti -I/home/fungos/dev/psp/dev/psp/include/SDL -Dmain=SDL_main -I/usr/local/include -D_PSP_FW_VERSION=150 -L. -L/home/fungos/dev/psp/dev/psp/sdk/lib src/ffcharacterchooser.o src/ffcontainer.o src/ffdemo.o src/fflistbox.o src/ffscrollarea.o src/guichanffdemo.o -lguichan_opengl -lguichan_sdl -lguichan -lSDL_image -lpng -lz -lfreetype -ljpeg -lSDL_gfx -lSDL_ttf -lSDL_mixer -lvorbisfile -lvorbis -logg -lSDL -lm -L/home/fungos/dev/psp/dev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/home/fungos/dev/psp/dev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower -lstdc++ -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o guichan.psp.elf
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(mplayer.o): In function `Player_SetSynchroValue':
/home/fungos/dev/psp/psplibraries/build/SDL_mixer/mikmod/mplayer.c:2908: multiple definition of `Player_SetSynchroValue'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o):/home/fungos/dev/psp/psplibraries/build/SDL_mixer/music.c:1160: first defined here
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(mplayer.o): In function `Player_GetSynchroValue':
/home/fungos/dev/psp/psplibraries/build/SDL_mixer/mikmod/mplayer.c:2914: multiple definition of `Player_GetSynchroValue'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o):/home/fungos/dev/psp/psplibraries/build/SDL_mixer/music.c:1166: first defined here
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o): In function `music_internal_playing':
music.c:(.text+0x6f4): undefined reference to `SMPEG_status'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o): In function `music_internal_halt':
music.c:(.text+0x808): undefined reference to `SMPEG_stop'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o): In function `music_internal_volume':
music.c:(.text+0xa0c): undefined reference to `SMPEG_setvolume'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o): In function `music_internal_position':
music.c:(.text+0xb9c): undefined reference to `SMPEG_skip'
music.c:(.text+0xbf8): undefined reference to `SMPEG_rewind'
music.c:(.text+0xc04): undefined reference to `SMPEG_play'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o): In function `music_internal_play':
music.c:(.text+0xe0c): undefined reference to `SMPEG_enableaudio'
music.c:(.text+0xe18): undefined reference to `SMPEG_enablevideo'
music.c:(.text+0xe24): undefined reference to `SMPEG_play'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o): In function `Mix_FreeMusic':
music.c:(.text+0x109c): undefined reference to `SMPEG_delete'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o): In function `Mix_LoadMUS':
music.c:(.text+0x13c8): undefined reference to `SMPEG_new'
music.c:(.text+0x14f4): undefined reference to `SMPEG_actualSpec'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o): In function `music_mixer':
music.c:(.text+0x1b58): undefined reference to `SMPEG_playAudio'
collect2: ld returned 1 exit status
make[1]: *** [guichan.psp.elf] Error 1
make[1]: Leaving directory `/home/fungos/dev/psp/psplibraries/guichan/guichanffdemo-0.7.1'
make: *** [psp] Error 2
|
The weird is when I try to find these undefined symbols, like `SMPEG_new' using grep 'SMPEG_new' *.a on lib directory:
| Code: |
fungos@Darkbrain:~/dev/psp/dev/psp/lib$ grep 'SMPEG_new' *.a
Binary file libSDL_mixer.a matches
|
and then a nm:
| Code: |
fungos@Darkbrain:~/dev/psp/dev/psp/lib$ nm libSDL_mixer.a | grep 'SMPEG_new'
U SMPEG_new
|
The symbol is from another library than SDL_mixer, but no other library has this symbol inside.
We are almost there (I hope) to get guichan working on PSP :)
Thank you again jimparis! |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Sun Nov 18, 2007 8:54 am Post subject: |
|
|
Either you need to download and port SMPEG library, or you need to configure guichan or SDL or whatever depends on it not to need it.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
fungos
Joined: 31 Oct 2007 Posts: 41 Location: cwb br
|
Posted: Sun Nov 18, 2007 10:29 am Post subject: |
|
|
Ok, I'm getting this problem because I'm trying to play .WAV files? Nobody never had this problem with SMPEG when using SDL_mixer?
Anyway, I ported SMPEG (I stripped out the video code) and now I reduced the errors to multiple definitions... look here:
| Code: |
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(mplayer.o): In function `Player_SetSynchroValue':
/home/fungos/dev/psp/psplibraries/build/SDL_mixer/mikmod/mplayer.c:2908: multiple definition of `Player_SetSynchroValue'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o):/home/fungos/dev/psp/psplibraries/build/SDL_mixer/music.c:1160: first defined here
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(mplayer.o): In function `Player_GetSynchroValue':
/home/fungos/dev/psp/psplibraries/build/SDL_mixer/mikmod/mplayer.c:2914: multiple definition of `Player_GetSynchroValue'
/home/fungos/dev/psp/dev/psp/lib/libSDL_mixer.a(music.o):/home/fungos/dev/psp/psplibraries/build/SDL_mixer/music.c:1166: first defined here
|
there are the last two errors I'm getting now... we are almost there.
Thanks |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Sun Nov 18, 2007 11:11 am Post subject: |
|
|
Whether or not to use SMPEG is a configuration option for SDL_mixer - I assume everyone else turns it off.
Not sure how you fix the latest problem though. Try commenting one of them out (most likely the one in music.c), or try to work out how come the mikmod (module player) part of SDL_mixer is defining the same things as music.c.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
fungos
Joined: 31 Oct 2007 Posts: 41 Location: cwb br
|
Posted: Sun Nov 18, 2007 11:25 am Post subject: |
|
|
Anyway, I gave up to get guichan FF demo working with sound. I ported SMPEG and guichan. Both working on PSP (how can I commit it?).
Btw, about SDL_mixer using SMPEG (I used psplibraries to install SDL_mixer and others), I can't tell if I can disable it, I tried to see tis ./configure parameters, but It doesn't have an explicit --disable-smpeg. just one: --enable-music-mp3 (default=yes) that uses smpeg. If I disable that, how can I get mp3 played? mikmod does that?
Ok, about guichan, It's working awesome. But guichan OpenGL support doesn't work because pspgl haven't all needed functions. Anybody knows if anyone still developing pspgl?
As I said, I tested guichan FF demo on PSP, but I haven't fixed to use Joystick yet :D But looks very nice! Soon I will do it work with Joystick and put the 1.50 sample somewhere for download (btw, look my other thread about SDL and 3.xx).
Well, I'm preparing psplibraries scripts for SMPEG and guichan, so everyone can use these libs too.
Thanks again everyone that read this thread and who helped me.
EDIT:
Well, just need rebuild SDL_mixer with ./configure --enable-music-mp3=no .. But, as I already ported SMPEG. This is not necessary.
About the multiple definition.. I fixed that. music.c redefined that two functions, I think it was a macro error. there was a ifdef looking if mikmod was used then It compile that code, the correct I think, should be ifndef. I corrected and looks right now.
Someone with svn access should fix that too. Just change the #ifdef in line music.c:1156 to #ifndef. |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Tue Nov 20, 2007 5:18 pm Post subject: |
|
|
| Quote: | If I disable that, how can I get mp3 played? mikmod does that?
|
If you disable it you'll need to use a different way to play mp3, mikmod will only play wavs.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
Decinoge
Joined: 12 Nov 2007 Posts: 6
|
Posted: Wed Nov 21, 2007 10:03 am Post subject: |
|
|
I'm having SDL_mixer problems myself, but not on the compilation.
I cimply followed the instruction on the readme.psp and everything worked fine.
The problem i'm having is that i get no music. Even more strange is that i get sound (Mix_Chunk). the sound works perfectly. And the Music aswell, but only when compiling on Windows. When i port it to PSP, everything works as normal but i hear no sound.
I get no errors to paste and no crashes. I even "copyed" the code from the rRootage psp port, but still nuthing.
i had already tryed both .ogg and .mp3.
This is kinda frustrating :|
i'm running on a Slim with eLoader 1.0 _________________ none |
|
| Back to top |
|
 |
cloudhunter
Joined: 17 Aug 2006 Posts: 86
|
Posted: Wed Nov 21, 2007 6:15 pm Post subject: |
|
|
| Decinoge wrote: | | i'm running on a Slim with eLoader 1.0 |
Slightly off topic, but that's no way to test something you're compiling. You should compile it for 3.xx kernel, or port it to it... As that's all what the slim can natively handle.
Cloudy _________________ :) |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Nov 22, 2007 4:39 am Post subject: |
|
|
| cloudhunter wrote: | | Decinoge wrote: | | i'm running on a Slim with eLoader 1.0 |
Slightly off topic, but that's no way to test something you're compiling. You should compile it for 3.xx kernel, or port it to it... As that's all what the slim can natively handle.
Cloudy |
Very true - there's quite a few things eLoader cannot run, so any problems COULD be eLoader, not the app. |
|
| Back to top |
|
 |
|