Errors compiling SDL_image library

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

Moderators: cheriff, TyRaNiD

Post Reply
CHERTS
Posts: 15
Joined: Mon Oct 29, 2007 2:23 pm

Errors compiling SDL_image library

Post by CHERTS »

I'm using the latest versions of libraries from the repository svn://svn.ps2dev.org/psp/trunk/...

So I am getting all of the required libraries from SVN (in order)
zlib - maked & installed
bzip2 - maked & installed
freetype - maked & installed
jpeg - maked & installed
libbulletml - maked & installed
libmad - maked & installed
libmikmod - maked & installed
libogg - maked & installed
libpng - maked & installed
libpspvram - maked & installed
libTremor - maked & installed
libvorbis - maked & installed
pspgl - maked & installed
pspirkeyb - maked & installed
SDL - maked & installed
SDL_gfx - maked & installed
SDL_image - got errors, explained below

for SDL_image, I ran ./autogen.sh and then did:

Code: Select all

LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" \
./configure --host psp --with-sdl-prefix=$(psp-config --psp-prefix) \
--prefix=$(psp-config --psp-prefix)
OK!

Code: Select all

make
ERROR!

it complained with:

Code: Select all

$ make
/bin/sh ./libtool --preserve-dup-deps --tag=CC   --mode=link psp-gcc  -g -O2 -G0
 -I"/usr/local/pspdev/psp/sdk/include" -I/usr/local/pspdev/psp/include/SDL -Dmai
n=SDL_main -DLOAD_BMP -DLOAD_GIF -DLOAD_JPG -DLOAD_LBM -DLOAD_PCX -DLOAD_PNG -DL
OAD_PNM -DLOAD_TGA -DLOAD_XPM  -L/usr/local/pspdev/psp/sdk/lib -lc -lpspuser -o
showimage showimage.o libSDL_image.la -L/usr/local/pspdev/psp/lib -lSDLmain -lSD
L -lm -lGL -lpspvfpu -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctr
l -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lps
putility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower
psp-gcc -g -O2 -G0 -I/usr/local/pspdev/psp/sdk/include -I/usr/local/pspdev/psp/i
nclude/SDL -Dmain=SDL_main -DLOAD_BMP -DLOAD_GIF -DLOAD_JPG -DLOAD_LBM -DLOAD_PC
X -DLOAD_PNG -DLOAD_PNM -DLOAD_TGA -DLOAD_XPM -o showimage showimage.o  -L/usr/l
ocal/pspdev/psp/sdk/lib -lc -lpspuser ./.libs/libSDL_image.a -lc -lpspuser -ljpe
g -lpng -lz -L/usr/local/pspdev/psp/lib -lc -lpspuser -lc -lpspuser -lSDLmain /u
sr/local/pspdev/psp/lib/libSDL.a /usr/local/pspdev//psp/lib/libstdc++.a -lc -lps
puser -lm -lGL -lpspvfpu -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsp
hprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspne
t_inet -lpspirkeyb -lpsppower
/usr/local/pspdev/psp/lib/libGL.a(eglCreateContext.o): In function `eglCreateCon
text':
/cygdrive/c/svn/pspgl/eglCreateContext.c:43: undefined reference to `pspvfpu_ini
tcontext'
/usr/local/pspdev/psp/lib/libGL.a(eglDestroyContext.o): In function `eglDestroyC
ontext':
$
letecontext'
/usr/local/pspdev/psp/lib/libGL.a(glLoadIdentity.o): In function `glLoadIdentity
':
/cygdrive/c/svn/pspgl/glLoadIdentity.c:23: undefined reference to `pspvfpu_use_m
atrices'
/usr/local/pspdev/psp/lib/libGL.a(pspgl_context.o): In function `flush_matrix':
/cygdrive/c/svn/pspgl/pspgl_context.c:108: undefined reference to `pspvfpu_use_m
atrices'
/usr/local/pspdev/psp/lib/libGL.a(pspgl_matrix.o): In function `__pspgl_matrix_l
oad':
/cygdrive/c/svn/pspgl/pspgl_matrix.c:33: undefined reference to `pspvfpu_use_mat
rices'
/usr/local/pspdev/psp/lib/libGL.a(pspgl_matrix.o): In function `__pspgl_matrix_s
ync':
/cygdrive/c/svn/pspgl/pspgl_matrix.c:19: undefined reference to `pspvfpu_use_mat
rices'
/usr/local/pspdev/psp/lib/libGL.a(glMultMatrixf.o): In function `glMultMatrixf':

/cygdrive/c/svn/pspgl/glMultMatrixf.c:17: undefined reference to `pspvfpu_use_ma
trices'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(maptable.o): In function `maptable_
load_map_rec':
maptable.c:(.text+0x658): undefined reference to `strcat'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(iniparser.o): In function `iniparse
r_new':
iniparser.c:(.text+0x9b8): undefined reference to `fgets'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(iniparser.o): In function `iniparse
r_getint':
iniparser.c:(.text+0xcac): undefined reference to `atoi'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(iniparser.o): In function `iniparse
r_dump_ini':
iniparser.c:(.text+0x1078): undefined reference to `fputc'
collect2: ld returned 1 exit status
make: *** [showimage] Error 1
What should I do?
If a man that is SDL_image under Cygwin (gcc-4.3.1) request to send email sleuthhound@gmail.com

Thanks people.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Try running the psplibraries script from the repo. That will make and install most of the major libs, including all the SDL libs.
CHERTS
Posts: 15
Joined: Mon Oct 29, 2007 2:23 pm

Post by CHERTS »

J.F. wrote:Try running the psplibraries script from the repo. That will make and install most of the major libs, including all the SDL libs.
Start script 019-SDL_image.sh of psplibraries, the same error:

Code: Select all

........
psp-gcc -g -O2 -G0 -I/usr/local/pspdev/psp/sdk/include -I/usr/local/pspdev/psp/i
nclude/SDL -Dmain=SDL_main -DLOAD_BMP -DLOAD_GIF -DLOAD_JPG -DLOAD_LBM -DLOAD_PC
X -DLOAD_PNG -DLOAD_PNM -DLOAD_TGA -DLOAD_XPM -o showimage showimage.o  -L/usr/l
ocal/pspdev/psp/sdk/lib -lpspirkeyb -lc -lpspuser ./.libs/libSDL_image.a -lpspir
keyb -lc -lpspuser -ljpeg -lpng -lz -L/usr/local/pspdev/psp/lib -lc -lpspuser -l
pspirkeyb -lc -lpspuser -lpspirkeyb -lSDLmain /usr/local/pspdev/psp/lib/libSDL.a
 /usr/local/pspdev//psp/lib/libstdc++.a -lc -lpspuser -lpspirkeyb -lm -lGL -lpsp
vfpu -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpspr
tc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -
lpsppower
/usr/local/pspdev/psp/lib/libGL.a(eglCreateContext.o): In function `eglCreateCon
text':
/cygdrive/c/svn/pspgl/eglCreateContext.c:43: undefined reference to `pspvfpu_ini
tcontext'
/usr/local/pspdev/psp/lib/libGL.a(eglDestroyContext.o): In function `eglDestroyC
ontext':
/cygdrive/c/svn/pspgl/eglDestroyContext.c:42: undefined reference to `pspvfpu_de
letecontext'
/usr/local/pspdev/psp/lib/libGL.a(glLoadIdentity.o): In function `glLoadIdentity
':
/cygdrive/c/svn/pspgl/glLoadIdentity.c:23: undefined reference to `pspvfpu_use_m
atrices'
/usr/local/pspdev/psp/lib/libGL.a(pspgl_context.o): In function `flush_matrix':
/cygdrive/c/svn/pspgl/pspgl_context.c:108: undefined reference to `pspvfpu_use_m
atrices'
/usr/local/pspdev/psp/lib/libGL.a(pspgl_matrix.o): In function `__pspgl_matrix_l
oad':
/cygdrive/c/svn/pspgl/pspgl_matrix.c:33: undefined reference to `pspvfpu_use_mat
rices'
/usr/local/pspdev/psp/lib/libGL.a(pspgl_matrix.o): In function `__pspgl_matrix_s
ync':
/cygdrive/c/svn/pspgl/pspgl_matrix.c:19: undefined reference to `pspvfpu_use_mat
rices'
/usr/local/pspdev/psp/lib/libGL.a(glMultMatrixf.o): In function `glMultMatrixf':

/cygdrive/c/svn/pspgl/glMultMatrixf.c:17: undefined reference to `pspvfpu_use_ma
trices'
collect2: ld returned 1 exit status
make: *** [showimage] Error 1
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

I'd suspect you don't have the full toolchain installed then. It looks like it's looking for a library that is supposed to be built by the toolchain script. The vfpu lib it looks like.
CHERTS
Posts: 15
Joined: Mon Oct 29, 2007 2:23 pm

Post by CHERTS »

J.F. wrote:I'd suspect you don't have the full toolchain installed then. It looks like it's looking for a library that is supposed to be built by the toolchain script. The vfpu lib it looks like.
PSPSDK recompiled and everything worked!

Very good! Thank you!
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

It's usually something simple... unless it isn't. :D
Post Reply