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

[perl #114512] Predictable tmp file names can cause build to fail

Thread Next
From:
Ryan Schmidt
Date:
August 24, 2012 22:25
Subject:
[perl #114512] Predictable tmp file names can cause build to fail
Message ID:
rt-3.6.HEAD-11172-1345460604-1906.114512-75-0@perl.org
# New Ticket Created by  Ryan Schmidt 
# Please include the string:  [perl #114512]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=114512 >



This is a bug report for perl from perlbug@ryandesign.com,
generated with the help of perlbug 1.39 running under perl 5.16.0.


-----------------------------------------------------------------
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.
-----------------------------------------------------------------
---
Flags:
    category=install
    severity=low
---
Site configuration information for perl 5.16.0:

Configured by rschmidt at Mon Aug 20 05:31:19 CDT 2012.

Summary of my perl5 (revision 5 version 16 subversion 0) configuration:
   
  Platform:
    osname=darwin, osvers=12.0.0, archname=darwin-thread-multi-2level
    uname='darwin poppins.local 12.0.0 darwin kernel version 12.0.0: sun jun 24 23:00:16 pdt 2012; root:xnu-2050.7.9~1release_x86_64 x86_64 '
    config_args='-D inc_version_list=5.16.0/darwin-thread-multi-2level 5.16.0  -des -Dprefix=/opt/local -Dscriptdir=/opt/local/bin -Dcppflags=-I/opt/local/include -Dccflags=-pipe -O2   -Dldflags=-L/opt/local/lib   -Dvendorprefix=/opt/local -Dusemultiplicity=y -Dusethreads -Duseshrplib -D cc=/usr/bin/clang -D ld=/usr/bin/clang -D man1ext=1pm -D man3ext=3pm -D man1dir=/opt/local/share/man/man1p -D man3dir=/opt/local/share/man/man3p -D sitebin=/opt/local/libexec/perl5.16/sitebin -D siteman1dir=/opt/local/share/perl5.16/siteman/man1 -D siteman3dir=/opt/local/share/perl5.16/siteman/man3 -D vendorbin=/opt/local/libexec/perl5.16 -D vendorman1dir=/opt/local/share/perl5.16/man/man1 -D vendorman3dir=/opt/local/share/perl5.16/man/man3 -D pager=/usr/bin/less -sR -D perlpath=/opt/local/bin/perl5.16 -D startperl=#!/opt/local/bin/perl5.16'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='/usr/bin/clang', ccflags ='-pipe -O2   -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -fstack-protector -I/opt/local/include',
    optimize='-O3',
    cppflags='-I/opt/local/include -no-cpp-precomp -pipe -O2  -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -fstack-protector -I/opt/local/include'
    ccversion='', gccversion='4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 /usr/bin/clang', ldflags ='-L/opt/local/lib   -fstack-protector'
    libpth=/opt/local/lib /usr/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-L/opt/local/lib   -bundle -undefined dynamic_lookup -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.16.0:
    /opt/local/lib/perl5/site_perl/5.16.0/darwin-thread-multi-2level
    /opt/local/lib/perl5/site_perl/5.16.0
    /opt/local/lib/perl5/vendor_perl/5.16.0/darwin-thread-multi-2level
    /opt/local/lib/perl5/vendor_perl/5.16.0
    /opt/local/lib/perl5/5.16.0/darwin-thread-multi-2level
    /opt/local/lib/perl5/5.16.0
    /opt/local/lib/perl5/site_perl
    /opt/local/lib/perl5/vendor_perl
    .

---
Environment for perl 5.16.0:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/rschmidt
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/Users/rschmidt/scripts:/opt/local/bin:/opt/local/sbin:/opt/local/share/subversion/contrib/client-side/svn_load_dirs:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Next


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