perlboy_emeritus has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Missing sub-module of PDL::Graphics::Simple
by cavac (Prior) on Aug 13, 2023 at 11:00 UTC | |
by perlboy_emeritus (Scribe) on Aug 13, 2023 at 16:35 UTC | |
by NERDVANA (Priest) on Aug 15, 2023 at 01:11 UTC | |
by perlboy_emeritus (Scribe) on Aug 15, 2023 at 13:46 UTC | |
by perlboy_emeritus (Scribe) on Aug 13, 2023 at 18:03 UTC | |
by perlboy_emeritus (Scribe) on Aug 13, 2023 at 20:07 UTC | |
by etj (Priest) on Mar 31, 2024 at 17:52 UTC | |
|
Re: Missing sub-module of PDL::Graphics::Simple
by Anonymous Monk on Aug 14, 2023 at 00:23 UTC | |
by perlboy_emeritus (Scribe) on Aug 15, 2023 at 00:05 UTC |