Hello Monks

I tried for weeks to get the latest PDL (then, 2.083) to build on macOS High Sierra 10.13.6, but all attempts failed resulting in segmentation fault to pdlcore.c with both clang 9 and 10 (the C++ standard changed, among other things, re pre-processor macro expansion). I teach Applied Linear Algebra with PDL, Python3 and R, and I had all this working in HS but with PDL 2.026. I need to run a PDL at least as capable as my well-heeled students (using daddie's money), so, I gave up and bit the bullet and bought a refurbished macBookPro (lots of Intel macs available from M1/M2 migration) that now runs Monterey 12.6.8, darwin 21.6.0, clang 14.0.0. I checked the PDL testers' logs before I spent the $ and verified that PDL 2.084 builds with this version of clang in Monterey. So, the odyssey, not for the faint-hearted, begins...

  I installed XCode 14.0.1 plus its command line tools; OK
  I installed XQuartz; OK
  I installed perlbrew; OK
  I downloaded and built Perl 5.36.1 with perlbrew; OK
  I downloaded macPorts; OK
  I downloaded and built Gnuplot with macPorts; OK,
    when gnuplot is run standalone it sets terminal type to 'aqua'.
  I used cpanm to get first PDL 2.083 and then 2.084; both OK
  I used cpanm to get PDL::Graphics::Simple; OK
I then attempted to run the simplest test script from the PDLBook, to wit:
#!/usr/bin/env perl -w ##!/usr/bin/env perl -wd use strict; use Data::Dumper; use PDL; use PDL::Graphics::Simple; $Data::Dumper::Purity = 1; imag (sin(rvals(200,200)+1)); sleep 10; exit 0; __END__

This fails with "Can't locate PDL/Graphics/PGPLOT/Window.pm in @INC (you may need to install the PDL::Graphics::PGPLOT::Window module)"

So, I did 'cpanm PDL::Graphics::PGPLOT::Window' and the first messages are:

--> Working on PDL::Graphics::PGPLOT::Window Fetching http://www.cpan.org/authors/id/E/ET/ETJ/PDL-2.084.tar.gz ... +OK Configuring PDL-2.084 ... OK Building and testing PDL-2.084 ... OK Successfully installed PDL-2.084 1 distribution installed

Instead of installing ::Window, it re-installs PDL 2.084, not ::Window.pm, and when I look in site_perl I can verify it did not install that module. Thus, that utterly simple PDL test script fails.

Here is what my ../Simple sub-directory contains:

  -r--r--r--  1 wills  staff  10827 Jan 27  2023 Gnuplot.pm
  -r--r--r--  1 wills  staff  10461 Jan 27  2023 PGPLOT.pm
  -r--r--r--  1 wills  staff  13490 Jan 27  2023 PLplot.pm
  -r--r--r--  1 wills  staff  16637 Jan 27  2023 Prima.pm

and:
../Graphics contains:

  drwxr-xr-x  6 wills  staff    192 Aug 11 17:34 Simple
  -r--r--r--  1 wills  staff  45340 Jan 27  2023 Simple.pm

no PGPLOT/Window.pm

I know this is probably pilot error. What am I missing or doing wrong? Is there perhaps a way to force PDL to use Gnuplot? Simple.pm contains this fragment:

for my $submod(qw/ PGPLOT Gnuplot PLplot Prima /) { eval "use PDL::Graphics::Simple::$submod;"; }

Perhaps putting Gnuplot first in that list would be appropriate in macOS since it does not require that Window.pm module?


In reply to Missing sub-module of PDL::Graphics::Simple by perlboy_emeritus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.