Installing Perl 5.14 on FreeBSD 9.0 amd64

I just downloaded FreeBSD 9.0 amd64 and am using it to set up a home server. I've hit a snag trying to install Perl 5.14 from the lang/perl5.14 port.

The port will compile correctly, but it fails the make test suite. Here are the errors from the test suite:

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

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

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

#   Failed test 'Output file '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/x/w' exists'
#   at t/01_Archive-Extract.t line 479.

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

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

#   Failed test 'Extract dir is expected '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/x''
#   at t/01_Archive-Extract.t line 485.
#          got: undef
#     expected: '/usr/ports/lang/perl5.14/work/perl-5.14.2/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 456.

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

#   Failed test 'Found correct output file 'x/w''
#   at t/01_Archive-Extract.t line 476.

#   Failed test 'Output file '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/x/w' exists'
#   at t/01_Archive-Extract.t line 479.

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

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

#   Failed test 'Extract dir is expected '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/x''
#   at t/01_Archive-Extract.t line 485.
#          got: undef
#     expected: '/usr/ports/lang/perl5.14/work/perl-5.14.2/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 456.

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

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

#   Failed test 'Output file '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 479.

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

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

#   Failed test 'Extract dir is expected '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 485.
#          got: undef
#     expected: '/usr/ports/lang/perl5.14/work/perl-5.14.2/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 456.

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

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

#   Failed test 'Output file '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 479.

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

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

#   Failed test 'Extract dir is expected '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 485.
#          got: undef
#     expected: '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/y'
^M../cpan/Archive-Extract/t/01_Archive-Extract.t .................... 218/?
#   Failed test 'extract() for 'y.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 456.

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

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

#   Failed test 'Output file '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 479.

#   Failed test 'Extract dir is expected '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 485.
#          got: undef
#     expected: '/usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/t/out'
^M../cpan/Archive-Extract/t/01_Archive-Extract.t .................... 1066/? # Looks like you failed 98 tests of 1560.
^M                                                                            ^M../cpan/Archive-Extract/t/01_Archive-Extract.t
 .................... Dubious, test returned 98 (wstat 25088, 0x6200)
Failed 98/1560 subtests
        (less 478 skipped subtests: 984 okay)

Then the bottom is:
Code:
Test Summary Report
-------------------
../cpan/Archive-Extract/t/01_Archive-Extract.t                  (Wstat: 25088 Tests: 1560 Failed: 98)
  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, 663, 665-670, 674
                676-681, 759, 761-766, 770, 772-777, 831
                833-838, 842, 844-849
  Non-zero exit status: 98
../ext/POSIX/t/posix.t                                          (Wstat: 0 Tests: 66 Failed: 0)
  TODO passed:   11
Files=2089, Tests=464818, 816 wallclock secs (49.34 usr  8.55 sys + 433.38 cusr 57.27 csys = 548.54 CPU)
Result: FAIL
*** Error code 98

Stop in /usr/ports/lang/perl5.14/work/perl-5.14.2.
*** Error code 1

Stop in /usr/ports/lang/perl5.14.

I've tried to install Perl 5.12 with the same results. I originally thought it might be a problem in the ports tree, so I reinstalled FreeBSD 8.2 amd64, but had no problems with it. I'm not a Perl programmer, so I have little idea how to go about resolving this.

The only other ports I've installed are shells/bash, editors/nano and maybe archivers/zip. Here's the current listing from pkg_info:
Code:
bash-4.2.20         The GNU Project's Bourne Again SHell
bison-2.5,1         A parser generator from FSF, (mostly) compatible with Yacc
gettext-0.18.1.1    GNU gettext package
libiconv-1.13.1_1   A character set conversion library
libtool-2.4.2       Generic shared library support script
m4-1.4.16,1         GNU m4
nano-2.2.6          Nano's ANOther editor, an enhanced free Pico clone
portaudit-0.5.17    Checks installed ports against a list of security vulnerabi
unzip-6.0_1         List, test and extract compressed files in a ZIP archive
zip-3.0             Create/update ZIP files compatible with pkzip

Thanks for any help.
 
Hi,

I just want to confirm the similar problem on two newly installed servers.
- #1: running FreeBSD 9.0-RELEASE amd64. Succcessful threaded Perl 5.14.2 compilation, but # make test fails;
- #2: running FreeBSD 9.0-RELEASE i386. Successful threaded Perl 5.14.2 compilation, # make test fails. The same result on this server with threaded Perl 5.12.4.

Please help!
 
After some more digging, I've found that modifying the file 01_Archive-Extract.t from:

Code:
use_ok($Class);

to:

Code:
BEGIN { use_ok($Class) };

changes the error. Now I get:

Code:
Use of uninitialized value $module in concatenation (.) or string at /usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/../../lib/Test/More.pm line 853.
Use of uninitialized value $module in concatenation (.) or string at /usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/../../lib/Test/More.pm line 861.
../cpan/Archive-Extract/t/01_Archive-Extract.t .................... 1/?
#   Failed test 'use ;'
#   at t/01_Archive-Extract.t line 41.
Use of uninitialized value $module in concatenation (.) or string at /usr/ports/lang/perl5.14/work/perl-5.14.2/cpan/Archive-Extract/../../lib/Test/More.pm line 867.
#     Tried to use ''.
#     Error:  syntax error at (eval 11) line 2, near "use  @"
Can't locate object method "have_old_bunzip2" via package "Archive::Extract" at t/01_Archive-Extract.t line 215.
# Looks like you failed 1 test of 1.
# Looks like your test exited with 255 just after 1.
../cpan/Archive-Extract/t/01_Archive-Extract.t .................... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/1 subtests

I still have no idea what's going on, or how to fix this. Also, I downloaded FreeBSD 9 amd64 within a day of it being released. The first time I installed it, I didn't have this problem.

Again, any help is appreciated.
 
I need to emphasize this error occured twice on two fresh installed servers from scratch. The only commands executed there after initial install were to install [cmd=]cvsup-without-gui[/cmd] and to upgrade the port tree via [cmd=]cvsup ports-supfile[/cmd]
On the other hand on binary upgraded third i386 platform from 8.2-RELEASE-p6 to 9.0-RELEASE by using [cmd=]freebsd-update -r 9.0-RELEASE upgrade[/cmd] recompiling the userland with [cmd=]portupgrade -af[/cmd] returned no errors at all.
 
Anybody have any ideas on this? I've been trying to solve it for the past three days now and am not making any progress.
 
Long story short... Archive::Extract(3) expects the more common "InfoZIP" version of 'unzip' to be in the base system, while FreeBSD (since 8.0) has taken that name for its own lite version of the command.

*IF* having Archive::Extract work for typical .zip files is important to you or your users:

1) Install the archivers/unzip port
2) Set your PATH variable so that /usr/local/bin is read prior to /usr/bin, or otherwise munge the files' names/locations in such a way that which(1/builtin) returns the InfoZIP version. rehash, hash -r, or what as needed.
3) Reinstall lang/perl5.XX
4) Rerun "make test" to verify

Step (2) is necessary because Archive::Extract is really pretty dumb, and there isn't much of any way around it that I can see.

Good luck!
 
richdawes is correct, this is due to /usr/bin/unzip not supporting the -Z1 flag and really only important if you care about having Archive::Extract work. I recently submitted a change to add support for this and it was committed and MFC'd to stable/8 and stable/9. Using the latest and greatest should fix it, as does having the archivers/unzip port installed. Another potential work around is to install a newer version of Archive::Extract from the archivers/p5-Archive-Extract port.
 
Back
Top