Problem Setting Up libpng and zlib

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

Moderators: cheriff, TyRaNiD

Post Reply
hyakuhei
Posts: 1
Joined: Mon Jul 03, 2006 10:27 pm
Location: UK/Switzerland
Contact:

Problem Setting Up libpng and zlib

Post by hyakuhei »

Hi guys,

Right, im setting up an environment to build a few test apps on the PSP, I should point out that im running gentoo not cygwin.

Ok, I have downloaded the trunk svn psp friendly libs, and here is a quick run down of what I have done:

Code: Select all

cd libpng
make
make install
//This installs correctly to the pspsdk include directory
cd ..

Code: Select all

cd zlib
make
make install prefix=/usr/local/pspdev/psp/sdk
//This seems to work and install into the right place
cd ..
Now the problem I have is that when I try to compile my very simple graphics program I get the following compiler library error:

Code: Select all

operative@serenity ~/Development/PSP/helloworld2 $ make clean
rm -f hello.elf  main.o graphics.o framebuffer.o PARAM.SFO EBOOT.PBP EBOOT.PBP
operative@serenity ~/Development/PSP/helloworld2 $ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o main.o main.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o graphics.o graphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o framebuffer.o framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   main.o graphics.o framebuffer.o -lpspgu -lpng -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o hello.elf
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/sdk/lib/libz.a when searching for -lz
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [hello.elf] Error 1
operative@serenity ~/Development/PSP/helloworld2 $ 
As you can see, this sucks, any advice would be welcome

Thanks
-Rob
Shoot First, Quip Later
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Re: Problem Setting Up libpng and zlib

Post by Raphael »

hyakuhei wrote:skipping incompatible /usr/local/pspdev/psp/sdk/lib/libz.a when searching for -lz
Your compile of zlib seems to have produced an invalid lib, try to recompile and reinstall.
Post Reply