[SOLVED] problem compiling/installing zlib.

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

Moderators: cheriff, TyRaNiD

Post Reply
goebish
Posts: 29
Joined: Sat Oct 14, 2006 11:59 pm

[SOLVED] problem compiling/installing zlib.

Post by goebish »

Hi, I'd like to compile and install zlib into my psp dev environment. The README.PSP file from the SDK says

Code: Select all

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.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Re: problem compiling/installing zlib.

Post by jimparis »

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: Select all

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.
goebish
Posts: 29
Joined: Sat Oct 14, 2006 11:59 pm

Post by goebish »

Wahoo ! what a quick answer :)
But i'm not so sure of what you say, here's the output from "make":

Code: Select all

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.
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Are you sure you have the one from SVN, and that you have your path variables setup correctly?
goebish
Posts: 29
Joined: Sat Oct 14, 2006 11:59 pm

Post by goebish »

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).
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

You ran "configure" first. Don't do that. Check out a fresh copy and follow the directions in README.PSP.
goebish
Posts: 29
Joined: Sat Oct 14, 2006 11:59 pm

Post by goebish »

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
Post Reply