Xmoto Porting. Round 2

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jandujar
Posts: 12
Joined: Thu Sep 27, 2007 10:45 pm

Xmoto Porting. Round 2

Post by jandujar »

Hello,

I'm trying to compile the xmoto-3.0.4 for the psp, like gambiting.


I succefully compile all the objects, but I have a linker error at the latest action.

This is my makefile. Very ugly
(put the makefile in the src directory)

Code: Select all

TARGET = Xmoto
PSPSDK = $(shell psp-config --pspsdk-path)
PSPLIBSDIR = $(PSPSDK)/..

########## Added ###############
PSPBIN = $(PSPSDK)/../bin
################################

SDL_CONFIG = $(PSPBIN)/sdl-config

#O = o
#OBJEXT = o

########## Updated ###############
DEFAULT_CFLAGS = $(shell $(PSPBIN)/sdl-config --cflags) -L$(HOME)/pspdev/sdk/lib -L$(HOME)/pspdev/psp/lib 
##################################

MORE_CFLAGS = -g -O2 -Wall 
ANTERIOR_MORE_CFLAGS = -g -O2 -Wall -fno-threadsafe-statics

XMOTOFLAGS =  -D'SVN_REV=""' -DGAMEDATADIR=\"/PSP/GAME/XMOTO\"
CFLAGS = $(XMOTOFLAGS) -D__PSP__ $(DEFAULT_CFLAGS) $(MORE_CFLAGS) -O2 -G0 -I../include -I. -I../uae_cpu 

CXXFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS) -fexceptions -fno-rtti
INCDIR = $(HOME)/pspdev/sdk/include $(HOME)/pspdev/psp/include/libc $(HOME)/pspdev/include $(HOME)/pspdev/psp/include $(HOME)/psp/include/machine/
USE_PSPSDK_LIBC = 1
ASFLAGS = $(CFLAGS)

########## Added ###############
DEFAULT_LIBS =  -lstdc++ -lpspdebug -lpspsdk -lm -lc -lpsputility -lpspuser -lpspkernel -lpspvfpu -lpspuser -lSDL -lSDLmain -lSDL_gfx -lSDL_mixer -lSDL_image -lSDL_ttf $(shell $(PSPBIN)/sdl-config --libs)
DEFAULT_LIBS_anterio  =  -lSDL -lSDLmain -lSDL_gfx -lSDL_mixer -lSDL_image -lSDL_ttf $(shell $(PSPBIN)/sdl-config --libs)
################################


LIBS =  $(DEFAULT_LIBS) -lstdc++ -lsupc++ -llua -llualib -lsqlite3 -logg -lvorbis -lvorbisenc -lvorbisidec -lvorbisfile -lfreetype -lc -lg -lbz2 \
 -lglut -lGLU -lGL -lode \
 -lpng -ljpeg -lz -lpsprtc  -lpspdebug -lpspgu -lpspctrl \
 -lpspge -lpspdisplay -lpsphprm -lpspaudio -lpspuser -lpspkernel -lpspdebug -lpspdisplay \
 -lpspsdk -lm -lpspnet_inet -lpspnet_resolver -lcurl -lpsputility

OBJS = ./Image.o ./VBezier.o ./PolyDraw.o ./XMArgs.o ./XMSession.o ./XMBuild.o ./VFileIO.o ./VTexture.o ./VXml.o ./helpers/VMath.o ./helpers/SwapEndian.o ./helpers/FileCompression.o ./helpers/Color.o ./helpers/utf8.o ./helpers/Environment.o ./helpers/Log.o ./image/tim.o ./image/tim_io_stdio.o ./image/tim_jpeg.o ./image/tim_memory_crt.o ./image/tim_png.o ./tinyxml/tinystr.o ./tinyxml/tinyxml.o ./tinyxml/tinyxmlerror.o ./tinyxml/tinyxmlparser.o ./md5sum/md5file.o ./DBuffer.o ./CRCHash.o ./Theme.o ./WWW.o ./Locales.o ./Packager.o ./svn_version.o ./gui/basic/GUI.o ./gui/basic/GUIButton.o ./gui/basic/GUIButtonDrawn.o ./gui/basic/GUIEdit.o ./gui/basic/GUIFrame.o ./gui/basic/GUIList.o ./gui/basic/GUIStatic.o ./gui/basic/GUITabView.o ./gui/specific/GUIXMoto.o ./drawlib/DrawLib.o ./drawlib/DrawLibOpenGL.o ./BSP.o ./Game.o ./GameMenus.o ./GUIBestTimes.o ./Renderer.o ./Replay.o ./Sound.o ./LuaLibGame.o ./UserConfig.o ./RendererParticles.o ./RendererBike.o ./Input.o ./GameSerializer.o ./Collision.o ./RendererFBO.o ./ScriptDynamicObjects.o ./SomersaultCounter.o ./GameEvents.o ./Credits.o ./GameInit.o ./GameDrawFrame.o ./LevelsManager.o ./SysMessage.o ./db/xmDatabase.o ./db/xmDatabase_stats.o ./db/xmDatabase_levels.o ./db/xmDatabase_profiles.o ./db/xmDatabase_replays.o ./db/xmDatabase_web.o ./db/xmDatabase_themes.o ./xmscene/Scene.o ./xmscene/Level.o ./xmscene/Zone.o ./xmscene/Block.o ./xmscene/Entity.o ./xmscene/SkyApparence.o ./xmscene/BikeController.o ./xmscene/BikeParameters.o ./xmscene/BikeAnchors.o ./xmscene/Bike.o ./xmscene/BikeGhost.o ./xmscene/BikePlayer.o ./xmscene/Camera.o ./md5sum/md5.o ./bzip2/blocksort.o ./bzip2/bzlib.o ./bzip2/compress.o ./bzip2/crctable.o ./bzip2/decompress.o ./bzip2/huffman.o ./bzip2/randtable.o
 
EXTRA_TARGETS = EBOOT.PBP

include $(PSPSDK)/lib/build.mak
And this is the result of the make command.

Code: Select all


psp-gcc -I/home/psp/pspdev/psp/sdk/include/libc -I/home/psp/pspdev/sdk/include -I/home/psp/pspdev/psp/include/libc -I/home/psp/pspdev/include -I/home/psp/pspdev/psp/include -I/home/psp/psp/include/machine/ -I. -I/home/psp/pspdev/psp/sdk/include -D'SVN_REV=""' -DGAMEDATADIR=\"/PSP/GAME/XMOTO\" -D__PSP__ -I/home/psp/pspdev/psp/include/SDL -Dmain=SDL_main -L/home/psp/pspdev/sdk/lib -L/home/psp/pspdev/psp/lib  -g -O2 -Wall  -O2 -G0 -I../include -I. -I../uae_cpu  -D_PSP_FW_VERSION=150  -L. -L/home/psp/pspdev/psp/sdk/lib   Image.o VBezier.o PolyDraw.o XMArgs.o XMSession.o XMBuild.o VFileIO.o VTexture.o VXml.o helpers/VMath.o helpers/SwapEndian.o helpers/FileCompression.o helpers/Color.o helpers/utf8.o helpers/Environment.o helpers/Log.o image/tim.o image/tim_io_stdio.o image/tim_jpeg.o image/tim_memory_crt.o image/tim_png.o tinyxml/tinystr.o tinyxml/tinyxml.o tinyxml/tinyxmlerror.o tinyxml/tinyxmlparser.o md5sum/md5file.o DBuffer.o CRCHash.o Theme.o WWW.o Locales.o Packager.o svn_version.o gui/basic/GUI.o gui/basic/GUIButton.o gui/basic/GUIButtonDrawn.o gui/basic/GUIEdit.o gui/basic/GUIFrame.o gui/basic/GUIList.o gui/basic/GUIStatic.o gui/basic/GUITabView.o gui/specific/GUIXMoto.o drawlib/DrawLib.o drawlib/DrawLibOpenGL.o BSP.o Game.o GameMenus.o GUIBestTimes.o Renderer.o Replay.o Sound.o LuaLibGame.o UserConfig.o RendererParticles.o RendererBike.o Input.o GameSerializer.o Collision.o RendererFBO.o ScriptDynamicObjects.o SomersaultCounter.o GameEvents.o Credits.o GameInit.o GameDrawFrame.o LevelsManager.o SysMessage.o db/xmDatabase.o db/xmDatabase_stats.o db/xmDatabase_levels.o db/xmDatabase_profiles.o db/xmDatabase_replays.o db/xmDatabase_web.o db/xmDatabase_themes.o xmscene/Scene.o xmscene/Level.o xmscene/Zone.o xmscene/Block.o xmscene/Entity.o xmscene/SkyApparence.o xmscene/BikeController.o xmscene/BikeParameters.o xmscene/BikeAnchors.o xmscene/Bike.o xmscene/BikeGhost.o xmscene/BikePlayer.o xmscene/Camera.o md5sum/md5.o bzip2/blocksort.o bzip2/bzlib.o bzip2/compress.o bzip2/crctable.o bzip2/decompress.o bzip2/huffman.o bzip2/randtable.o -lstdc++ -lpspdebug -lpspsdk -lm -lc -lpsputility -lpspuser -lpspkernel -lpspvfpu -lpspuser -lSDL -lSDLmain -lSDL_gfx -lSDL_mixer -lSDL_image -lSDL_ttf -L/home/psp/pspdev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/home/psp/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower -lstdc++ -lsupc++ -llua -llualib -lsqlite3 -logg -lvorbis -lvorbisenc -lvorbisidec -lvorbisfile -lfreetype -lc -lg -lbz2 -lglut -lGLU -lGL -lode -lpng -ljpeg -lz -lpsprtc  -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspaudio -lpspuser -lpspkernel -lpspdebug -lpspdisplay -lpspsdk -lm -lpspnet_inet -lpspnet_resolver -lcurl -lpsputility -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o Xmoto.elf
/home/psp/pspdev/psp/lib/libode.a(collision_trimesh_trimesh.o): En la función `dCollideTTL(dxGeom*, dxGeom*, int, dContactGeom*, int)':
ode/src/collision_trimesh_trimesh.cpp:145: referencia a `__cxa_guard_acquire' sin definir
ode/src/collision_trimesh_trimesh.cpp:145: referencia a `__cxa_guard_release' sin definir
/home/psp/pspdev/psp/lib/libpng.a(pngwrite.o): En la función `png_convert_from_time_t':
pngwrite.c:(.text+0x1574): referencia a `gmtime' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(sendf.o): En la función `Curl_write':
sendf.c:(.text+0x664): referencia a `send' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(sendf.o): En la función `Curl_read':
sendf.c:(.text+0x9b8): referencia a `recv' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(connect.o): En la función `Curl_nonblock':
connect.c:(.text+0x58): referencia a `fcntl' sin definir
connect.c:(.text+0x88): referencia a `fcntl' sin definir
connect.c:(.text+0xb4): referencia a `fcntl' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(connect.o): En la función `bindlocal':
connect.c:(.text+0x3f0): referencia a `bind' sin definir
connect.c:(.text+0x424): referencia a `getsockname' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(connect.o): En la función `trynextip':
connect.c:(.text+0x73c): referencia a `close' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(connect.o): En la función `singleipconnect':
connect.c:(.text+0xcdc): referencia a `socket' sin definir
connect.c:(.text+0xd9c): referencia a `close' sin definir
connect.c:(.text+0xdf4): referencia a `connect' sin definir
connect.c:(.text+0xfc4): referencia a `close' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(select.o): En la función `Curl_select':
select.c:(.text+0x21c): referencia a `select' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(select.o): En la función `Curl_poll':
select.c:(.text+0x74c): referencia a `select' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(url.o): En la función `Curl_disconnect':
url.c:(.text+0x2d88): referencia a `close' sin definir
url.c:(.text+0x2db0): referencia a `close' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(telnet.o): En la función `send_negotiation':
telnet.c:(.text+0x454): referencia a `send' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(telnet.o): En la función `suboption':
telnet.c:(.text+0x1d2c): referencia a `send' sin definir
telnet.c:(.text+0x1de0): referencia a `send' sin definir
telnet.c:(.text+0x1f88): referencia a `send' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(transfer.o): En la función `Curl_perform':
transfer.c:(.text+0x42c8): referencia a `close' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(multi.o): En la función `curl_multi_perform':
multi.c:(.text+0x1060): referencia a `close' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(hostip4.o): En la función `Curl_getaddrinfo':
hostip4.c:(.text+0x244): referencia a `gethostbyname' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(inet_ntop.o): En la función `inet_ntop4':
inet_ntop.c:(.text+0x34): referencia a `inet_ntoa' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(parsedate.o): En la función `Curl_parsedate':
parsedate.c:(.text+0x9e8): referencia a `gmtime_r' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(tftp.o): En la función `tftp_send_first':
tftp.c:(.text+0x490): referencia a `sendto' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(tftp.o): En la función `tftp_rx':
tftp.c:(.text+0x748): referencia a `sendto' sin definir
tftp.c:(.text+0x874): referencia a `sendto' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(tftp.o): En la función `tftp_tx':
tftp.c:(.text+0xb34): referencia a `sendto' sin definir
tftp.c:(.text+0xc38): referencia a `sendto' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(tftp.o): En la función `Curl_tftp_connect':
tftp.c:(.text+0xec8): referencia a `bind' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(tftp.o): En la función `Curl_tftp':
tftp.c:(.text+0x1100): referencia a `recvfrom' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(file.o): En la función `Curl_file_connect':
file.c:(.text+0xac): referencia a `open' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(file.o): En la función `Curl_file_done':
file.c:(.text+0x1bc): referencia a `close' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(file.o): En la función `Curl_file':
file.c:(.text+0x66c): referencia a `gmtime_r' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(http.o): En la función `Curl_http':
http.c:(.text+0x3e90): referencia a `gmtime_r' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(ftp.o): En la función `AllowServerConnect':
ftp.c:(.text+0x3a4): referencia a `getsockname' sin definir
ftp.c:(.text+0x3c8): referencia a `accept' sin definir
ftp.c:(.text+0x3d8): referencia a `close' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(ftp.o): En la función `ftp_state_use_port':
ftp.c:(.text+0x17a8): referencia a `getsockname' sin definir
ftp.c:(.text+0x1808): referencia a `socket' sin definir
ftp.c:(.text+0x1844): referencia a `close' sin definir
ftp.c:(.text+0x18a4): referencia a `bind' sin definir
ftp.c:(.text+0x18d0): referencia a `getsockname' sin definir
ftp.c:(.text+0x1918): referencia a `listen' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(ftp.o): En la función `ftp_state_mdtm_resp':
ftp.c:(.text+0x30d8): referencia a `gmtime_r' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(ftp.o): En la función `Curl_ftp_done':
ftp.c:(.text+0x58f0): referencia a `close' sin definir
/home/psp/pspdev/psp/lib/libcurl.a(ftp.o): En la función `ftp_dophase_done':
ftp.c:(.text+0x7b34): referencia a `close' sin definir
collect2: ld devolvió el estado de salida 1
I change the psp-gcc for psp-g++ and have another error.

What can I do?

why ode isn't working? I download from ps2dev svn and build it corretly.

I compile with psp-g++ and have this result (adding -fno-threadsafe-statics)

Code: Select all

psp-g++ -I/home/psp/pspdev/psp/sdk/include/libc -I/home/psp/pspdev/sdk/include -I/home/psp/pspdev/psp/include/libc -I/home/psp/pspdev/include -I/home/psp/pspdev/psp/include -I/home/psp/psp/include/machine/ -I. -I/home/psp/pspdev/psp/sdk/include -D'SVN_REV=""' -DGAMEDATADIR=\"/PSP/GAME/XMOTO\" -D__PSP__ -I/home/psp/pspdev/psp/include/SDL -Dmain=SDL_main -L/home/psp/pspdev/sdk/lib -L/home/psp/pspdev/psp/lib  -fno-threadsafe-statics -g -O2 -Wall  -O2 -G0 -I../include -I. -I../uae_cpu  -D_PSP_FW_VERSION=150  -L. -L/home/psp/pspdev/psp/sdk/lib   Image.o VBezier.o PolyDraw.o XMArgs.o XMSession.o XMBuild.o VFileIO.o VTexture.o VXml.o helpers/VMath.o helpers/SwapEndian.o helpers/FileCompression.o helpers/Color.o helpers/utf8.o helpers/Environment.o helpers/Log.o image/tim.o image/tim_io_stdio.o image/tim_jpeg.o image/tim_memory_crt.o image/tim_png.o tinyxml/tinystr.o tinyxml/tinyxml.o tinyxml/tinyxmlerror.o tinyxml/tinyxmlparser.o md5sum/md5file.o DBuffer.o CRCHash.o Theme.o WWW.o Locales.o Packager.o svn_version.o gui/basic/GUI.o gui/basic/GUIButton.o gui/basic/GUIButtonDrawn.o gui/basic/GUIEdit.o gui/basic/GUIFrame.o gui/basic/GUIList.o gui/basic/GUIStatic.o gui/basic/GUITabView.o gui/specific/GUIXMoto.o drawlib/DrawLib.o drawlib/DrawLibOpenGL.o BSP.o Game.o GameMenus.o GUIBestTimes.o Renderer.o Replay.o Sound.o LuaLibGame.o UserConfig.o RendererParticles.o RendererBike.o Input.o GameSerializer.o Collision.o RendererFBO.o ScriptDynamicObjects.o SomersaultCounter.o GameEvents.o Credits.o GameInit.o GameDrawFrame.o LevelsManager.o SysMessage.o db/xmDatabase.o db/xmDatabase_stats.o db/xmDatabase_levels.o db/xmDatabase_profiles.o db/xmDatabase_replays.o db/xmDatabase_web.o db/xmDatabase_themes.o xmscene/Scene.o xmscene/Level.o xmscene/Zone.o xmscene/Block.o xmscene/Entity.o xmscene/SkyApparence.o xmscene/BikeController.o xmscene/BikeParameters.o xmscene/BikeAnchors.o xmscene/Bike.o xmscene/BikeGhost.o xmscene/BikePlayer.o xmscene/Camera.o md5sum/md5.o bzip2/blocksort.o bzip2/bzlib.o bzip2/compress.o bzip2/crctable.o bzip2/decompress.o bzip2/huffman.o bzip2/randtable.o -lstdc++ -lpspdebug -lpspsdk -lm -lc -lpsputility -lpspuser -lpspkernel -lpspvfpu -lpspuser -lSDL -lSDLmain -lSDL_gfx -lSDL_mixer -lSDL_image -lSDL_ttf -L/home/psp/pspdev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/home/psp/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower -lstdc++ -lsupc++ -llua -llualib -lsqlite3 -logg -lvorbis -lvorbisenc -lvorbisidec -lvorbisfile -lfreetype -lc -lg -lbz2 -lglut -lGLU -lGL -lode -lpng -ljpeg -lz -lpsprtc  -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspaudio -lpspuser -lpspkernel -lpspdebug -lpspdisplay -lpspsdk -lm -lpspnet_inet -lpspnet_resolver -lcurl -lpsputility -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o Xmoto.elf
/home/psp/pspdev/psp/lib/libc.a(accept.o): En la función `accept':
../../../../../../newlib/libc/sys/psp/socket.c:93: referencia a `sceNetInetAccept' sin definir
../../../../../../newlib/libc/sys/psp/socket.c:101: referencia a `sceNetInetClose' sin definir
/home/psp/pspdev/psp/lib/libc.a(bind.o): En la función `bind':
../../../../../../newlib/libc/sys/psp/socket.c:125: referencia a `sceNetInetBind' sin definir
/home/psp/pspdev/psp/lib/libc.a(connect.o): En la función `connect':
../../../../../../newlib/libc/sys/psp/socket.c:146: referencia a `sceNetInetConnect' sin definir
/home/psp/pspdev/psp/lib/libc.a(gethostbyname.o): En la función `gethostbyname':
../../../../../../newlib/libc/sys/psp/netdb.c:72: referencia a `sceNetInetInetAton' sin definir
../../../../../../newlib/libc/sys/psp/netdb.c:76: referencia a `sceNetResolverCreate' sin definir
../../../../../../newlib/libc/sys/psp/netdb.c:82: referencia a `sceNetResolverStartNtoA' sin definir
../../../../../../newlib/libc/sys/psp/netdb.c:83: referencia a `sceNetResolverDelete' sin definir
/home/psp/pspdev/psp/lib/libc.a(getsockname.o): En la función `getsockname':
../../../../../../newlib/libc/sys/psp/socket.c:367: referencia a `sceNetInetGetsockname' sin definir
/home/psp/pspdev/psp/lib/libc.a(inet_ntoa.o): En la función `inet_ntoa':
../../../../../../newlib/libc/sys/psp/socket.c:383: referencia a `sceNetInetInetNtop' sin definir
/home/psp/pspdev/psp/lib/libc.a(listen.o): En la función `listen':
../../../../../../newlib/libc/sys/psp/socket.c:188: referencia a `sceNetInetListen' sin definir
/home/psp/pspdev/psp/lib/libc.a(recv.o): En la función `recv':
../../../../../../newlib/libc/sys/psp/socket.c:209: referencia a `sceNetInetRecv' sin definir
/home/psp/pspdev/psp/lib/libc.a(recvfrom.o): En la función `recvfrom':
../../../../../../newlib/libc/sys/psp/socket.c:230: referencia a `sceNetInetRecvfrom' sin definir
/home/psp/pspdev/psp/lib/libc.a(select.o): En la función `select':
../../../../../../newlib/libc/sys/psp/select.c:150: referencia a `sceNetInetSelect' sin definir
../../../../../../newlib/libc/sys/psp/select.c:131: referencia a `sceNetInetSelect' sin definir
/home/psp/pspdev/psp/lib/libc.a(send.o): En la función `send':
../../../../../../newlib/libc/sys/psp/socket.c:251: referencia a `sceNetInetSend' sin definir
/home/psp/pspdev/psp/lib/libc.a(sendto.o): En la función `sendto':
../../../../../../newlib/libc/sys/psp/socket.c:272: referencia a `sceNetInetSendto' sin definir
/home/psp/pspdev/psp/lib/libc.a(socket.o): En la función `__psp_socket_close':
../../../../../../newlib/libc/sys/psp/socket.c:57: referencia a `sceNetInetClose' sin definir
/home/psp/pspdev/psp/lib/libc.a(socket.o): En la función `socket':
../../../../../../newlib/libc/sys/psp/socket.c:28: referencia a `sceNetInetSocket' sin definir
../../../../../../newlib/libc/sys/psp/socket.c:40: referencia a `sceNetInetClose' sin definir
/home/psp/pspdev/psp/lib/libc.a(clock.o): En la función `clock':
../../../../../../newlib/libc/sys/psp/libcglue.c:463: referencia a `sceKernelLibcClock' sin definir
collect2: ld devolvió el estado de salida 1
saulotmalo2
Posts: 43
Joined: Mon Sep 10, 2007 9:32 am

Post by saulotmalo2 »

It looks like your problem is when tries to add the net library, are you sure that are linking all the psp net libraries? also you can try to put them at the end in order to being the first of being linked
jandujar
Posts: 12
Joined: Thu Sep 27, 2007 10:45 pm

Post by jandujar »

same problems with this

Code: Select all

... -lpspwlan -lpspnet -lpspnet_inet -lpspnet_resolver -o Xmoto.elf
I uploaded the code to rapidshare.

To compile simple do
"make -f Makefile.psp"

Yo need to have all the required librarys.

http://rapidshare.com/files/58870289/xm ... ar.gz.html

Maybe someone could help me link the files.
saulotmalo2
Posts: 43
Joined: Mon Sep 10, 2007 9:32 am

Post by saulotmalo2 »

this isn't the best way but you can enter in your
usr\local\pspdev\psp\sdk\lib
directory and there you can find all the psp files for include so look after the one you still needs I think it must be there. Actually I can't help you because I don't have ode installed already

libpspnet_adhoc.a
libpspnet_adhocmatching.a
libpspnet_resolver.a

i think it must be one of them try first -lpspnet_resolver
gambiting
Posts: 154
Joined: Thu Aug 17, 2006 5:39 pm

Post by gambiting »

Good luck,maybe you can do it :D
jandujar
Posts: 12
Joined: Thu Sep 27, 2007 10:45 pm

Post by jandujar »

I still have problems linking the files.

I think is a library order problem.
justin
Posts: 15
Joined: Wed Oct 17, 2007 7:34 pm

Post by justin »

OK - I tried to do this a long time ago, back when xmoto was 0.2.0. I managed to compile it, and get it to run. I didn't have psplink, and got to the point where I could get everything to run if I commented out some calls to some of the ode functions. But without the physics, it's just not the same :P Then uni started eating up all of my time.

However, this threads made me wanna try again knowing it was possible. So I'm working in an svn check out of the xmoto source, (ie its version 0.3.4), so I can keep track of what I've changed. You can't just compile the source straight from the internet, there are some parts that have to be rewritten (ie file system stuff). I think I've changed everything that needs it, and pretty much have everything working. Its not running very smooth, and some of the larger levels crash, the menu looks terrible and doesn't really function, but its somewhat working.

I'll post some screenshots if anyones keen.
jandujar
Posts: 12
Joined: Thu Sep 27, 2007 10:45 pm

Post by jandujar »

Hello justin, I successfully compile all the source files, but I have problem linking them.

I think the problem is mixing C and C++, and something related to psplibc or libc. Expecially with wifi related sources (libcurl seems to have problems)

All the source I modified from xmoto-3.4 is commented with

Code: Select all

#ifdef defined(__PSP__)
  source modified for PSP
#else
   original source
#end
So when I finish the porting I could submit the changes to xmoto official site.

I apologized for my bad english

Note: all the required libraries are download from svn.ps2dev.org/psp
ode, sdl, sdl_ttf, etc....

Note2: Have you successfully compile xmoto-0.3.4?
justin
Posts: 15
Joined: Wed Oct 17, 2007 7:34 pm

Post by justin »

Well, looks like your first problem is that you're still linking with psp-gcc, it should probably be psp-g++. Add the line

Code: Select all

CC = psp-g++
to your makefile. Looks like the other problems you're having are linking order. There seems to be quite a lot of libs linked twice, which (if you get everything in the right order) you don't need. Try moving -lcurl to before your -lstdc++ and see if that helps anything. Sounds like you're going the right way about keeping your changes separate - but there are some places where the existing code can be rewritten to handle all cases (PC and PSP) without having to use #ifdefs.

I have compiled xmoto 0.3.4 for the psp. I spent this morning tidying up my changes, I have some more stuff I want to add before I submit it to the xmoto developers. I want to do OSK and test the networking, as well as rewrite the menu to fit the psp screen size. Then there is testing which levels work, and which don't (at the moment, some crash, I'm guessing its memory requirements), and then profiling and optimizing to speed it up. Still so much to do!
jandujar
Posts: 12
Joined: Thu Sep 27, 2007 10:45 pm

Post by jandujar »

Can you upload the "beta" of xmoto-0.3.4 you have build to rapidshare, so I can test it?

I "need" to test the xmoto on psp, I have a friend "Fradera" who did about 26 game scenarios, I want to show him I'm playing his scenarios on psp.

Thanks.


Only the binary, I don't want to steal your work process.
Post Reply