in reply to Re: PDL::Graphics::PLplot fails on install
in thread PDL::Graphics::PLplot fails on install

./cpanm -L PDL::Graphics::PLplot; I tried force as well. Description: Ubuntu 16.04.7 LTS

Replies are listed 'Best First'.
Re^3: PDL::Graphics::PLplot fails on install
by syphilis (Archbishop) on Aug 20, 2020 at 01:27 UTC
    Hi newperldeveloper,

    The PDL::Graphics::PLplot distro is cunningly designed to play tricks. Here's what I get on Ubuntu-18.04, perl-5.32.0:
    $ cpanm -i PDL::Graphics::PLplot --> Working on PDL::Graphics::PLplot Fetching http://www.cpan.org/authors/id/D/DH/DHUNT/PDL-Graphics-PLplot +-0.74.tar.gz ... OK Configuring PDL-Graphics-PLplot-0.74 ... OK Building and testing PDL-Graphics-PLplot-0.74 ... OK Successfully installed PDL-Graphics-PLplot-0.74 1 distribution installed $
    But then:
    $ perl -MPDL::Graphics::PLplot -le 'print "ok";' Can't locate PDL/Graphics/PLplot.pm in @INC (you may need to install t +he PDL::Graphics::PLplot module) (@INC contains: /home/sisyphus/perl- +5.32.0-d/lib/site_perl/5.32.0/x86_64-linux /home/sisyphus/perl-5.32.0 +-d/lib/site_perl/5.32.0 /home/sisyphus/perl-5.32.0-d/lib/5.32.0/x86_6 +4-linux /home/sisyphus/perl-5.32.0-d/lib/5.32.0). BEGIN failed--compilation aborted.
    Turns out that I don't have the plplot library installed.
    The PDL-Graphics-PLplot distro is designed to fool the cpan and cpanm utilities into thinking that the build was a success, even when it failed.
    The cpan utility makes things a little more apparent:
    $ cpan -i PDL::Graphics::PLplot Loading internal logger. Log::Log4perl recommended for better logging Reading '/home/sisyphus/.cpan/Metadata' Database was generated on Thu, 20 Aug 2020 00:17:03 GMT Running install for module 'PDL::Graphics::PLplot' Checksum for /home/sisyphus/.cpan/sources/authors/id/D/DH/DHUNT/PDL-Gr +aphics-PLplot-0.74.tar.gz ok 'YAML' not installed, will not store persistent state Configuring D/DH/DHUNT/PDL-Graphics-PLplot-0.74.tar.gz with Makefile.P +L PDL is installed Checking PDL::Graphics::PLplot... Searching for libplplot.so library. Searching for libplplotd.so library. Cannot find plplot library (libplplotd.so), skipping PDL::Graphics::PL +plot Not building PDL::Graphics::PLplot Cannot find plplot library (libplplotd.so), skipping PDL::Graphics::PL +plot Not building PDL::Graphics::PLplot Checking if your kit is complete... Looks good DHUNT/PDL-Graphics-PLplot-0.74.tar.gz /home/sisyphus/perl-5.32.0-d/bin/perl Makefile.PL -- OK Running make for D/DH/DHUNT/PDL-Graphics-PLplot-0.74.tar.gz Could not read metadata file. Falling back to other methods to determi +ne prerequisites make: Nothing to be done for 'all'. DHUNT/PDL-Graphics-PLplot-0.74.tar.gz /usr/bin/make -- OK The current configuration of allow_installing_outdated_dists is 'ask/y +es', but for this option we would need 'CPAN::DistnameInfo' installed +. Please install 'CPAN::DistnameInfo' as soon as possible. As long as + we are not equipped with 'CPAN::DistnameInfo' this option does not t +ake effect Running make test for DHUNT/PDL-Graphics-PLplot-0.74.tar.gz make: Nothing to be done for 'test'. DHUNT/PDL-Graphics-PLplot-0.74.tar.gz /usr/bin/make test -- OK Running make install for DHUNT/PDL-Graphics-PLplot-0.74.tar.gz make: Nothing to be done for 'install'. DHUNT/PDL-Graphics-PLplot-0.74.tar.gz /usr/bin/make install -- OK
    See ? Everything went fine, including /usr/bin/make install ;-)

    So, I'm thinking that you, too, might not have the plplot library installed.
    If that's not the case, let me know how I can get apt-get to install the plplot library on Ubuntu and I'll investigate your problem further.

    Cheers,
    Rob
      apt install libplplot-dev, but I experience the problem reported in issue 6.

        apt install libplplot-dev, but I experience the problem reported in issue 6

        Yep, sudo apt-get install libplplot-dev worked fine. Thanks !

        I don't experience the problem reported in issue 6, perhaps because I'm trying to install version 0.74. The PLplot.so loads without any problem - but there are some test failures (including a segfault):
        Test Summary Report ------------------- t/plplot.t (Wstat: 139 Tests: 15 Failed: 0) Non-zero wait status: 139 Parse errors: No plan found in TAP output t/plplot_library_tests.t (Wstat: 1024 Tests: 210 Failed: 4) Failed tests: 69, 71, 124-125 Non-zero exit status: 4 Files=3, Tests=225, 42 wallclock secs ( 0.08 usr 0.01 sys + 18.27 cus +r 2.41 csys = 20.77 CPU) Result: FAIL
        As regards t/plplot.t:
        $ perl -Mblib t/plplot.t ok 1 - An object of class 'PDL::Graphics::PLplot' isa 'PDL::Graphics:: +PLplot' ok 2 - Simple line plot ok 3 - Simple line plot with LINEWIDTH specified ok 4 - Symbol plot ok 5 - Lines and symbols ok 6 - Sample layer statistics plot ok 7 - Setting pagesize ok 8 - Line plot with gaps (plgapline) ok 9 - Setting JUSTify = 1 ok 10 - Printing text inside and outside of plot window ok 11 - Colored symbol plot with key ok 12 - Colored symbol plot with key: reverse rainbow ok 13 - Colored symbol plot with key, via low level interface ok 14 - plgvpd call works correctly ok 15 - plgvpw call works correctly Segmentation fault (core dumped)
        Not sure how many tests t/plplot.t wants to run (no_plan), but ok() gets called more than 15 times.
        At least the module is installable .... and usable, unless you want to utilize any of the features that are failing/segfaulting.

        Cheers,
        Rob
        Issue 6 was "couldn't find c_plshade1". This was because plplot 5.14.0 deprecated it, and modern packagers don't add the flag to enable deprecated code. PDL::Graphics::PLplot 0.75+ uses the updated API and doesn't have this problem now.
      In my error log I did not get Cannot find plplot library (libplplotd.so) I did get a few others that I am going to install. Cannot find hdf library, libdf.a. Cannot find GD library and Cannot find Proj library I am going to try cpan -i PDL::Graphics::PLplot to see if I get any different messages.
        I did get a few others that I am going to install. Cannot find hdf library, libdf.a. Cannot find GD library and Cannot find Proj library

        Those messages regarding missing libraries would have appeared during the building of the PDL module. When building the PDL module, no attempt is made to locate PLplot. You won't get to see Cannot find plplot library (libplplotd.so) until you attempt to build the PDL::Graphics::PLplot module (if libplplotd.so can't be found).

        Having installed hdf, GD, and Proj you will then have to rebuild PDL in order for PDL to make use of those libraries. (I think cpan -fi PDL will provide you with that rebuild.)

        I am going to try cpan -i PDL::Graphics::PLplot to see if I get any different messages.
        Yes, I think that's probably the best approach.

        Cheers,
        Rob
      I believe you are on to something here.