Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2020 00:14:42 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 245807] [make] cc can not create a target when execd by BSD make but succeeds under gmake
Message-ID:  <bug-245807-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245807

            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@FreeBSD.org
          Reporter: bsdpr@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=3D1001(elrond) gid=3D1001(elrond)
groups=3D1001(elrond),0(wheel),5(operator),44(video),4000(automedia),4001(m=
ixing)


When using gmake, all went smoothly:

$ gmake ttytest=20=20
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'

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245807-227>