Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Installing Spreadsheet::ParseXLSX with Perl v5.8.8

by Arik123 (Beadle)
on Mar 20, 2018 at 07:14 UTC ( [id://1211277]=perlquestion: print w/replies, xml ) Need Help??

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

I'm not absolutely sure this question belongs here. Please correct me if I'm wrong.

Spreadsheet::ParseXLSX claims it needs Perl v5.10.0, but I have only v5.8.8 and my sysadmin is much too busy to upgrade. Is there any way to get this module running?

And another question. I have access to another system in which Perl v5.10.1 is installed, but Speadsheet::ParceXLSX isn't. I tried to install it (using local::lib), and failed. I think the problem is that Test::More and Test::Harness aren't installed. I tried to install them both (separately). Installing Test::More fails because it can't locate Test::Harness in @INC, and installing Test::Harness fails, generating many errors that it can't find Test::More in @INC... what's going on? I thought CPAN is supposed to install the the dependencies it needs (I tried the above installations with 'perl -MCPAN -e "install Test::More"'. my .bashrc contains the line 'eval $(perl -I$HOME/lib/perl5 -Mlocal::lib)').

uname -a gives:

Linux name.site.com 2.6.32-573.8.1.el6.x86_64 #1 SMP Tue Nov 10 18:01:38 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

in case it hints someone.

Thanks a lot!

Replies are listed 'Best First'.
Re: Installing Spreadsheet::ParseXLSX with Perl v5.8.8
by marto (Cardinal) on Mar 20, 2018 at 09:42 UTC

    "I thought CPAN is supposed to install the the dependencies it needs"

    It should do, but it depends on the configuration you have. Set:

    cpan> o conf prerequisites_policy follow cpan> o conf build_requires_install_policy yes cpan> o conf commit

    Better still, just use cpanm.

    Update: o conf will list the various key/values your config has.

Re: Installing Spreadsheet::ParseXLSX with Perl v5.8.8
by hippo (Bishop) on Mar 20, 2018 at 09:20 UTC
    uname -a gives: Linux name.site.com 2.6.32-573.8.1.el6.x86_64

    So you're on RHEL6/CentOS6. Just ask your sysadm to install the Test::* modules from yum. The packages are perl-Test-Harness.x86_64 and perl-Test-Simple.x86_64.

    For the older machine one option is to install a newer perl. You can do this in the comfort of your own home directory and therefore not have to bother your poor, overworked sysadm.

      I tried to install a new Perl in the home directory of the older machine. I did:

      wget http://www.cpan.org/src/5.0/perl-5.26.1.tar.gz tar xzf perl-5.26.1.tar.gz cd perl-5.26.1 ./Configure -des -Dprefix=$HOME/localperl make

      'make' generated a lot of (probably uninteresting) output, and eventually failed becasue of:

      sv.o: In function `S_hextract': sv.c:(.text+0xe11): undefined reference to `Perl_fp_class_denorm' collect2: ld returned 1 exit status make: *** [lib/buildcustomize.pl] Error 1

      What is going on?

        This report, blog post and finally this post are among the reports I could find matching this problem. Judging by the kernel version it looks like you're on a pretty old system, similar to these reports, and that the patch to fix the issue didn't quite make it into 5.26.1. I'll check your module installation issue later this morning.

Re: Installing Spreadsheet::ParseXLSX with Perl v5.8.8
by thanos1983 (Parson) on Mar 20, 2018 at 09:39 UTC

    Hello Arik123,

    First of all before I proceed with my answer let me clarify something. I am not an expert on Perl but I found your question interesting and a know a few basic things so I though I might tackle it and provide you with some information. Having said that, if any other fellow Monk finds more information or my answer is either wrong or incomplete please correct me.

    Moving on, why you need Perl 5.10.0 to install Spreadsheet::ParseXLSX. To be honest I see the source code of the module use 5.010; ref Spreadsheet::ParseXLSX/source, but based on my research you might be able to install the module with Perl Minimum version: 5.006.

    How did I jump into this conclusion? Simply see Perl::MinimumVersion::Fast. Sample of code from the mentioned module:

    #!/usr/bin/perl use strict; use warnings; use Perl::MinimumVersion::Fast; # Perl::MinimumVersion::Fast - another module which does the same thin +g. # It's a lot faster, but only supports Perl 5.8.1+. my $filename = 'test.pl'; my $p = Perl::MinimumVersion::Fast->new($filename); print "Minimum: " . $p->minimum_version, "\n"; __END__ $ perl version.pl Minimum: 5.006

    The script that I am testing test.pl:

    #!/usr/bin/perl use strict; use warnings; use Spreadsheet::ParseXLSX;

    But this is not the reason that I believe that you can use Perl version: 5.006. If you take a look on the source code of the Spreadsheet::ParseXLSX/source you will find that is using the following modules:

    use Archive::Zip; use Graphics::ColorUtils 'rgb2hls', 'hls2rgb'; use Scalar::Util 'openhandle'; use Spreadsheet::ParseExcel 0.61; use XML::Twig;

    Then I went to one by one the modules to check their Perl version, here is what I found:

    1) Archive::Zip use 5.006;

    2) Graphics::ColorUtils use 5.008003;

    3) Scalar::Util require List::Util;

    3.1) List::Util require XSLoader;

    3.1.1) XSLoader require DynaLoader;

    3.1.1.1) DynaLoader require AutoLoader;

    3.1.1.1.1) AutoLoader require Carp;

    3.1.1.1.1.1) Carp require Data::Dumper;

    3.1.1.1.1.1.1) Data::Dumper use 5.006_001;

    4) Spreadsheet::ParseExcel use 5.008; (I will not go deeper as it also uses some modules but you get the point).

    5) XML::Twig require 5.004;

    So in conclusion, I think you can install it and it should work with Perl 5.8 also possibly with Perl 5.6 but without all the features as module Graphics::ColorUtils requires Perl 5.8.

    If I was you I would create a small test environment replicating the production environment that you want to apply it and test how it behaves. I think it should work correctly with minimum 5.8 but also possible with 5.6 with limited features.

    Update: Assuming that the proposed solution of fellow Monk hippo will work it could be possible to be applied with Perl 5.6.

    Hope this helps, BR.

    Seeking for Perl wisdom...on the process of learning...not there...yet!
Re: Installing Spreadsheet::ParseXLSX with Perl v5.8.8
by Arik123 (Beadle) on Mar 21, 2018 at 07:45 UTC

    Thank you all for your replies.

    hippo: I failed to install the Test::* modules on the newer machine, as I mentioned. It is the same (busy...) sysadmin.

    thanos: I also figured that the module may work on an older Perl version, but how do I get to install it? it refuses to install, claiming it needs v5.10.0

    marto: I typed in these 'o conf' commands, but there was to change. Test::More failes to install because it needs Test::Harness, and vice versa. I also failed to install App::cpanminus for the same reason - it quits the installation becasue it can't find Test::Harness in @INC

        Okay, here is what I get when trying to install Test::More:

        [myacc@comp ~]$ perl -v This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi Copyright 1987-2009, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge. [myacc@comp ~]$ perl -MCPAN -e 'install Test::More' Reading '/home/myacc/.cpan/Metadata' Database was generated on Wed, 21 Mar 2018 06:54:29 GMT Running install for module 'Test::More' CPAN: checksum security checks disabled because Digest::SHA not inst +alled. Please consider installing the Digest::SHA module. 'YAML' not installed, will not store persistent state Configuring E/EX/EXODIST/Test-Simple-1.302133.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Test::Simple Writing MYMETA.yml and MYMETA.json EXODIST/Test-Simple-1.302133.tar.gz /usr/bin/perl Makefile.PL -- OK Running make for E/EX/EXODIST/Test-Simple-1.302133.tar.gz cp lib/Test2/Event.pm blib/lib/Test2/Event.pm cp lib/Test/Tester/Capture.pm blib/lib/Test/Tester/Capture.pm cp lib/Test/Tester.pm blib/lib/Test/Tester.pm cp lib/Test/Simple.pm blib/lib/Test/Simple.pm cp lib/Test2/API/Instance.pm blib/lib/Test2/API/Instance.pm cp lib/Test/Builder/TodoDiag.pm blib/lib/Test/Builder/TodoDiag.pm cp lib/Test2/Event/Fail.pm blib/lib/Test2/Event/Fail.pm cp lib/Test2/Event/Waiting.pm blib/lib/Test2/Event/Waiting.pm cp lib/Test2/API.pm blib/lib/Test2/API.pm cp lib/Test/use/ok.pm blib/lib/Test/use/ok.pm cp lib/Test/Builder.pm blib/lib/Test/Builder.pm cp lib/Test/Tester/Delegate.pm blib/lib/Test/Tester/Delegate.pm cp lib/Test/More.pm blib/lib/Test/More.pm cp lib/Test2/Event/TAP/Version.pm blib/lib/Test2/Event/TAP/Version.pm cp lib/Test2/Event/Skip.pm blib/lib/Test2/Event/Skip.pm cp lib/Test2/EventFacet/Control.pm blib/lib/Test2/EventFacet/Control.p +m cp lib/Test/Builder/Formatter.pm blib/lib/Test/Builder/Formatter.pm cp lib/Test2/Event/Exception.pm blib/lib/Test2/Event/Exception.pm cp lib/Test2/EventFacet.pm blib/lib/Test2/EventFacet.pm cp lib/Test2/Event/Subtest.pm blib/lib/Test2/Event/Subtest.pm cp lib/Test/Builder/Tester.pm blib/lib/Test/Builder/Tester.pm cp lib/Test/Tutorial.pod blib/lib/Test/Tutorial.pod cp lib/Test2/EventFacet/About.pm blib/lib/Test2/EventFacet/About.pm cp lib/Test2/API/Context.pm blib/lib/Test2/API/Context.pm cp lib/Test2/Event/Plan.pm blib/lib/Test2/Event/Plan.pm cp lib/Test2/Event/Ok.pm blib/lib/Test2/Event/Ok.pm cp lib/Test2/Event/Pass.pm blib/lib/Test2/Event/Pass.pm cp lib/Test2/Event/Bail.pm blib/lib/Test2/Event/Bail.pm cp lib/Test2/EventFacet/Amnesty.pm blib/lib/Test2/EventFacet/Amnesty.p +m cp lib/Test/Builder/Tester/Color.pm blib/lib/Test/Builder/Tester/Color +.pm cp lib/Test2/Event/Diag.pm blib/lib/Test2/Event/Diag.pm cp lib/Test2/EventFacet/Error.pm blib/lib/Test2/EventFacet/Error.pm cp lib/Test2/Event/Generic.pm blib/lib/Test2/Event/Generic.pm cp lib/Test/Builder/Module.pm blib/lib/Test/Builder/Module.pm cp lib/Test2/API/Breakage.pm blib/lib/Test2/API/Breakage.pm cp lib/Test2/API/Stack.pm blib/lib/Test2/API/Stack.pm cp lib/Test/Tester/CaptureRunner.pm blib/lib/Test/Tester/CaptureRunner +.pm cp lib/Test2/Event/Encoding.pm blib/lib/Test2/Event/Encoding.pm cp lib/Test2.pm blib/lib/Test2.pm cp lib/Test/Builder/IO/Scalar.pm blib/lib/Test/Builder/IO/Scalar.pm cp lib/Test2/Event/Note.pm blib/lib/Test2/Event/Note.pm cp lib/Test2/EventFacet/Assert.pm blib/lib/Test2/EventFacet/Assert.pm cp lib/Test2/Event/V2.pm blib/lib/Test2/Event/V2.pm cp lib/ok.pm blib/lib/ok.pm cp lib/Test2/Hub.pm blib/lib/Test2/Hub.pm cp lib/Test2/EventFacet/Meta.pm blib/lib/Test2/EventFacet/Meta.pm cp lib/Test2/IPC/Driver/Files.pm blib/lib/Test2/IPC/Driver/Files.pm cp lib/Test2/IPC/Driver.pm blib/lib/Test2/IPC/Driver.pm cp lib/Test2/EventFacet/Hub.pm blib/lib/Test2/EventFacet/Hub.pm cp lib/Test2/Hub/Interceptor.pm blib/lib/Test2/Hub/Interceptor.pm cp lib/Test2/EventFacet/Trace.pm blib/lib/Test2/EventFacet/Trace.pm cp lib/Test2/Formatter.pm blib/lib/Test2/Formatter.pm cp lib/Test2/EventFacet/Render.pm blib/lib/Test2/EventFacet/Render.pm cp lib/Test2/Hub/Subtest.pm blib/lib/Test2/Hub/Subtest.pm cp lib/Test2/Transition.pod blib/lib/Test2/Transition.pod cp lib/Test2/Util/HashBase.pm blib/lib/Test2/Util/HashBase.pm cp lib/Test2/Util/ExternalMeta.pm blib/lib/Test2/Util/ExternalMeta.pm cp lib/Test2/Tools/Tiny.pm blib/lib/Test2/Tools/Tiny.pm cp lib/Test2/Util.pm blib/lib/Test2/Util.pm cp lib/Test2/Formatter/TAP.pm blib/lib/Test2/Formatter/TAP.pm cp lib/Test2/EventFacet/Plan.pm blib/lib/Test2/EventFacet/Plan.pm cp lib/Test2/EventFacet/Parent.pm blib/lib/Test2/EventFacet/Parent.pm cp lib/Test2/Util/Facets2Legacy.pm blib/lib/Test2/Util/Facets2Legacy.p +m cp lib/Test2/Hub/Interceptor/Terminator.pm blib/lib/Test2/Hub/Intercep +tor/Terminator.pm cp lib/Test2/EventFacet/Info.pm blib/lib/Test2/EventFacet/Info.pm cp lib/Test2/IPC.pm blib/lib/Test2/IPC.pm cp lib/Test2/Util/Trace.pm blib/lib/Test2/Util/Trace.pm Manifying 37 pod documents Manifying 29 pod documents EXODIST/Test-Simple-1.302133.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/l +ib', 'blib/arch')" t/*.t t/Legacy/*.t t/Legacy/Bugs/*.t t/Legacy/Buil +der/*.t t/Legacy/Regression/*.t t/Legacy/Simple/*.t t/Legacy/Test2/*. +t t/Legacy/Tester/*.t t/Legacy/subtest/*.t t/Legacy_And_Test2/*.t t/T +est2/acceptance/*.t t/Test2/behavior/*.t t/Test2/legacy/*.t t/Test2/m +odules/*.t t/Test2/modules/API/*.t t/Test2/modules/Event/*.t t/Test2/ +modules/Event/TAP/*.t t/Test2/modules/EventFacet/*.t t/Test2/modules/ +Formatter/*.t t/Test2/modules/Hub/*.t t/Test2/modules/Hub/Interceptor +/*.t t/Test2/modules/IPC/*.t t/Test2/modules/IPC/Driver/*.t t/Test2/m +odules/Tools/*.t t/Test2/modules/Util/*.t t/Test2/regression/*.t t/re +gression/*.t Can't locate Test/Harness.pm in @INC (@INC contains: /home/myacc/perl5 +/lib/perl5/5.10.1/x86_64-linux-thread-multi /home/myacc/perl5/lib/per +l5/5.10.1 /home/myacc/perl5/lib/perl5/x86_64-linux-thread-multi /home +/myacc/perl5/lib/perl5/5.10.0 /home/myacc/perl5/lib/perl5 /usr/local/ +lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/ +share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .). BEGIN failed--compilation aborted. make: *** [test_dynamic] Error 2 EXODIST/Test-Simple-1.302133.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports EXODIST/Test-Simple-1.302133.tar.gz

        Does it hint anyone?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-03-29 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found