newlinb causing sdl_image to fail to build

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

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
_df_
Posts: 9
Joined: Fri Jun 01, 2007 12:45 pm

newlinb causing sdl_image to fail to build

Post by _df_ »

I pulled everything from svn tonight, built toolchain, sdl, zlib,png,jpeg...

then it dies building sdl_image complaining about libzlib, png,jpeg etc...

I checked my config.log
configure:21543: checking for jpeg_CreateDecompress in -ljpeg
configure:21578: psp-gcc -o conftest -g -O2 -G0 -I"/opt/psp/psp/sdk/include" -I/opt/psp/psp/include/SDL -Dmain=SDL_main -DLOAD_BMP -DLOAD_GIF -L/opt/psp/psp/lib -L/opt/psp/psp/sdk/lib -lc -lpspuser conftest.c -ljpeg -ljpeg -lpng -lz -L/opt/psp/psp/lib -lSDLmain -lSDL -lm -L/opt/psp/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel >&5
/opt/psp/psp/lib/libc.a(setsockopt.o): In function `setsockopt':
../../../../../../newlib/libc/sys/psp/socket.c:293: undefined reference to `sceNetInetSetsockopt'
../../../../../../newlib/libc/sys/psp/socket.c:296: undefined reference to `sceNetInetGetErrno'
/opt/psp/psp/lib/libc.a(setsockopt.o): In function `getsockopt':
../../../../../../newlib/libc/sys/psp/socket.c:167: undefined reference to `sceNetInetGetsockopt'
../../../../../../newlib/libc/sys/psp/socket.c:170: undefined reference to `sceNetInetGetErrno'
collect2: ld returned 1 exit status
configure:21584: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "SDL_image"
| #define VERSION "1.2.4"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char jpeg_CreateDecompress ();
| int
| main ()
| {
| return jpeg_CreateDecompress ();
| ;
| return 0;
| }
configure:21602: result: no
configure:21614: WARNING:
*** Unable to find JPEG library (http://www.ijg.org/)
same errors with zlib etc about
/opt/psp/psp/lib/libc.a(setsockopt.o): In function `setsockopt':
../../../../../../newlib/libc/sys/psp/socket.c:293: undefined reference to `sceNetInetSetsockopt'
../../../../../../newlib/libc/sys/psp/socket.c:296: undefined reference to `sceNetInetGetErrno'
/opt/psp/psp/lib/libc.a(setsockopt.o): In function `getsockopt':
../../../../../../newlib/libc/sys/psp/socket.c:167: undefined reference to `sceNetInetGetsockopt'
../../../../../../newlib/libc/sys/psp/socket.c:170: undefined reference to `sceNetInetGetErrno'
I can see 'sceNetInetSetsockopt' it in libpspnet_inet.a

which is in libpspsdk.a and also /opt/psp/psp/lib/libc.a

very weird that SDL built ok but sdl_image wont...

in the end I hacked the makefile with -DLOAD_PNG -DLOAD_JPG and added -lz -lm -lc -lpspnet_inet -lpng to the libs line...

Id rather it built cleanly tho...

anyone got any suggestions??
kolaaaa
Posts: 15
Joined: Mon Apr 16, 2007 11:09 pm
Location: Paris

Post by kolaaaa »

Hi,

I rebuild PSPSDK yesterday (on Mac OS) and I have the same problem.

I finally succedded to build SDL_image :

After the ./autogen.sh, edit your configure script and add "-lpspnet_inet" in the folowing lines :

Code: Select all

[...]
LIBS="-ljpeg  $LIBS -lpspnet_inet"
[...]
LIBS="-lpng -lz $LIBS -lpspnet_inet"
[...]
LIBS="-lz  $LIBS -lpspnet_inet"
[...]
the ./configure should pass now.

Edit your Makefile, add "-lpspnet_inet" at the end of LIBS,

Code: Select all

[...]
LIBS = [...] -lpspnet_inet
[...]
Then "make" should pass too.

kolaaaa
futaris
Posts: 45
Joined: Wed Dec 28, 2005 7:47 am

Post by futaris »

I ended up changed configure.in in SDL:

Code: Select all

Index: configure.in
===================================================================
--- configure.in        (revision 2241)
+++ configure.in        (working copy)
@@ -1904,7 +1904,7 @@
     CFLAGS="$CFLAGS -G0 -I\"${pspsdk_path}/include\""
     SYSTEM_LIBS="$SYSTEM_LIBS -L${pspsdk_path}/lib -lpspdebug -lpspgu -lpspctrl"
     SYSTEM_LIBS="$SYSTEM_LIBS -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc"
-    SYSTEM_LIBS="$SYSTEM_LIBS -lpspaudio -lc -lpspuser -lpsputility -lpspkernel"
+    SYSTEM_LIBS="$SYSTEM_LIBS -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet"
 }

 case "$target" in
User avatar
_df_
Posts: 9
Joined: Fri Jun 01, 2007 12:45 pm

Post by _df_ »

thanks guys!
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

futaris wrote:I ended up changed configure.in in SDL:
I've updated SDL in the repository with this change.
futaris
Posts: 45
Joined: Wed Dec 28, 2005 7:47 am

Post by futaris »

Thanks, but I don't think it's 100% correct. I'm still having problems creating .a static libraries for dosbox - see this thread:

http://forums.ps2dev.org/viewtopic.php?t=3179&start=180

Anyone else have any suggestions?
Post Reply