LLVM bug WRT temporary files?
--Apple-Mail=_67974C63-D3F4-47AF-93B5-F3975880C18B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
Guys,
I'm running into a build break that relates to the temporary files
that LLVM creates:
svl-junos-j019% cc --version
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: arm--freebsd10.0-gnueabi
Thread model: posix
On a build machine /tmp/b is a directory and created by user X.
I am doing a buildworld on that machine as user Y (Y=3Dmarcelm) and
I don't have permissions in /tmp/b. The build gets to usr.bin/awk
and it has a source file called b.c
The build fails with:
--- b.o ---
cc -O -pipe -DHAS_ISBLANK -I. =
-I/b/marcelm/buildbot/FreeBSD_arm_arm/build/usr.bin/awk/../../contrib/one-=
true-awk -DFOPEN_MAX=3D64 -std=3Dgnu99 -Qunused-arguments =
-Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body =
-Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value =
-Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion =
-Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter =
-Wno-parentheses -c =
/b/marcelm/buildbot/FreeBSD_arm_arm/build/usr.bin/awk/../../contrib/one-tr=
ue-awk/b.c
cc: error: unable to make temporary file: /tmp/b: can't make unique =
filename: Permission denied
*** [b.o] Error code 1
Running truss shows:
=
access("/b/marcelm/buildbot/FreeBSD_arm_arm/build/usr.bin/awk/../../contri=
b/one-true-awk/b.c",0) =3D 0 (0x0)
stat("/tmp/b",{ mode=3Ddrwxr-xr-x ,inode=3D235520,size=3D512,blksize=3D163=
84 }) =3D 0 (0x0)
open("/dev/random",O_RDONLY,00) =3D 3 (0x3)
read(3,"\M^S\M^H\^S65S'*\M-T\M-r\^A9\M-K"...,128) =3D 128 (0x80)
close(3) =3D 0 (0x0)
stat("/tmp/b",{ mode=3Ddrwxr-xr-x ,inode=3D235520,size=3D512,blksize=3D163=
84 }) =3D 0 (0x0)
open("/tmp/b/B8owDb",O_RDWR|O_CREAT|O_EXCL,0600) ERR#13 'Permission =
denied'
Now, if I compile another file, I get:
=
access("/b/marcelm/buildbot/FreeBSD_arm_arm/build/usr.bin/awk/../../contri=
b/one-true-awk/lex.c",0) =3D 0 (0x0)
stat("/tmp/lex",0x7fffffffbab0) ERR#2 'No such file or =
directory'
open("/dev/random",O_RDONLY,00) =3D 3 (0x3)
read(3,"\^F\r\M-J\M-5Z\M-fK\^E\M-2'\M-1"...,128) =3D 128 (0x80)
close(3) =3D 0 (0x0)
stat("/tmp",{ mode=3Ddrwxrwxrwt ,inode=3D2,size=3D9728,blksize=3D16384 =
}) =3D 0 (0x0)
open("/tmp/lex-pDQnPA",O_RDWR|O_CREAT|O_EXCL,0600) =3D 3 (0x3)
close(3) =3D 0 (0x0)
So for some reason when /tmp/<basename> exists and is a directory, then =
the
compiler wants to create a temporary file underneath that directory. =
That
looks like a bug to me. Do people concur and thus shall I file a PR?
--=20
Marcel Moolenaar
marcel@xcllnt.net
--Apple-Mail=_67974C63-D3F4-47AF-93B5-F3975880C18B
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAlL9AgEACgkQpgWlLWHuifYYuwCdFrZIkOM97zSrjFIGe91lAKp7
nYsAn2B3tErg0/42CGk2qn4gYSkxs52y
=x2Bn
-----END PGP SIGNATURE-----
--Apple-Mail=_67974C63-D3F4-47AF-93B5-F3975880C18B--
討論串 (同標題文章)