Sparhawk
Sparhawk

Reputation: 1677

How can I fix these failed Perl tests?

Make test fails

I'm attempting to build Perl 5.16.3. However, it's failing at the make test part.

Failed 2 tests out of 2246, 99.91% okay.
    ../cpan/Archive-Extract/t/01_Archive-Extract.t
    ../lib/h2ph.t
### Since not all tests were successful, you may want to run some of
### them individually and examine any diagnostic messages they produce.
### See the INSTALL document's section on "make test".
### You have a good chance to get more information by running
###   ./perl harness
### in the 't' directory since most (>=80%) of the tests succeeded.
### You may have to set your dynamic library search path,
### LD_LIBRARY_PATH, to point to the build directory:
###   setenv LD_LIBRARY_PATH `pwd`; cd t; ./perl harness
###   LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH; cd t; ./perl harness
###   export LD_LIBRARY_PATH=`pwd`; cd t; ./perl harness
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
u=99.10  s=23.36  cu=7851.09  cs=326.70  scripts=2246  tests=528321
makefile:868: recipe for target 'test' failed
make: *** [test] Error 1

Troubleshoot with harness

I wasn't sure how to deal with the vagueness of may have to set, so I ignored it at first. Here is the output (the error is printed below).

$ cd t; ./perl harness ../cpan/Archive-Extract/t/01_Archive-Extract.t ../lib/h2ph.t
../cpan/Archive-Extract/t/01_Archive-Extract.t ..
Dubious, test returned 154 (wstat 39424, 0x9a00)
Failed 154/1704 subtests
    (less 534 skipped subtests: 1016 okay)
../lib/h2ph.t ...................................
Failed 2/6 subtests

Test Summary Report
-------------------
../cpan/Archive-Extract/t/01_Archive-Extract.t (Wstat: 39424 Tests: 1704 Failed: 154)
  Failed tests:  87, 89-94, 98, 100-105, 111, 113-118, 122
                124-129, 255, 257-262, 266, 268-273, 495
                497-502, 506, 508-513, 567, 569-574, 578
                580-585, 615, 617-622, 626, 628-633, 711
                713-718, 722, 724-729, 807, 809-814, 818
                820-825, 879, 881-886, 890, 892-897, 903
                905-910, 914, 916-921, 927, 929-934, 938
                940-945
  Non-zero exit status: 154
../lib/h2ph.t                                 (Wstat: 0 Tests: 6 Failed: 2)
  Failed tests:  5-6
Files=2, Tests=1710, 38 wallclock secs ( 3.60 usr  0.15 sys + 16.97 cusr  6.03 csys = 26.75 CPU)
Result: FAIL

Here is the error.

$ cd t; ./perl harness ../cpan/Archive-Extract/t/01_Archive-Extract.t ../lib/h2ph.t
#   Failed test 'extract() for 'double_dir.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'x/w''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'x/w'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x/w' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x'

#   Failed test 'extract() for 'double_dir.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'x/w''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'x/w'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x/w' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x'

#   Failed test 'extract() for 'y.jar' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.jar' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.par' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.par' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.war' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.war' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.ear' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.ear' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'x.jar' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.jar' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.par' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.par' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.ear' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.ear' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.war' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.war' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'
# Looks like you failed 154 tests of 1704.
# Failed test 5 - preamble compiles at ../lib/h2ph.t line 49
#      got 'Illegal declaration of subroutine main::__has_include at _h2ph_pre.ph line 754.
# '
# expected /(?^:syntax OK$)/
# Failed test 6 - output free of warnings at ../lib/h2ph.t line 56
#      got "Illegal character in prototype for main::__has_include : STR at _h2ph_pre.ph line 754.\nCompilation failed in require at lib/h2ph.pht line 1.\nCompilation failed in require at -e line 1.\n"
# expected ""

I then tried again with cd ..; export LD_LIBRARY_PATH=$(pwd); cd t; ./perl harness ../cpan/Archive-Extract/t/01_Archive-Extract.t ../lib/h2ph.t, but the same tests failed.

I'm building on a Raspberry Pi running Raspbian (based on Debian). How can I build Perl without the tests failing?

Investigating the source

I had a look at the source code of the test, but I couldn't really understand it. For example, the first fail in the error states

Failed test 'extract() for 'double_dir.zip' reports success (PP: 0 Bin: 1)'
at t/01_Archive-Extract.t line 478.

In ../cpan/Archive-Extract/t/01_Archive-Extract.t, line 478 is

ok( $rv, "extract() for '$archive' reports success ($cfg)");

I can't really see what it's trying to test above this point. (The rest of this test is viewable here.

I installed and then attempted to upgrade Archive::Extract via CPAN.

As per this answer, I attempted to persist with make install regardless, then upgrade Archive::Extract via CPAN. make install worked fine. (I was installing in parallel to my distribution's Perl, in /opt instead, so I had used ./Configure -des -Dprefix=/opt/perl-5.16.3-LMS -Dusethreads.)

I then attempted to upgrade Archive::Extract via CPAN. The install was killed, then left some kind of dangling job, although the quoted pid did not exist. I followed the recommendations and attempted to upgrade CPAN itself, but that install was also killed. (This had the same output, but I'm out of words.)

osmc@osmc:/opt/perl-5.16.3-LMS/bin$ ./perl -MCPAN -eshell
Enter 'h' for help.

cpan[1]> install Archive::Extract
Reading '/home/osmc/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Reading '/home/osmc/.cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Sun, 19 Jul 2015 06:17:02 GMT
  HTTP::Date not available
..............
  New CPAN.pm version (v2.10) available.
  [Currently running version is v1.9800]
  You might want to try
    install CPAN
    reload cpan
  to both upgrade CPAN.pm and run the new version without leaving
  the current session.


......................................................Killed
osmc@osmc:/opt/perl-5.16.3-LMS/bin$ ./perl -MCPAN -eshell
Terminal does not support AddHistory.

There seems to be running another CPAN process (pid 13152).  Contacting...
Other job not responding. Shall I overwrite the lockfile '/home/osmc/.cpan/.lock'? (Y/n) [y] y

cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.

cpan[1]> install CPAN

I'm not sure if relevant, but I've never really had CPAN working on this system, as per my comments to this answer.

Upvotes: 5

Views: 6239

Answers (1)

Sinan Ünür
Sinan Ünür

Reputation: 118118

Since Archive::Extract is on CPAN, one option you have is to do make install with the perl you just built, and then update to the latest version of Archive::Extract, and see if the test failures still exist.

If the failures persist, switch to the build directory for Archive::Extract and run the tests in debug mode:

$ perl -Iblib t\01_Archive-Extract.t 1

(You might want to save the output to a file).

From the looks of it, at least some of the failures are related to tests involving compressed tar files (gzip, xz, bzip etc). One possibility is that your tar and/or other command line utilities do not match what Archive::Extract expects.

The debug output should help pinpoint the problem. Please update your question with the debug output from running the tests. No need to use pastebin or similar services. No need to post source code of the module you are trying to install as it is available on CPAN.

Update: Installing a module from CPAN does not require using the CPAN shell.

Download the latest tarball, extract it, and do:

$ wget https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Archive-Extract-0.76.tar.gz
$ tar -xvf Archive-Extract-0.76.tar.gz
$ cd Archive-Extract-0.76
$ perl Makefile.PL
$ nmake
$ perl -Iblib t\1_Archive-Extract.t 1

Upvotes: 1

Related Questions