From owner-freebsd-toolchain@FreeBSD.ORG Thu Feb 13 17:34:02 2014 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1103A0; Thu, 13 Feb 2014 17:34:01 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B97B21C4C; Thu, 13 Feb 2014 17:34:01 +0000 (UTC) Received: from [172.29.0.16] ([66.129.239.12]) (authenticated bits=0) by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id s1DHXwim007786 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 13 Feb 2014 09:34:00 -0800 (PST) (envelope-from marcel@xcllnt.net) From: Marcel Moolenaar Content-Type: multipart/signed; boundary="Apple-Mail=_67974C63-D3F4-47AF-93B5-F3975880C18B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: LLVM bug WRT temporary files? Date: Thu, 13 Feb 2014 09:33:53 -0800 Message-Id: <21FB3229-E39C-424C-B18A-DD5932A32885@xcllnt.net> To: freebsd-toolchain@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) X-Mailer: Apple Mail (2.1827) Cc: "FreeBSD-CURRENT@freebsd.org Current" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 17:34:02 -0000 --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/ 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--