develooper Front page | perl.perl5.porters | Postings from September 2012

Re: [perl #114512] Predictable tmp file names can cause build tofail

Thread Previous
From:
Tony Cook
Date:
September 5, 2012 02:03
Subject:
Re: [perl #114512] Predictable tmp file names can cause build tofail
Message ID:
20120905090340.GA10661@mars.tony.develop-help.com
On Mon, Aug 20, 2012 at 04:03:24AM -0700, Ryan Schmidt wrote:
> If I create the directory /tmp/B (as one user, i.e. "rschmidt"), building perl 5.16.0 (as a different user, i.e. "macports") fails:
> 
> Writing Makefile for B
> make[1]: Entering directory `ext/B'
> make[1]: Leaving directory `ext/B'
> Making all in ext/B
>  /usr/bin/make all PERL_CORE=1 LIBPERL_A=libperl.dylib LINKTYPE=dynamic
> make[1]: Entering directory `ext/B'
> cp B/Showlex.pm ../../lib/B/Showlex.pm
> cp B.pm ../../lib/B.pm
> cp B/Concise.pm ../../lib/B/Concise.pm
> cp B/Terse.pm ../../lib/B/Terse.pm
> cp B/Xref.pm ../../lib/B/Xref.pm
> cp O.pm ../../lib/O.pm
> ../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp  -typemap ../../lib/ExtUtils/typemap -typemap typemap  B.xs > B.xsc && mv B.xsc B.c
> /usr/bin/clang -c   -pipe -O2 -arch x86_64 -arch i386 -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -fstack-protector -I/opt/local/include -O1   -DVERSION=\"1.34\" -DXS_VERSION=\"1.34\"  "-I../.."   B.c
> clang: error: unable to make temporary file: /tmp/B: can't make unique filename: Permission denied
> clang: error: unable to make temporary file: /tmp/B: can't make unique filename: Permission denied
> make[1]: *** [B.o] Error 1
> make[1]: Leaving directory `ext/B'
> Unsuccessful make(ext/B): code=512 at make_ext.pl line 466.
> make: *** [lib/auto/B/B.bundle] Error 25
> 
> The perl build should not be trying to create temporary files of such predictable and collidable names. Solving this problem is what utilities like mktemp(1) are for.

I can't reproduce this on Mountain Lion.

neptune:perl tony$ ./Configure -des -Dusedevel -Dcc=/usr/bin/clang && make -j2
...
Extracting s2p (with variable substitutions)
Linking s2p to psed.
../miniperl -I../lib find2perl.PL
Extracting find2perl (with variable substitutions)
/usr/bin/clang -o a2p -fstack-protector -L/usr/local/lib hash.o str.o util.o walk.o a2p.o -ldl -lm -lutil -lc
 
 
        Everything is up to date. Type 'make test' to run test suite.
neptune:perl tony$ ls -ld /tmp/B
drwx------  2 root  wheel  68 Sep  5 18:28 /tmp/B

Tony

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About