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 

newlinb causing sdl_image to fail to build

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



Joined: 01 Jun 2007
Posts: 9

PostPosted: Fri Jun 01, 2007 1:23 pm    Post subject: newlinb causing sdl_image to fail to build Reply with quote

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

Quote:

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
Quote:

/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??
Back to top
View user's profile Send private message
kolaaaa



Joined: 16 Apr 2007
Posts: 15
Location: Paris

PostPosted: Mon Jun 04, 2007 7:26 pm    Post subject: Reply with quote

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:

[...]
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:

[...]
LIBS = [...] -lpspnet_inet
[...]


Then "make" should pass too.

kolaaaa
Back to top
View user's profile Send private message
futaris



Joined: 28 Dec 2005
Posts: 45

PostPosted: Mon Jun 04, 2007 8:37 pm    Post subject: Reply with quote

I ended up changed configure.in in SDL:

Code:

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
Back to top
View user's profile Send private message
_df_



Joined: 01 Jun 2007
Posts: 9

PostPosted: Mon Jun 04, 2007 9:10 pm    Post subject: Reply with quote

thanks guys!
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Tue Jun 05, 2007 6:39 am    Post subject: Reply with quote

futaris wrote:
I ended up changed configure.in in SDL:


I've updated SDL in the repository with this change.
Back to top
View user's profile Send private message Visit poster's website
futaris



Joined: 28 Dec 2005
Posts: 45

PostPosted: Tue Jun 05, 2007 8:26 am    Post subject: Reply with quote

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?
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