Installing Perl 5.14 on FreeBSD 9.0 amd64

Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Installing Perl 5.14 on FreeBSD 9.0 amd64

Postby mattruut » 12 Feb 2012, 22:56

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 [port]lang/perl5.14[/port] port.

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

Code: Select all
#   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: Select all
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 [port]shells/bash[/port], [port]editors/nano[/port] and maybe [port]archivers/zip[/port]. Here's the current listing from [FILE]pkg_info[/FILE]:
Code: Select all
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.
mattruut
Junior Member
 
Posts: 9
Joined: 12 Feb 2012, 22:46

Postby lyubomirrussev » 13 Feb 2012, 21:00

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 [cmd=#]make test[/cmd] fails;
- #2: running FreeBSD 9.0-RELEASE i386. Successful threaded Perl 5.14.2 compilation, [cmd=#]make test[/cmd] fails. The same result on this server with threaded Perl 5.12.4.

Please help!
lyubomirrussev
Junior Member
 
Posts: 16
Joined: 15 May 2010, 06:22

Postby mattruut » 13 Feb 2012, 23:43

After some more digging, I've found that modifying the file [FILE]01_Archive-Extract.t[/FILE] from:

Code: Select all
use_ok($Class);


to:

Code: Select all
BEGIN { use_ok($Class) };


changes the error. Now I get:

Code: Select all
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.
mattruut
Junior Member
 
Posts: 9
Joined: 12 Feb 2012, 22:46

Postby lyubomirrussev » 14 Feb 2012, 05:43

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.
lyubomirrussev
Junior Member
 
Posts: 16
Joined: 15 May 2010, 06:22

Postby mattruut » 16 Feb 2012, 00:38

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.
mattruut
Junior Member
 
Posts: 9
Joined: 12 Feb 2012, 22:46

Postby lyubomirrussev » 05 Mar 2012, 12:39

Maybe all the users are installing precompiled Perl package on FreeBSD 9.0-RELEASE...
lyubomirrussev
Junior Member
 
Posts: 16
Joined: 15 May 2010, 06:22

Postby SirDice » 05 Mar 2012, 12:51

Port builds, installs and works fine.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16131
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby richdawes » 08 Mar 2012, 10:51

Long story short... [FILE]Archive::Extract(3)[/FILE] 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 [FILE]Archive::Extract[/FILE] work for typical .zip files is important to you or your users:

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

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

Good luck!
richdawes
Junior Member
 
Posts: 2
Joined: 20 Feb 2011, 01:20
Location: San Diego, Calif. (USA)

Postby lyubomirrussev » 15 Mar 2012, 10:34

Thank you very much richdawes! It works this way.
lyubomirrussev
Junior Member
 
Posts: 16
Joined: 15 May 2010, 06:22

Postby DutchDaemon » 15 Mar 2012, 12:31

@mattruut - does this solve things for you as well?
User avatar
DutchDaemon
Old Fart
 
Posts: 10461
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby swills » 16 Apr 2012, 12:39

richdawes is correct, this is due to [FILE]/usr/bin/unzip[/FILE] not supporting the -Z1 flag and really only important if you care about having [FILE]Archive::Extract[/FILE] 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 [port]archivers/unzip[/port] port installed. Another potential work around is to install a newer version of [FILE]Archive::Extract[/FILE] from the [port]archivers/p5-Archive-Extract[/port] port.
swills
Junior Member
 
Posts: 60
Joined: 17 Nov 2008, 19:39


Return to Installation and Maintenance of FreeBSD Ports or Packages

Who is online

Users browsing this forum: No registered users and 2 guests