Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

How can I install PDL?

by hsfrey (Beadle)
on Sep 14, 2020 at 01:04 UTC ( [id://11121703]=perlquestion: print w/replies, xml ) Need Help??

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

I'm trying to install PDL on Strawberry perl 5.28.0 on windows 7.

I tried cpan. It ran for about 10 minutes, scrolling the window with inscrutable messages, did not end with an error message or warning, and when it was done, there was no PDL to be found.

I tried the "easy" method from the PDL.perl.org page, but my system didn't recognize any of the commands it said to type.

I see that Strawberry has a PDL version of perl.
If I replace my current version with that, how will it clobber my hundreds of existing perl programs?

Or is there a REALLY easy way to install it?

Replies are listed 'Best First'.
Re: How can I install PDL?
by Athanasius (Archbishop) on Sep 14, 2020 at 03:00 UTC

    Hello hsfrey,

    As GrandFather says, there’s little likelihood that a new Perl will “clobber” existing scripts; but you don’t have to take the chance. Don’t replace your current Perl. Download the version of your choice from http://strawberryperl.com/releases.html, choosing one of the “PDL editions.” As it says at the top of that page,

    PDL edition = portable edition + extra PDL related modules and external libraries

    so you’re getting a portable version which is guaranteed not to conflict with your system Perl. It comes as a .zip file: unzip it to a suitable directory, then invoke it via the portableshell.bat file that comes as part of the package. (See the README.txt file for more details.) You have the Perl version of your choice, with PDL, and it won’t conflict with your default Perl.

    Hope that helps,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Re: How can I install PDL?
by GrandFather (Saint) on Sep 14, 2020 at 02:21 UTC

    I tried installing PDL using cpan against:

    This is perl 5, version 32, subversion 0 (v5.32.0) built for MSWin32-x +64-multi-thread

    on a Windows 10 machine. My experience was similar except that I noticed lots of pointer/integer size warnings and various other issues that may be 64bit compile related. The (almost) last part of the output contains lots of stuff like:

    t\40-Semaphore.t ..... Can't locate loadable object for module Win32:: +IPC in @INC (@INC contains: C:\STRAWB~1\cpan\build\Win32-IPC-1.11-0\b +lib\lib C:\STRAWB~1\cpan\build\Win32-IPC-1.11-0\blib\arch C:/Strawber +ry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib + .) at C:\STRAWB~1\cpan\build\Win32-IPC-1.11-0\blib\lib/Win32/IPC.pm +line 45. BEGIN failed--compilation aborted at C:\STRAWB~1\cpan\build\Win32-IPC- +1.11-0\blib\lib/Win32/IPC.pm line 45. Compilation failed in require at C:\STRAWB~1\cpan\build\Win32-IPC-1.11 +-0\blib\lib/Win32/Semaphore.pm line 29. BEGIN failed--compilation aborted at C:\STRAWB~1\cpan\build\Win32-IPC- +1.11-0\blib\lib/Win32/Semaphore.pm line 29. Compilation failed in require at t\40-Semaphore.t line 12. BEGIN failed--compilation aborted at t\40-Semaphore.t line 12. t\40-Semaphore.t ..... Dubious, test returned 2 (wstat 512, 0x200) Failed 17/17 subtests t\50-ChangeNotify.t .. Can't locate loadable object for module Win32:: +IPC in @INC (@INC contains: C:\STRAWB~1\cpan\build\Win32-IPC-1.11-0\b +lib\lib C:\STRAWB~1\cpan\build\Win32-IPC-1.11-0\blib\arch C:/Strawber +ry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib + .) at C:\STRAWB~1\cpan\build\Win32-IPC-1.11-0\blib\lib/Win32/IPC.pm +line 45. BEGIN failed--compilation aborted at C:\STRAWB~1\cpan\build\Win32-IPC- +1.11-0\blib\lib/Win32/IPC.pm line 45. Compilation failed in require at C:\STRAWB~1\cpan\build\Win32-IPC-1.11 +-0\blib\lib/Win32/ChangeNotify.pm line 30. BEGIN failed--compilation aborted at C:\STRAWB~1\cpan\build\Win32-IPC- +1.11-0\blib\lib/Win32/ChangeNotify.pm line 30. Compilation failed in require at t\50-ChangeNotify.t line 13. BEGIN failed--compilation aborted at t\50-ChangeNotify.t line 13. t\50-ChangeNotify.t .. Dubious, test returned 2 (wstat 512, 0x200) No subtests run

    which doesn't look very encouraging. Before that there is what, to my inexperienced eye, looks like a shit ton of link errors for process management code. I suspect there is no trivial fix hanging in the wings.

    However, unless you have put your Perl scripts in an unfortunate place, there should be no issue of clobbering your code installing a new version of Perl so maybe the Strawberry canned PDL version is worth a try? You can always copy your Perl scripts some place safe before you start just to be sure.

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
      maybe the Strawberry canned PDL version is worth a try?

      Certainly good advice.

      As regards hsfrey's test failures, I think it's just that Win32::IPC needs to be installed. (cpan -i Win32::IPC)
      UPDATE: Oops ... those were GrandFather's test failures that I was looking at - and I think swl is right.

      Cheers,
      Rob

        Force was required to install Win32::IPC. That doesn't fix things though. The PDL build badness seems to start with:

        g++ Core.def -o ..\..\blib\arch\auto\PDL\Core\Core.xs.dll -mdll -s -L" +C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" Core.o pdlcore.o pdl +api.o pdlhash.o pdlthread.o pdlconv.o pdlmagic.o pdlsections.o "C:\ +STRAWB~1\perl\lib\CORE\libperl532.a" -lmoldname -lkernel32 -luser32 - +lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 +-lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp3 +2 -lcomctl32 -Wl,--enable-auto-image-base Core.o:Core.c:(.text+0x51): undefined reference to `Perl_get_context' Core.o:Core.c:(.text+0x5d): undefined reference to `Perl_av_len' Core.o:Core.c:(.text+0xab): undefined reference to `Perl_get_context'

        and continues in a similar vein for about 2000 lines.

        Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
Re: How can I install PDL?
by etj (Deacon) on Apr 20, 2022 at 18:45 UTC
    For what it's worth: I use Strawberry Perl 5.32, PDL edition, and a cpanm of PDL (cpan-latest, 2.078) this week worked fine.

    It worked even better after I installed the now-required OpenGL::GLUT to get the TriD stuff going, and better again when I fixed the problems that revealed. The separate OpenGL::GLUT is something I am looking to merge into main OpenGL, because currently there is duplicated code that causes unnecessary difficulty.

    EDIT: if there are problems installing PDL on Windows, we care - please open an issue on https://github.com/PDLPorters/pdl/issues with as much information as possible, including error logs and "perl -V" output.

Log In?
Username:
Password:

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

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

    No recent polls found