Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Building perl fails tests with 01_Archive-Extract.t, stress.t and h2ph.t

by Montronaloya (Initiate)
on Aug 18, 2015 at 13:48 UTC ( [id://1139013]=perlquestion: print w/replies, xml ) Need Help??

Montronaloya has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to install Logitech Media Server aka slimserver on a Raspberry Pi running OSMC (Raspbian derivative). It's been failing in several unique ways, and my latest attempt has been to build perl 5.14.1 manually, as per a tutorial that PerlMonks won't let me link to. I've gotten errors at make test. I'm a total newcomer to perl, although I have some experience in coding in bash and ruby.

$ wget http://www.cpan.org/src/5.0/perl-5.14.1.tar.gz $ tar -xzf perl-5.14.1.tar.gz $ cd perl-5.14.1 $ ./Configure -des -Dprefix=/opt/perl-5.14.1-LMS -Dusethreads $ make $ make test ... Failed 3 tests out of 2025, 99.85% okay. ../cpan/Archive-Extract/t/01_Archive-Extract.t ../dist/threads-shared/t/stress.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 harn +ess ### 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=110.15 s=25.49 cu=7271.99 cs=397.44 scripts=2025 tests=461684 makefile:854: recipe for target 'test' failed make: *** [test] Error 1

I attempted to troubleshoot with harness.

$ cd t $ ./perl harness ../cpan/Archive-Extract/t/01_Archive-Extract.t ../dis +t/threads -shared/t/stress.t ../lib/h2ph.t
The output of harness is 410 lines long; here are the first two failed tests.
# 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'

In addition, I was confused by the instructions from make test that I "may have to" set my dynamic library search path, so I also tried

$ cd ..; export LD_LIBRARY_PATH=$(pwd); cd t; ./perl harness ../cpan/A +rchive-Extract/t/01_Archive-Extract.t ../dist/threads-shared/t/stress +.t ../lib/h2ph.t

This failed in a very similar fashion.

I tried investigating the source code, but couldn't make sense of it. The first error states

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

In ../cpan/Archive-Extract/t/01_Archive-Extract.t, line 456 is ok( $rv, "extract() for '$archive' reports success ($cfg)"); but that makes no sense to me. I looked above this line, but that also made no sense.

I tried make install anyway, which appeared to work. (Actually I did sudo checkinstall make install-strip). I then attempted to use CPAN to install the non-working modules. I'd actually prefer not to do this. The reason I'm building an old version of perl is because the newer ones don't work with Logitech Media Server. I'm not sure whether upgrading specific parts would prevent it from working. In any case, I went on with the install, which failed.

osmc@osmc:/opt/perl-5.14.1-LMS/bin$ ./perl -MCPAN -eshell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.9600) Enter 'h' for help. cpan[1]> install Archive::Extract Fetching with HTTP::Tiny: http://cpan.mirrors.ilisys.com.au/authors/01mailrc.txt.gz Going to read '/home/osmc/.cpan/sources/authors/01mailrc.txt.gz' ...................................................................... +......DONE Fetching with HTTP::Tiny: http://cpan.mirrors.ilisys.com.au/modules/02packages.details.txt.gz Going to read '/home/osmc/.cpan/sources/modules/02packages.details.txt +.gz' Database was generated on Tue, 18 Aug 2015 12:17:02 GMT HTTP::Date not available .............. New CPAN.pm version (v2.10) available. [Currently running version is v1.9600] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session. ..............................................................DONE Fetching with HTTP::Tiny: http://cpan.mirrors.ilisys.com.au/modules/03modlist.data.gz Going to read '/home/osmc/.cpan/sources/modules/03modlist.data.gz' DONE Going to write /home/osmc/.cpan/Metadata Running install for module 'Archive::Extract' Running make for B/BI/BINGOS/Archive-Extract-0.76.tar.gz Fetching with HTTP::Tiny: http://cpan.mirrors.ilisys.com.au/authors/id/B/BI/BINGOS/Archive-Extra +ct-0.76.tar.gz Fetching with HTTP::Tiny: http://cpan.mirrors.ilisys.com.au/authors/id/B/BI/BINGOS/CHECKSUMS Checksum for /home/osmc/.cpan/sources/authors/id/B/BI/BINGOS/Archive-E +xtract-0.76.tar.gz ok Scanning cache /home/osmc/.cpan/build for sizes Use of uninitialized value $newdir in substitution (s///) at /opt/perl +-5.14.1-LMS/lib/5.14.1/armv6l-linux-thread-multi/Cwd.pm line 502. Use of uninitialized value $newdir in chdir at /opt/perl-5.14.1-LMS/li +b/5.14.1/armv6l-linux-thread-multi/Cwd.pm line 510. Use of chdir('') or chdir(undef) as chdir() is deprecated at /opt/perl +-5.14.1-LMS/lib/5.14.1/armv6l-linux-thread-multi/Cwd.pm line 510. Use of uninitialized value $newdir in pattern match (m//) at /opt/perl +-5.14.1-LMS/lib/5.14.1/armv6l-linux-thread-multi/Cwd.pm line 525. Use of uninitialized value $newdir in split at /opt/perl-5.14.1-LMS/li +b/5.14.1/armv6l-linux-thread-multi/Cwd.pm line 531. DONE Uncompressed /home/osmc/.cpan/sources/authors/id/B/BI/BINGOS/Archive-E +xtract-0.76.tar.gz successfully Using Tar:/bin/tar xf "Archive-Extract-0.76.tar": Couldn't untar Archive-Extract-0.76.tar Package seems to come without Makefile.PL. (The test -f "/home/osmc/.cpan/build/BINGOS-nwA8kc/Makefile.PL" retu +rned false.) Writing one on our own (setting NAME to ArchiveExtract) Had problems unarchiving. Please build manually Running make test Make had some problems, won't test Running make install Make had some problems, won't install Failed during this command: BINGOS/Archive-Extract-0.76.tar.gz : unwrapped NO -- untar +failed

How can I successfully build perl?

EDIT

This is the tutorial that I am trying to follow, and the reason for building the older version of perl.

Replies are listed 'Best First'.
Re: Building perl fails tests with 01_Archive-Extract.t, stress.t and h2ph.t
by Tux (Canon) on Aug 18, 2015 at 14:36 UTC

    You'll probably have a (very) good reson to build a perl distribution that is over 4 years old.

    It is likely that Devel::PatchPerl can be of help. This will update the distribution to match more recent development state.

    Of course you need a running perl to use it

    use strict; use warnings; use Devel::PatchPerl; Devel::PatchPerl->patch_source ("5.14.1", "/here/deeper/perl-5.14.1");

    Enjoy, Have FUN! H.Merijn
      I've now edited my post with the link recommending the perl downgrade. I originally tried using the default perl, and Logitech Media Server failed. Preferably I'd like to keep two versions of perl installed. The system version would be the current perl available from the repos (5.20.2), and the older version only used by Logitech Media Server. The latter would be installed at /opt as per the -Dprefix flag in ./Configure (and the link recommendations). However, if I can't get this to work, I'll attempt to modify the sole perl install as you suggest. Thanks for the advice.
Re: Building perl fails tests with 01_Archive-Extract.t, stress.t and h2ph.t
by 1nickt (Canon) on Aug 18, 2015 at 14:29 UTC

    How can I successfully build perl?

    You have! You used Perl to run CPAN.pm interactively to download a new copy of Archive::Extract.

    The latest error you get,

    Using Tar:/bin/tar xf "Archive-Extract-0.76.tar": Couldn't untar Archive-Extract-0.76.tar
    is from your system, not from Perl.

    FWIW I downloaded and successfully untarred the file with bsdtar 2.8.3 - libarchive 2.8.3 on OS X.

    I cannot speak to the other errors thrown by the other modules that are failing to install.

    The way forward always starts with a minimal test.
      I imagine that I've installed perl, but not totally successfully. Probably most things work, but since make test fails, not everything is working perfectly. After installing perl, I've gone further down the path, and Logitech Media Server fails, so I guess some of the failed make parts are relevant. I suppose I need to fix the failed tests so that Logitech Media Server works properly. (Or at least so I can exclude them from causing the problems.)
Re: Building perl fails tests with 01_Archive-Extract.t, stress.t and h2ph.t
by jjap (Monk) on Aug 18, 2015 at 14:48 UTC
    It is not obvious from your post that upgrading to Perl 5.14 would be the solution.

    If it is really the course of action, I would recommend you do a bit of reading as Perl as a special status within Debian (on which Raspbian is based).

    https://wiki.debian.org/Perl#Perl_and_Debian

    I'll risk being slightly off topic (and perhaps out of my league) to share that I have SlimServer running on Ubuntu 14.04 which probably has Perl 5.12. Although I cannot verify at this point in time, I doubt SlimServer has requirements for a much more modern version of Perl than whatever is shipped with a regular distribution. Hence my suggestion to examine more carefully the causes upstream of the Perl version.

    HTH and best of luck
      I think you misunderstand. The perl that is installed by default through the Raspbian repos is 5.20.2. I'm trying to downgrade my perl version. Thanks for the link. I've read similar things, which is why I attempted to install in an alternative location (/opt), leaving the system perl in the normal location.
Re: Building perl fails tests with 01_Archive-Extract.t, stress.t and h2ph.t
by Anonymous Monk on Aug 18, 2015 at 15:26 UTC
    Uncompressed /home/osmc/.cpan/sources/authors/id/B/BI/BINGOS/Archive-Extract-0.76.tar.gz successfully
    Using Tar:/bin/tar xf "Archive-Extract-0.76.tar": Couldn't untar Archive-Extract-0.76.tar
    What happens when you try to tar xf Archive-Extract-0.76.tar manually? You do have tar installed in that location, don't you? (it's rather hard to have Debian installed without a tar, but it is possible)
      I unzipped the .gz, then copy-pasted the command to untar the .tar, which worked perfectly. As stated in the question, I suspect that CPAN is not the way to go, although the output might be useful from a troubleshooting perspective.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1139013]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-24 19:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found