[Bug 245807] [make] cc can not create a target when execd by BSD make but succeeds under gmake
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Apr 22 00:14:43 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245807
Bug ID: 245807
Summary: [make] cc can not create a target when execd by BSD
make but succeeds under gmake
Product: Base System
Version: 12.1-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: bsdpr at phoe.frmug.org
I was flabbergasted to witness the following make output on a 12.1-STABLE (rev
359586) host:
$ make ttytest
cc -O2 -pipe /home/elrond/ttytest.c -o ttytest
ld: error: cannot open output file ttytest: Permission denied
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make: stopped in /home/elrond
$ touch ttytest
$ ls -l ttytest
-rw-r--r-- 1 elrond elrond 0 Apr 22 02:05 ttytest
$ ls -ldo .
drwxr-xr-x 44 elrond elrond uarch 91 Apr 22 02:05 .
]$ id
uid=1001(elrond) gid=1001(elrond)
groups=1001(elrond),0(wheel),5(operator),44(video),4000(automedia),4001(mixing)
When using gmake, all went smoothly:
$ gmake ttytest
cc ttytest.c -o ttytest
$ ls -l ttytest
-rwxr-xr-x 1 elrond elrond 24000 Apr 22 02:07 ttytest
$ file ttytest
ttytest: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically
linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.1 (1201512),
FreeBSD-style, with debug_info, not stripped
When trussed, the file creation indeed fails:
36580:
openat(AT_FDCWD,"ttytest.tmpc878b15",O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC,0666)
ERR#13 'Permission denied'
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list