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 

Checking libz using standard configure

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



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Fri Oct 14, 2005 6:20 pm    Post subject: Checking libz using standard configure Reply with quote

Using this configuration line :

Code:

LDFLAGS="-L`psp-config --pspsdk-path`/lib -lz -lc -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsputility -lpspuser -lpspkernel" CFLAGS="-G0 -I`psp-config --pspsdk-path`/include -I`psp-config --pspdev-path`/psp/include" ./configure --host psp --prefix=`psp-config --psp-prefix`


the zlib check failed :
Code:

$ psp-gcc -o libz.o -G0 -I/usr/local/pspdev/psp/sdk/include -I/usr/local/pspdev/psp/include -DHAVE_CONFIG_CONFIG68_H=1 -DNO_FALLBACK_CONFIG
=1 -Wall -O3 -fomit-frame-pointer  -DHAVE_CONFIG_CONFIG68_H=1 -DNO_FALLBACK_CONFIG=1 -Wall -O3 -fomit-frame-pointer -L/usr/local/pspdev/psp
/sdk/lib -lc -lpspkernel -lz -lc -lpspkernel -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsputility -lpspuser -lpspkernel libz.c -
lz
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libz.a(gzio.o): In function `gzsetparams':
gzio.c:(.text+0x90): undefined reference to `fwrite'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libz.a(gzio.o): In function `gz_open':
gzio.c:(.text+0x6f8): undefined reference to `fdopen'
gzio.c:(.text+0x724): undefined reference to `ftell'
gzio.c:(.text+0x7b0): undefined reference to `fprintf'
gzio.c:(.text+0x7cc): undefined reference to `fopen'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libz.a(gzio.o): In function `gzwrite':
gzio.c:(.text+0xe04): undefined reference to `fwrite'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libz.a(gzio.o): In function `gzprintf':
gzio.c:(.text+0xedc): undefined reference to `vsnprintf'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libz.a(gzio.o): In function `do_flush':
gzio.c:(.text+0x10cc): undefined reference to `fwrite'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libz.a(gzio.o): In function `gzrewind':
gzio.c:(.text+0x11e0): undefined reference to `fseek'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libz.a(gzio.o): In function `gzseek':
gzio.c:(.text+0x13d4): undefined reference to `fseek'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libz.a(gzio.o): In function `putLong':
gzio.c:(.text+0x146c): undefined reference to `fputc'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libz.a(gzio.o): In function `gzerror':
gzio.c:(.text+0x15d0): undefined reference to `strcat'
gzio.c:(.text+0x15dc): undefined reference to `strcat'
collect2: ld returned 1 exit status


the zlib checking failed as it seems -lc -lpspkernel should be added at the end of the compilation chain :

Code:

psp-gcc -o libz.o -G0 -I/usr/local/pspdev/psp/sdk/include -I/usr/local/pspdev/psp/include -DHAVE_CONFIG_CONFIG68_H=1 -DNO_FALLBACK_CONFIG=1 -Wall -O3 -fomit-frame-pointer  -DHAVE_CONFIG_CONFIG68_H=1 -DNO_FALLBACK_CONFIG=1 -Wall -O3 -fomit-frame-pointer -L/usr/local/pspdev/psp/sdk/lib -lc -lpspkernel -lz -lc -lpspkernel -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsputility -lpspuser -lpspkernel libz.c -lz -lc -lpspkernel


While trying using this test :

Code:

configure: failed program was:
| #line 8501 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "sc68"
| #define PACKAGE_TARNAME "sc68"
| #define PACKAGE_VERSION "2.2.1"
| #define PACKAGE_STRING "sc68 2.2.1"
| #define PACKAGE_BUGREPORT "bug@sashipa.com"
| #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_UNISTD_H 1
| /* end confdefs.h.  */
|
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char gzdopen ();
| int
| main ()
| {
| gzdopen ();
|   ;
|   return 0;
| }


But as configure is responsible to manage that... how can I do to have this compilation working (or to have -lc and -lpspkernel added at the end) ?

Thanks
_________________
- TiTAN Art Division -
http://www.titandemo.org
Back to top
View user's profile Send private message Visit poster's website
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Fri Oct 14, 2005 6:57 pm    Post subject: Reply with quote

Add "-Wl,--start-group" to the beginning of your LDFLAGS.
Back to top
View user's profile Send private message
Shazz



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Sat Oct 15, 2005 12:22 am    Post subject: Reply with quote

Perfect :D

Thanks Jim !
_________________
- TiTAN Art Division -
http://www.titandemo.org
Back to top
View user's profile Send private message Visit poster's website
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