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 

[SOLVED] problem compiling/installing zlib.

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



Joined: 14 Oct 2006
Posts: 29

PostPosted: Tue Oct 17, 2006 3:52 pm    Post subject: [SOLVED] problem compiling/installing zlib. Reply with quote

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
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Tue Oct 17, 2006 4:01 pm    Post subject: Re: problem compiling/installing zlib. Reply with quote

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
View user's profile Send private message
goebish



Joined: 14 Oct 2006
Posts: 29

PostPosted: Tue Oct 17, 2006 4:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Tue Oct 17, 2006 4:45 pm    Post subject: Reply with quote

Are you sure you have the one from SVN, and that you have your path variables setup correctly?
Back to top
View user's profile Send private message
goebish



Joined: 14 Oct 2006
Posts: 29

PostPosted: Wed Oct 18, 2006 12:23 am    Post subject: Reply with quote

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
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Oct 18, 2006 3:12 am    Post subject: Reply with quote

You ran "configure" first. Don't do that. Check out a fresh copy and follow the directions in README.PSP.
Back to top
View user's profile Send private message
goebish



Joined: 14 Oct 2006
Posts: 29

PostPosted: Wed Oct 18, 2006 4:19 am    Post subject: Reply with quote

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