"ld.exe: .: No such file: Permission denied"

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

Moderators: cheriff, TyRaNiD

Post Reply
jo3_sum
Posts: 17
Joined: Wed Jan 30, 2008 5:38 am
Contact:

"ld.exe: .: No such file: Permission denied"

Post by jo3_sum »

Hi, I seem to be having something incorrect inside the Makefile. Can someone point it out to me? Thanks in advance.

Makefile

Code: Select all

TARGET = Test
PSP_EBOOT_ICON = ICON0.png
PSP_EBOOT_ICON1 = NULL
PSP_EBOOT_PIC1 = NULL
PSP_EBOOT_SND0 = NULL
OBJS = main.o c/Source/adhoc.o
LIBS =C:/pspdev/psp/sdk/lib/prxexports.o -lstdc++   -lpspaudiolib -lpspaudio  -lpspgu  -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan -lpspnet -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm  -lpspumd -lpspctrl -lpspdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpspnet_inet -lpsputility
BUILD_PRX = 1
PSP_FW_VERSION=401


INCDIR = -I. -I C:/pspdev/psp/sdk/include
CFLAGS = -Os -O2 -g -G0 -Wall -O3
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR = -L. -L C:/pspdev/psp/sdk/lib -L$C:/pspdev/psp/sdk/lib -specs=C:/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-TC:/pspdev/psp/sdk/lib/linkfile.prx
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Test

#USE_PSPSDK_LIBC = 1
USE_USER_LIBS = 1

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak







Debug: all

all: EBOOT.PBP
#	cp eboot.pbp $(MOUNT_POINT)

EBOOT.PBP: PARAM.SFO a.prx $(PSP_EBOOT_ICON)  $(PSP_EBOOT_FOREGROUND) $(PSP_EBOOT_BACKGROUND) $(PSP_EBOOT_ANIM) $(PSP_EBOOT_SND0)
	pack-pbp $@ PARAM.SFO $(PSP_EBOOT_ICON) $(PSP_EBOOT_ANIM) $(PSP_EBOOT_FOREGROUND) $(PSP_EBOOT_BACKGROUND) $(PSP_EBOOT_SND0) a.prx NULL

PARAM.SFO: a.prx
	mksfo $(PSP_EBOOT_TITLE) $@

a.prx: a.elf
	psp-prxgen $< $@


a.elf&#58; $&#40;OBJECTS&#41; Makefile
	psp-gcc $&#40;CXXFLAGS&#41; $&#40;LIBDIR&#41; $&#40;OBJECTS&#41; $&#40;LIBS&#41; -o $@
	psp-fixup-imports  $@



main.o&#58; main.c
	psp-g++ $&#40;INCDIR&#41;  $&#40;CXXFLAGS&#41; -c -o $@ $<


c/Source/adhoc.o&#58; c/Source/adhoc.cpp c/Source/adhoc.h
	psp-g++ $&#40;INCDIR&#41;  $&#40;CXXFLAGS&#41; -c -o $@ $<



NULL&#58;

cleanall&#58; clean

clean&#58;
	rm -f $&#40;OBJECTS&#41; a.elf a_strip.elf PARAM.SFO EBOOT.PBP


Compiler Output:

Code: Select all

C&#58;\Users\Joe\Desktop\misc\psp>make
makefile&#58;41&#58; warning&#58; overriding commands for target `EBOOT.PBP'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;188&#58; warning&#58; ignoring old commands for target `
EBOOT.PBP'
makefile&#58;44&#58; warning&#58; overriding commands for target `PARAM.SFO'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;184&#58; warning&#58; ignoring old commands for target `
PARAM.SFO'
makefile&#58;70&#58; warning&#58; overriding commands for target `clean'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;207&#58; warning&#58; ignoring old commands for target `
clean'
psp-gcc -I-I. -I-I -IC&#58;/pspdev/psp/sdk/include -I. -IC&#58;/pspdev/psp/sdk/include -
Os -O2 -g -G0 -Wall -O3 -I-I. -I-I -IC&#58;/pspdev/psp/sdk/include -I. -IC&#58;/pspdev/p
sp/sdk/include -Os -O2 -g -G0 -Wall -O3 -fno-exceptions -fno-rtti -D_PSP_FW_VERS
ION=401 -L. -L C&#58;/pspdev/psp/sdk/lib -L&#58;/pspdev/psp/sdk/lib -specs=C&#58;/pspdev/psp
/sdk/lib/prxspecs -Wl,-q,-TC&#58;/pspdev/psp/sdk/lib/linkfile.prx . C&#58;/pspdev/psp/sd
k/lib  C&#58;/pspdev/psp/sdk/lib/prxexports.o -lstdc++   -lpspaudiolib -lpspaudio  -
lpspgu  -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan -lpspn
et -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm  -lpspumd -lpspctrl -lp
spdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspnet_apctl
 -lpspnet_resolver -lpspnet_inet -lpsputility -lpspdebug -lpspdisplay -lpspge -l
pspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lp
sputility -lpspuser -o a.elf
c&#58;\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe&#58; .&#58; No such file&#58;
Permission denied
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;a.elf&#93; Error 1

C&#58;\Users\Joe\Desktop\misc\psp>c&#58;\pspdev\bin\..\lib\gcc\psp\4.1.2
\..\..\..\..\psp\bin\ld.exe
c&#58;\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe&#58; no input files

C&#58;\Users\Joe\Desktop\misc\psp>
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

You haven't chmodded the directory

Read the toolchain instructions where it says Chmod rarara +rwx or something
jo3_sum
Posts: 17
Joined: Wed Jan 30, 2008 5:38 am
Contact:

Post by jo3_sum »

Because I am not on linux and I don't have cygwin, I assumed I am not able to use chmod , so i tried CACLS and ICACLS, supposely the windows equivalent, and it still did not work.

Code: Select all


C&#58;\pspdev\psp\bin>cacls ld.exe /E /G "Joe"&#58;F
processed file&#58; C&#58;\pspdev\psp\bin\ld.exe

......
......
......

C&#58;\Users\Joe\Desktop\misc\psp>make
makefile&#58;36&#58; warning&#58; overriding commands for target `EBOOT.PBP'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;188&#58; warning&#58; ignoring old commands for target `
EBOOT.PBP'
makefile&#58;39&#58; warning&#58; overriding commands for target `PARAM.SFO'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;184&#58; warning&#58; ignoring old commands for target `
PARAM.SFO'
makefile&#58;65&#58; warning&#58; overriding commands for target `clean'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;207&#58; warning&#58; ignoring old commands for target `
clean'
psp-gcc -I-I. -I-I -IC&#58;/pspdev/psp/sdk/include -I. -IC&#58;/pspdev/psp/sdk/include -
Os -O2 -g -G0 -Wall -O3 -I-I. -I-I -IC&#58;/pspdev/psp/sdk/include -I. -IC&#58;/pspdev/p
sp/sdk/include -Os -O2 -g -G0 -Wall -O3 -fno-exceptions -fno-rtti -D_PSP_FW_VERS
ION=401 -L. -L C&#58;/pspdev/psp/sdk/lib -L&#58;/pspdev/psp/sdk/lib -specs=C&#58;/pspdev/psp
/sdk/lib/prxspecs -Wl,-q,-TC&#58;/pspdev/psp/sdk/lib/linkfile.prx . C&#58;/pspdev/psp/sd
k/lib  C&#58;/pspdev/psp/sdk/lib/prxexports.o -lstdc++ -lmikmod -lpspaudiolib -lpspa
udio  -lpspgu  -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan
 -lpspnet -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm  -lpspumd -lpspc
trl -lpspdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspne
t_apctl -lpspnet_resolver -lpspnet_inet -lpsputility -lpspdebug -lpspdisplay -lp
spge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resol
ver -lpsputility -lpspuser -o a.elf
c&#58;\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe&#58; .&#58; No such file&#58;
Permission denied
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;a.elf&#93; Error 1

C&#58;\Users\Joe\Desktop\misc\psp>

......
......
......

C&#58;\pspdev\psp\bin>icacls ld.exe /grant "Joe"&#58;&#40;NP&#41;&#40;RX&#41; /T
processed file&#58; ld.exe
Successfully processed 1 files; Failed processing 0 files

......
......
......


C&#58;\Users\Joe\Desktop\misc\psp>make
makefile&#58;36&#58; warning&#58; overriding commands for target `EBOOT.PBP'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;188&#58; warning&#58; ignoring old commands for target `
EBOOT.PBP'
makefile&#58;39&#58; warning&#58; overriding commands for target `PARAM.SFO'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;184&#58; warning&#58; ignoring old commands for target `
PARAM.SFO'
makefile&#58;65&#58; warning&#58; overriding commands for target `clean'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;207&#58; warning&#58; ignoring old commands for target `
clean'
psp-gcc -I-I. -I-I -IC&#58;/pspdev/psp/sdk/include -I. -IC&#58;/pspdev/psp/sdk/include -
Os -O2 -g -G0 -Wall -O3 -I-I. -I-I -IC&#58;/pspdev/psp/sdk/include -I. -IC&#58;/pspdev/p
sp/sdk/include -Os -O2 -g -G0 -Wall -O3 -fno-exceptions -fno-rtti -D_PSP_FW_VERS
ION=401 -L. -L C&#58;/pspdev/psp/sdk/lib -L&#58;/pspdev/psp/sdk/lib -specs=C&#58;/pspdev/psp
/sdk/lib/prxspecs -Wl,-q,-TC&#58;/pspdev/psp/sdk/lib/linkfile.prx . C&#58;/pspdev/psp/sd
k/lib  C&#58;/pspdev/psp/sdk/lib/prxexports.o -lstdc++ -lmikmod -lpspaudiolib -lpspa
udio  -lpspgu  -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan
 -lpspnet -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm  -lpspumd -lpspc
trl -lpspdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspne
t_apctl -lpspnet_resolver -lpspnet_inet -lpsputility -lpspdebug -lpspdisplay -lp
spge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resol
ver -lpsputility -lpspuser -o a.elf
c&#58;\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe&#58; .&#58; No such file&#58;
Permission denied
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;a.elf&#93; Error 1

C&#58;\Users\Joe\Desktop\misc\psp>

......
......
......

C&#58;\pspdev\psp\bin>


C&#58;\Users\Joe\Desktop\misc\psp>make
makefile&#58;36&#58; warning&#58; overriding commands for target `EBOOT.PBP'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;188&#58; warning&#58; ignoring old commands for target `
EBOOT.PBP'
makefile&#58;39&#58; warning&#58; overriding commands for target `PARAM.SFO'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;184&#58; warning&#58; ignoring old commands for target `
PARAM.SFO'
makefile&#58;65&#58; warning&#58; overriding commands for target `clean'
C&#58;/pspdev/psp/sdk/lib/build.mak&#58;207&#58; warning&#58; ignoring old commands for target `
clean'
psp-gcc -I-I. -I-I -IC&#58;/pspdev/psp/sdk/include -I. -IC&#58;/pspdev/psp/sdk/include -
Os -O2 -g -G0 -Wall -O3 -I-I. -I-I -IC&#58;/pspdev/psp/sdk/include -I. -IC&#58;/pspdev/p
sp/sdk/include -Os -O2 -g -G0 -Wall -O3 -fno-exceptions -fno-rtti -D_PSP_FW_VERS
ION=401 -L. -L C&#58;/pspdev/psp/sdk/lib -L&#58;/pspdev/psp/sdk/lib -specs=C&#58;/pspdev/psp
/sdk/lib/prxspecs -Wl,-q,-TC&#58;/pspdev/psp/sdk/lib/linkfile.prx . C&#58;/pspdev/psp/sd
k/lib  C&#58;/pspdev/psp/sdk/lib/prxexports.o -lstdc++ -lmikmod -lpspaudiolib -lpspa
udio  -lpspgu  -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan
 -lpspnet -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm  -lpspumd -lpspc
trl -lpspdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspne
t_apctl -lpspnet_resolver -lpspnet_inet -lpsputility -lpspdebug -lpspdisplay -lp
spge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resol
ver -lpsputility -lpspuser -o a.elf
c&#58;\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe&#58; .&#58; No such file&#58;
Permission denied
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;a.elf&#93; Error 1

C&#58;\Users\Joe\Desktop\misc\psp>
CpuWhiz
Posts: 42
Joined: Mon Jun 04, 2007 1:30 am

Post by CpuWhiz »

c:\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe: .: No such file:
Permission denied
ld.exe is the program reporting the error, not the file or folder that doesn't have permissions. The "file" is "." or the current working directory. Also INCDIR and LIBDIR add the -I and -L for you. So it should be:

Code: Select all

INCDIR =. C&#58;/pspdev/psp/sdk/include 
If you look in the command line it was wrong:

Code: Select all

-I-I. -I-I -IC&#58;/pspdev/psp/sdk/include
Fixing the above and also LIBDIR may make the error go away. It looks like it's thinking the current working directory is an object file it needs to read or something since the command line arguments are wrong.
jo3_sum
Posts: 17
Joined: Wed Jan 30, 2008 5:38 am
Contact:

Post by jo3_sum »

Same result.
jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Post by jsharrad »

Why so complex anyway? why not just use the build.mak that comes with the SDK?

I see just a small error that's making a.elf not get your objects compiled in, you have them defined as "OBJS", but later try to compile with the undefined "OBJECTS".
Post Reply