More details about cannot compile because of cpp.exe: /tmp/foo.i: Permission denied

Tolkin, Steve Steve.Tolkin@fmr.com
Tue Jun 6 16:09:00 GMT 2000


Some more details about my inability to compile.
I determined that gcc and/or cpp honor the TMP environment variable.
But I still get permission denied
792/tmp> echo $TMP
/tmp
793/tmp> cp /temp/rcs-5.7/src/a.c .
794/tmp> cpp a.c
# 1 "a.c"
main() { return 0; }
795/tmp> gcc a.c
cpp.exe: /tmp/ccQh4PLx.i: Permission denied
I can write files in this directory though 
796/tmp> cpp a.c >foo.i
797/tmp> cat foo.i
# 1 "a.c"
main() { return 0; }
800/tmp> type cpp.exe
cpp.exe is hashed (/usr/bin/cpp.exe)
Then I removed ntea from CYGWIN and started another bash session.
501~> echo $CYGWIN
ntsec tty notitle
502~> cd /tmp
503/tmp> gcc a.c
cpp.exe: C:\TEMP/ccQXlNyW.i: Permission denied
504/tmp> TMP=/tmp
505/tmp> gcc a.c
cpp.exe: /tmp/ccRxLxTH.i: Permission denied
506/tmp> ls -ld /tmp
drwxrwxrwt 2 administ Administ 0 Jun 6 19:05 /tmp/
507/tmp> id
uid=500(administrator) gid=544(Administrators) groups=544(Administrators)
508/tmp> ls -ldn /tmp
drwxrwxrwt 2 500 544 0 Jun 6 19:05 /tmp/
Here is the output of cygcheck -s
I did install into C:\ (which I later learned is not recommended.) Is this
perhaps part of the problem?
Cygnus Win95/NT Configuration Diagnostics
Current System Time: Tue Jun 6 18:43:13 2000
WinNT Ver 4.0 build 1381 Service Pack 4
Path:	.
	/usr/bin
	/usr/local/bin
	/Perl/bin/
	/usr/bin
	/usr/bin
	/Perl/bin
	/WINNT/system32
	/WINNT
	/informix/bin
	/_mybin
	/_otherbin
	/usr/bin
	/emacs/bin
	/WINNT/system32/nls/ENGLISH
	/WINNT/system32/nls
	/usr/home/mybin
	/Perl/bin
	/usr/bin
	/jdk1.2.2/bin
	/program files/javasoft/JRE/1.2/bin
	/program files/winzip
	/cygdrive/d/taxplan/code/taxplan1/debug
	/Program Files/Microsoft Visual Studio/Common/Tools/WinNT
	/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin
	/Program Files/Microsoft Visual Studio/Common/Tools
	/Program Files/Microsoft Visual Studio/VC98/bin
	/Program Files/Inso/balise
	/Tax Lot Accounting/tuxedo/bin
	/Tax Lot Accounting/pb
	/Tax Lot Accounting/exe
	/cygdrive/z/
	.
	/jdk1.2.2/bin
SysDir: C:\WINNT\System32
WinDir: C:\WINNT
CYGWIN = `ntsec ntea tty notitle'
HOME = `/usr/home'
MAKE_MODE = `UNIX'
PWD = `/temp/rcs-5.7/src'
Use `-r' to scan registry
a: fd N/A N/A 
c: hd NTFS 4090Mb 63% CP CS UN PA FC 
d: hd NTFS 8062Mb 24% CP CS UN PA FC 
e: hd NTFS 2059Mb 1% CP CS UN PA FC 
f: fd N/A N/A 
g: cd N/A N/A 
i: net NTFS 6100Mb 94% CP CS UN PA FC 
j: net NWFS 9442Mb 44% CP FC PROD
k: net N/A N/A 
l: net N/A N/A 
m: net NWFS 9442Mb 44% CP FC PROD
p: net NWFS 30000Mb 69% CP FC USERS
s: net NWFS 29999Mb 77% CP FC VOL1
z: net NWFS 4000Mb 6% CP FC SYS
C:\bin /usr/bin user binmode
C:\lib /usr/lib user binmode
C: / user binmode
Found: C:\bin\bash.exe
Found: \bin\bash.exe
Found: C:\bin\cat.exe
Found: \bin\cat.exe
Found: C:\bin\cpp.exe
Found: \bin\cpp.exe
Found: C:\bin\find.exe
Found: \bin\find.exe
Found: C:\bin\gcc.exe
Found: \bin\gcc.exe
Found: C:\bin\gdb.exe
Found: \bin\gdb.exe
Found: C:\bin\ld.exe
Found: \bin\ld.exe
Found: C:\bin\ls.exe
Found: z:\\ls.exe
Found: \bin\ls.exe
Found: C:\bin\make.exe
Found: \bin\make.exe
Found: C:\bin\sh.exe
Found: \bin\sh.exe
 115k 1999年09月14日 C:\bin\cygitcl30.dll
 63k 1999年09月14日 C:\bin\cygitk30.dll
 474k 1999年09月14日 C:\bin\cygtcl80.dll
 19k 1999年09月14日 C:\bin\cygtclpip80.dll
 24k 1999年09月14日 C:\bin\cygtclreg80.dll
 768k 1999年09月14日 C:\bin\cygtk80.dll
 569k 2000年05月15日 C:\bin\cygwin1.dll
 115k 1999年09月14日 \bin\cygitcl30.dll
 63k 1999年09月14日 \bin\cygitk30.dll
 474k 1999年09月14日 \bin\cygtcl80.dll
 19k 1999年09月14日 \bin\cygtclpip80.dll
 24k 1999年09月14日 \bin\cygtclreg80.dll
 768k 1999年09月14日 \bin\cygtk80.dll
 569k 2000年05月15日 \bin\cygwin1.dll
Use -h to see help about each section
Steve
> -----Original Message-----
> From:	Tolkin, Steve 
> Sent:	Friday, June 02, 2000 10:05 AM
> To:	cygwin@sourceware.cygnus.com
> Subject:	Cannot compile because of cpp.exe: 
> C:\TEMP/foo.i: Permission denied
>> I treied to make the various RCS files, and got this failure:
> When trying to compile I got 
> ./conf.sh: The command 'gcc -Dhas_conf_h -I. -I. -O -o 
> a.out a.c ' failed on
> a trivial program.
>> To track the problem down I manually ran the following 2 commands
> which show the problem:
>> > echo 'main() { return 0; }' > a.c
> > gcc -Dhas_conf_i -I. -O -o a.out a.c
> cpp.exe: C:\TEMP/ccWsQgSx.i: Permission denied
>> Here are some relevant details:
>> > id
> uid=500(administrator) gid=544(Administrators) 
> groups=544(Administrators)
>> > ls -ld c:/temp
> drwxrwxrwt 6 administ SYSTEM 32768 Jun 2 09:53 c:/temp/
>> > type cpp.exe
> cpp.exe is /usr/bin/cpp.exe
> > ls -l /usr/bin/cpp.exe
> -rwxrwxrwx 1 administ None 75264 Jan 21 00:56 
> /usr/bin/cpp.exe*
>> > echo $CYGWIN 
> ntsec ntea tty notitle
>> and CYUGWIN is now set before I launch bash. (I set it in my 
> Windows system environment.)
>> I seem to have some kind of permissions problem, but I do not 
> know what it is,
> or how to fix it!
> I wonder if the name of the temp file has both C: followed by 
> a backslash, then TEMP
> and then a forward slash is somehow related to this, or just 
> a red herring.
>> Any help would be appreciated,
> Steve
>> Here is the original attempt to run make that led me to the 
> above problem.
> 530/temp/rcs/rcs-5.7> make
> ...
> cd src && make all
> make[1]: Entering directory `/temp/rcs/rcs-5.7/src'
> rm -f a.*
> ALL_CFLAGS=' -Dhas_conf_h -I. -I. -O' \
> CC='gcc' \
> COMPAT2='0' \
> DIFF3='/usr/bin/diff3' DIFF3_BIN='1' \
> DIFF='/usr/bin/diff' DIFFFLAGS='-an' DIFF_L='1' \
> DIFF_SUCCESS='0' \
> DIFF_FAILURE='1' \
> DIFF_TROUBLE='2' \
> ED='ed' \
> LDFLAGS='' LIBS='' \
> RCSPREFIX='/usr/local/bin/' \
> SENDMAIL='' \
> /bin/sh -x ./conf.sh 3>&1 >a.h 2>conf.err
> ./conf.sh: testing permissions ... OK
> ./conf.sh: testing compiler for plausibility ...
> ./conf.sh: The command 'gcc -Dhas_conf_h -I. -I. -O -o 
> a.out a.c ' failed on
> a trivial program.
> make[1]: *** [conf.h] Error 1
> make[1]: Leaving directory `/temp/rcs/rcs-5.7/src'
> make: *** [all] Error 2
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /