DJSPRandom Homebrew: DJSP
Good mp3 player with visualizations and an equalizer
Friends: Coding 'n Cracking - Nymphaea - PS3 Forum - darkforestgroup - daxhordes.org - Tgames - coldbird - gopsp.it - pspstation.org - prometheus - hgoel.info - MakeSmartTV - ps vita

zlib and libpng

Forum rules
Any post not directly related to programming will be moderated.
Do not request people to code something for you.
Avoid posting messages that do not bring anything to the conversation. We want the threads in this subforum to stay focused.

zlib and libpng

Postby npissoawsome » Wed Mar 21, 2012 9:50 pm

I'm following this tutorial: http://www.psp-programming.com/tutorials/c/lesson04.htm
and it says I need zlib and libpng, and it tells me to get them by doing this in terminal
Code: Select all
svn checkout svn://svn.pspdev.org/psp/trunk/zlib
cd zlib
make
make install

Everything works fine until I get to make install, and then it gives me these errors
Code: Select all
cp: cannot create regular file `/usr/local/pspdev/psp/include/zlib.h': Permission denied
cp: cannot create regular file `/usr/local/pspdev/psp/include/zconf.h': Permission denied

So, I ran it with
Code: Select all
sudo make install

and now it gives me this error
Code: Select all
make: psp-config: Command not found
Makefile:9: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'.  Stop.

so I looked at line 9 in the make file and it is this
Code: Select all
include $(PSPSDK)/lib/build.mak

I'm assuming it's running into this error, because it can't find the build.mak file, so I tried to give it the full path
Code: Select all
include /usr/local/pspdev/psp/sdk

but then it gives me this error
Code: Select all
make: psp-config: Command not found
/usr/local/pspdev/psp/sdk/lib/build.mak:15: *** $(PSPSDK) is undefined.  Use "PSPSDK := $(shell psp-config --pspsdk-path)" in your Makefile.  Stop.


and the whole make file is this
Code: Select all
PSPSDK=$(shell psp-config --pspsdk-path)
PSPDIR=$(shell psp-config --psp-prefix)
TARGET_LIB = libz.a
OBJS =    adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
   zutil.o inflate.o infback.o inftrees.o inffast.o

CFLAGS = -O2 -G0

include $(PSPSDK)/lib/build.mak

install: $(TARGET_LIB)
   @echo "Installing libz into $(PSPDIR)"
   @mkdir -p $(PSPDIR)/include $(PSPDIR)/lib
   @cp zlib.h zconf.h $(PSPDIR)/include
   @cp libz.a  $(PSPDIR)/lib
   @echo "Done"

If anyone could tlel me how to fix this error, that would be great :)

And sorry, I'm still quite a noob
npissoawsome
 
Posts: 40
Joined: Mon Mar 19, 2012 10:01 pm

Re: zlib and libpng

Postby NightStar3 » Wed Mar 21, 2012 9:57 pm

Try doing
Code: Select all
sudo bash

before calling
Code: Select all
make install


It should give you the privs needed to copy the files.
Image
User avatar
NightStar3
VIP
 
Posts: 459
Joined: Mon Sep 27, 2010 8:22 pm
Location: 0x13371A4D

Re: zlib and libpng

Postby npissoawsome » Wed Mar 21, 2012 10:03 pm

NightStar3 wrote:Try doing
Code: Select all
sudo bash

before calling
Code: Select all
make install


It should give you the privs needed to copy the files.


thanks :] it worked

awesome, libpng works too now, and I was able to compile my code with graphics.h and png.h
npissoawsome
 
Posts: 40
Joined: Mon Mar 19, 2012 10:01 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest