| View previous topic :: View next topic |
| Author |
Message |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Tue Oct 17, 2006 3:52 pm Post subject: [SOLVED] problem compiling/installing zlib. |
|
|
Hi, I'd like to compile and install zlib into my psp dev environment. The README.PSP file from the SDK says
| Code: | To install, run:
make
make install |
The problem is that this will compile the PC version, not the psp one and will give imcompatible libs error at linking.
Anyone could give me the corrects compile instruction and correct the README.PSP file into zlib folder ?
Last edited by goebish on Wed Oct 18, 2006 4:21 am; edited 1 time in total |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Tue Oct 17, 2006 4:01 pm Post subject: Re: problem compiling/installing zlib. |
|
|
| goebish wrote: | Hi, I'd like to compile and install zlib into my psp dev environment. The README.PSP file from the SDK says
| Code: | To install, run:
make
make install |
The problem is that this will compile the PC version, not the psp one and will give imcompatible libs error at linking. |
No it won't. The zlib in svn has a modified makefile that builds and installs the PSP version. The README.PSP is correct. |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Tue Oct 17, 2006 4:17 pm Post subject: |
|
|
Wahoo ! what a quick answer :)
But i'm not so sure of what you say, here's the output from "make":
| Code: | psxdev@debianv:~/trunk/zlib$ make
gcc -O3 -DUSE_MMAP -c -o example.o example.c
gcc -O3 -DUSE_MMAP -c -o adler32.o adler32.c
gcc -O3 -DUSE_MMAP -c -o compress.o compress.c
gcc -O3 -DUSE_MMAP -c -o crc32.o crc32.c
gcc -O3 -DUSE_MMAP -c -o gzio.o gzio.c
gcc -O3 -DUSE_MMAP -c -o uncompr.o uncompr.c
gcc -O3 -DUSE_MMAP -c -o deflate.o deflate.c
gcc -O3 -DUSE_MMAP -c -o trees.o trees.c
gcc -O3 -DUSE_MMAP -c -o zutil.o zutil.c
gcc -O3 -DUSE_MMAP -c -o inflate.o inflate.c
gcc -O3 -DUSE_MMAP -c -o infback.o infback.c
gcc -O3 -DUSE_MMAP -c -o inftrees.o inftrees.c
gcc -O3 -DUSE_MMAP -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
gcc -O3 -DUSE_MMAP -o example example.o -L. libz.a
gcc -O3 -DUSE_MMAP -c -o minigzip.o minigzip.c
gcc -O3 -DUSE_MMAP -o minigzip minigzip.o -L. libz.a
|
As you can see, it compiles the sources files with gcc, not psp-gcc.
If after that I do "make install", it will install headers/libs files into my PC gcc folders, not pspsdk ones. If I do "make install prefix=path_to_my_sdk" I have imcompatibles libraries errors at link time when linking with lz. |
|
| Back to top |
|
 |
Insert_witty_name
Joined: 10 May 2006 Posts: 376
|
Posted: Tue Oct 17, 2006 4:45 pm Post subject: |
|
|
| Are you sure you have the one from SVN, and that you have your path variables setup correctly? |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Wed Oct 18, 2006 12:23 am Post subject: |
|
|
| Yes, this is the latest from SNV at revision 2032 (I've checked out the entire trunk, compiled the toolchain and the sdk by myself) and yes my paths are correct (I've no problem when compiling other libs or samples). |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Wed Oct 18, 2006 3:12 am Post subject: |
|
|
| You ran "configure" first. Don't do that. Check out a fresh copy and follow the directions in README.PSP. |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Wed Oct 18, 2006 4:19 am Post subject: |
|
|
That was the thing, thank you jimparis :)
I think this configure file should be removed from the library sources files.
Edit: fine, I just saw you deleted it in rev 2033 |
|
| Back to top |
|
 |
|