Subject: | make test fails when built from within ext/ subdirectory of Perl core build tree |
Reproducible in 2.42.
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris-64
uname='sunos lonwebhost11 5.8 generic_108528-20 sun4u sparc sunw,ultra-4 '
config_args='-Dprefix=/opt/perl-5.6.1_64bit -Dcf_email=xxxx@xxxx.com -Dcc=gcc -Doptimize=-O3 -Dd_bincompat3=undef -Dpager=/usr/local/bin/less -Dusemymalloc=yes -Dloclibpth=/opt/gdbm-1.8.0/lib /opt/db-1.85/lib -Dlocincpth=/opt/gdbm-1.8.0/include /opt/db-1.85/include -Duse64bitall -Dstartperl=#!/opt/perl-5.6.1_64bit/bin/perl -desO'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
Compiler:
cc='gcc', ccflags ='-mcpu=v9 -m64 -Wa,-xarch=v9 -fno-strict-aliasing -I/opt/db-1.85/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O3',
cppflags='-mcpu=v9 -m64 -Wa,-xarch=v9 -fno-strict-aliasing -I/opt/db-1.85/include'
ccversion='', gccversion='3.2.2', gccosandvers='solaris2.8'
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
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, usemymalloc=y, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -m64 -L/opt/db-1.85/lib '
libpth=/opt/db-1.85/lib /usr/lib /usr/ccs/lib /usr/local/lib
libs=-lsocket -lnsl -ldb -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags=' -G -m64 -L/opt/db-1.85/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
Built under solaris
Compiled at Nov 4 2004 19:26:37
@INC:
/opt/perl-5.6.1_64bit/lib/5.6.1/sun4-solaris-64
/opt/perl-5.6.1_64bit/lib/5.6.1
/opt/perl-5.6.1_64bit/lib/site_perl/5.6.1/sun4-solaris-64
/opt/perl-5.6.1_64bit/lib/site_perl/5.6.1
/opt/perl-5.6.1_64bit/lib/site_perl
.
When distribution is unpacked within ext/ subdirectory of Perl core build tree, make test fails because the Makefile picks up {INST,PERL}_{ARCH,}LIB from the core build tree:
[BP/sparcv9] Test-Harness-2.42 $ grep '\.\./lib' Makefile
INST_LIB = ../../lib
INST_ARCHLIB = ../../lib
PERL_LIB = ../../lib
PERL_ARCHLIB = ../../lib
[BP/sparcv9] Test-Harness-2.42 $ make test
Skip ../../lib/Test/Harness.pm (unchanged)
Skip ../../lib/Test/Harness/Assert.pm (unchanged)
Skip ../../lib/Test/Harness/Iterator.pm (unchanged)
Skip ../../lib/Test/Harness/Straps.pm (unchanged)
cp bin/prove blib/script/prove
/opt/perl-5.6.1_64bit/bin/perl -I../../lib -I../../lib -MExtUtils::MakeMaker -e "MY->fixin(shift)" blib/script/prove
PERL_DL_NONLAZY=1 /opt/perl-5.6.1_64bit/bin/perl -I../../lib -I../../lib -I../../lib -I../../lib -e 'use Test::Harness qw(&runtests $verbose);
$verbose=0; runtests @ARGV;' t/*.t
t/00compile.........# Testing Test::Harness 2.42
t/00compile.........ok
t/assert............ok
t/base..............ok
t/callback..........ok
t/inc_taint.........ok
t/nonumbers.........ok
t/ok................ok
t/pod...............skipped
all skipped: Test::Pod 1.00 required for testing POD
t/prove-globbing....ok
t/prove-switches....blib/script/prove: Cannot find blib
No blib directories found.
# Failed test (t/prove-switches.t at line 30)
t/prove-switches....NOK 1# Structures begin differing at:
# $got->[0] = '# $Test::Harness::Switches: -T -Ifirst -Isecond -Ithird
# '
# $expected->[0] = '# $Test::Harness::Switches: -T -Iblib/arch -Iblib/lib -Ifirst -Isecond -Ithird
# '
blib/script/prove: Cannot find blib
No blib directories found.
# Failed test (t/prove-switches.t at line 39)
t/prove-switches....NOK 2# Structures begin differing at:
# $got->[0] = '# $Test::Harness::Switches: -t -Ifirst -Isecond -Ithird
# '
# $expected->[0] = '# $Test::Harness::Switches: -t -Iblib/arch -Iblib/lib -Ifirst -Isecond -Ithird
# '
blib/script/prove: Cannot find blib
No blib directories found.
# Failed test (t/prove-switches.t at line 48)
t/prove-switches....NOK 3# Structures begin differing at:
# $got->[0] = '# $Test::Harness::Switches: -Ifark -Ibork
# '
# $expected->[0] = '# $Test::Harness::Switches: -Iblib/arch -Iblib/lib -Ifark -Ibork
# '
t/prove-switches....ok 4/5blib/script/prove: Cannot find blib
No blib directories found.
# Failed test (t/prove-switches.t at line 64)
t/prove-switches....NOK 5# Structures begin differing at:
# $got->[0] = '# $Test::Harness::Switches: -Ilib
# '
# $expected->[0] = '# $Test::Harness::Switches: -Ilib -Iblib/arch -Iblib/lib
# '
# Looks like you failed 4 tests of 5.
t/prove-switches....dubious
Test returned status 4 (wstat 1024, 0x400)
DIED. FAILED tests 1-3, 5
Failed 4/5 tests, 20.00% okay
t/strap-analyze.....ok
t/strap.............ok
t/test-harness......ok
62/208 skipped: various reasons
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/prove-switches.t 4 1024 5 4 80.00% 1-3 5
1 test and 62 subtests skipped.
Failed 1/13 test scripts, 92.31% okay. 4/537 subtests failed, 99.26% okay.
make: *** [test_dynamic] Error 11
If the distribution is unpacked and built in /var/tmp, everything works fine.