Subject: | Problem Installing on Darwin with 'sudo -i cpan' |
In a recent discussion on Perlmonks, I reported problems using the 'cpan' shell once I had
installed gpg (see: http://perlmonks.org/?node_id=526321). I was advised by Perlmonk
Aristotle to invoke the shell with:
sudo -i cpan
(http://perlmonks.org/?node_id=526653) so that sudo will set up the environment just as it
would be for a logged-in root user.
This worked successfully until tonight when I went to upgrade File::HomeDir to the latest
version. I got test failures in t/02_main.t (see attached: File.HomeDir.failure.txt). This was
surprising, as I had just installed the latest version of File::HomeDir on a Win32 earlier in the
day.
When I downloaded the distro and installed it manually, all tests passed and the module
installed. When I do that, however, I am logged in under my user name and switch to 'sudo'
only at the 'make install' point.
I am running Perl 5.8.7 on Darwin (Mac OS X 10.3); full version info in attached file
perl.minus.v.txt. Note that when I am using 'sudo -i cpan' and hence running 'make test' as
a privileged user, the permissions on the working directory are as listed in attached file
root.permissions.txt.
Jim Keenan
Subject: | root.permissions.txt |
[jimk] 574 $ sudo ls -la /var/root/.cpan/build/File-HomeDir-0.52
total 136
drwxr-xr-x 14 1001 1001 476 17 Feb 22:57 .
drwxr-xr-x 15 root wheel 510 17 Feb 22:57 ..
-rwxr-xr-x 1 1001 1001 1766 4 Jan 07:35 Changes
-rw-r--r-- 1 1001 1001 20217 4 Jan 07:35 LICENSE
-rw-r--r-- 1 1001 1001 553 4 Jan 07:35 MANIFEST
-rw-r--r-- 1 1001 1001 339 4 Jan 07:35 META.yml
-rw-r--r-- 1 root 1001 22571 17 Feb 22:57 Makefile
-rwxr-xr-x 1 1001 1001 634 4 Jan 07:35 Makefile.PL
-rw-r--r-- 1 1001 1001 6330 4 Jan 07:35 README
drwxr-xr-x 8 root 1001 272 17 Feb 22:57 blib
drwxr-xr-x 3 1001 1001 102 4 Jan 07:35 inc
drwxr-xr-x 3 1001 1001 102 4 Jan 07:35 lib
-rw-r--r-- 1 root 1001 0 17 Feb 22:57 pm_to_blib
drwxr-xr-x 5 1001 1001 170 4 Jan 07:35 t
Subject: | File.HomeDir.failure.txt |
CPAN.pm: Going to build A/AD/ADAMK/File-HomeDir-0.52.tar.gz
*** Module::AutoInstall version 1.00
*** Checking for dependencies...
[Core Features]
- Test::More ...loaded. (0.62 >= 0.47)
- File::Spec ...loaded. (3.15 >= 0.80)
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Writing Makefile for File::HomeDir
CPAN: YAML loaded ok
cp lib/File/HomeDir/Darwin.pm blib/lib/File/HomeDir/Darwin.pm
cp lib/File/HomeDir.pm blib/lib/File/HomeDir.pm
cp lib/File/HomeDir/Unix.pm blib/lib/File/HomeDir/Unix.pm
cp lib/File/HomeDir/MacOS9.pm blib/lib/File/HomeDir/MacOS9.pm
cp lib/File/HomeDir/Windows.pm blib/lib/File/HomeDir/Windows.pm
Manifying blib/man3/File::HomeDir.3
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/01_compile.t t/02_main.t t/99_pod.t
t/01_compile....ok
t/02_main.......NOK 8
# Failed test 'Our documents directory exists'
# in t/02_main.t at line 38.
t/02_main.......NOK 10
# Failed test 'Our documents directory exists'
# in t/02_main.t at line 41.
t/02_main.......NOK 12
# Failed test 'Our local data directory exists'
# in t/02_main.t at line 46.
t/02_main.......NOK 14
# Failed test 'Our local data directory exists'
# in t/02_main.t at line 49.
t/02_main.......NOK 16
# Failed test 'Our local data directory exists'
# in t/02_main.t at line 60.
t/02_main.......NOK 18
# Failed test 'Our local data directory exists'
# in t/02_main.t at line 63.
# Looks like you failed 6 tests of 23.
t/02_main.......dubious
Test returned status 6 (wstat 1536, 0x600)
DIED. FAILED tests 8, 10, 12, 14, 16, 18
Failed 6/23 tests, 73.91% okay
t/99_pod........ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/02_main.t 6 1536 23 6 26.09% 8 10 12 14 16 18
Failed 1/3 test scripts, 66.67% okay. 6/35 subtests failed, 82.86% okay.
make: *** [test_dynamic] Error 255
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
cpan>
Subject: | perl.minus.v.txt |
[File-HomeDir-0.52] 563 $ perl -V
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=darwin, osvers=7.9.0, archname=darwin-2level
uname='darwin macintosh.local 7.9.0 darwin kernel version 7.9.0: wed mar 30 20:11:17 pst 2005; root:xnuxnu-517.12.7.obj~1release_ppc power macintosh powerpc '
config_args='-de'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/usr/local/include',
optimize='-Os',
cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build 1495)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-ldbm -ldl -lm -lc
perllibs=-ldl -lm -lc
libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under darwin
Compiled at Oct 24 2005 21:19:21
%ENV:
PERL5LIB="/usr/local/lib/perl5/site_perl"
@INC:
/usr/local/lib/perl5/site_perl/5.8.7/darwin-2level
/usr/local/lib/perl5/site_perl/5.8.7
/usr/local/lib/perl5/site_perl/5.8.4/darwin-2level
/usr/local/lib/perl5/site_perl/5.8.4
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.8.7/darwin-2level
/usr/local/lib/perl5/5.8.7
/usr/local/lib/perl5/site_perl/5.8.7/darwin-2level
/usr/local/lib/perl5/site_perl/5.8.7
/usr/local/lib/perl5/site_perl/5.8.4/darwin-2level
/usr/local/lib/perl5/site_perl/5.8.4
/usr/local/lib/perl5/site_perl
.