Thomas, maybe I missed it, but why are you using sudo before your cpanm
commands?

David

On Thu, Sep 14, 2023, 11:05 AM <ng0...@gmail.com> wrote:

> Dear All / Ed,
>
> as mentioned before, it is possible to get a smooth installation of PDL
> using (Perl 5.38, PDL 2.084) under Arch - in fact EndeavourOS - by the
> commands below. perlbrew is not used as I have not seen a clean install
> e.g. under Ubuntu which is still on perl 5.36:
>
> yay cpanminus
>
> sudo cpanm Term::ReadKey
>
> sudo cpanm Term::ReadLine::Gnu
>
> sudo cpanm Alien::Gnuplot # first
>
> sudo cpanm PDL::Graphics::Gnuplot # second
>
> sudo cpanm PDL::Graphics::Simple # third, pops up
>
> However, *Alien::FreeImage* throws an error in a next step. Would any
> developer mind to fix it:
>
> sudo cpanm Alien::FreeImage # first
> (used by: sudo cpanm PDL::IO::Image  # second)
> ...
> Source/OpenEXR/Imath/ImathVec.h:2150:33: error: ISO C++17 does not allow
> dynamic exception specifications
>  2150 | Vec4<T>::normalizedExc () const throw (IEX_NAMESPACE::MathExc)
>       |                                 ^~~~~
> In file included from Source/FreeImage/../OpenEXR/IlmImf/ImfXdr.h:108,
>                  from
> Source/FreeImage/../OpenEXR/IlmImf/ImfGenericOutputFile.h:40,
>                  from
> Source/FreeImage/../OpenEXR/IlmImf/ImfOutputFile.h:49:
> Source/OpenEXR/Half/half.h: In constructor ‘half::half(float)’:
> Source/OpenEXR/Half/half.h:462:22: warning: ISO C++17 does not allow
> ‘register’ storage class specifier [-Wregister]
>   462 |         register int e = (x.i >> 23) & 0x000001ff;
>       |                      ^
> Source/OpenEXR/Half/half.h:473:26: warning: ISO C++17 does not allow
> ‘register’ storage class specifier [-Wregister]
>   473 |             register int m = x.i & 0x007fffff;
>       |                          ^
> make: *** [Makefile.gnu:64: Source/FreeImage/PluginEXR.o] Error 1
> ###ERROR### make failed [512] at inc/My/Builder/Unix.pm line 33.
> -> FAIL Installing Alien::FreeImage failed. See
> /root/.cpanm/work/1694702761.20233/build.log for details. Retry with
> --force to force install it.
>
> Thanks a lot, Thomas
>
> On Sat, Sep 2, 2023 at 12:47 AM Ed . <ej...@hotmail.com> wrote:
>
>> Hi Thomas,
>>
>>
>>
>> You will want to install Term::ReadKey and probably Term::ReadLine::Gnu
>> to have a nicer, more interactive perldl. I don’t use pdl2 myself, but it
>> did tell you what it needs to run if you want to use it.
>>
>>
>>
>> Also, Alien::Gnuplot only installs (or checks for) actual gnuplot. If you
>> want the PDL interface to it, which PDL::Graphics::Simple wraps around, you
>> need to install PDL::Graphics::Gnuplot. This would solve the thing
>> PDL::Graphics::Simple was telling you: “Sorry, all known plotting
>> engines failed.  Install one and try again.” Please read
>> https://metacpan.org/pod/PDL::Graphics::Simple#SUPPORTED-GRAPHICS-ENGINES
>>
>>
>>
>> Best regards,
>>
>> Ed
>>
>>
>>
>> *From: *ng0...@gmail.com
>> *Sent: *01 September 2023 18:10
>> *To: *Ed . <ej...@hotmail.com>
>> *Cc: *Ingo Schmid <ingo...@gmx.at>; pdl-devel@lists.sourceforge.net
>> *Subject: *Re: [Pdl-devel] Debian 12 "-t experimental" install of PDL
>>
>>
>>
>> Hello Ed,
>>
>>
>>
>> as I understand, there a different options to get First Steps from the
>> PDL book to work. I have adopted the approach using perlbrew and cpanm
>> as they seem the most stable.
>>
>>
>>
>> Please find below the sequence of commands issued and the final error
>> messages under Ubuntu. I used the same approach on three different Linux
>> distributions (Debian, Ubuntu, Arch) with the same result.
>>
>>
>>
>> Is there any chance to reproduce the problem and look into it?
>>
>>
>>
>> Thanks a lot, Thomas
>>
>>
>>
>> # idea: install PDL piggyback from CPAN under perlbrew
>>
>>
>>
>> perlbrew init # change prompt in .profile, .bashrc
>>
>> perlbrew install perl-5.38.0
>>
>> perlbrew install-cpanm
>>
>> perlbrew install-patchperl
>>
>> perlbrew switch perl-5.38.0
>>
>>
>>
>> cpanm Alien::Gnuplot # first ...OK
>>
>> cpanm PDL::Graphics::Simple # second ...OK
>>
>>
>>
>> Ubuntu: ~ $ pdl2
>>
>> pdl2: Devel::REPL version 1.003011 not found, running
>> '/home/th6mas/perl5/perlbrew/perls/perl-5.38.0/bin/perldl' instead...
>>
>> perlDL shell v1.357
>>
>>  PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
>>
>>  'COPYING' in the PDL distribution. This is free software and you
>>
>>  are welcome to redistribute it under certain conditions, see
>>
>>  the same file for details.
>>
>> ReadLines, NiceSlice, MultiLines  enabled
>>
>> Reading PDL/default.perldlrc...
>>
>> WARNING: Error loading PDL: 'Can't locate Term/ReadKey.pm in @INC (you
>> may need to install the Term::ReadKey module) (@INC entries checked:
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/x86_64-linux
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/5.38.0/x86_64-linux
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/5.38.0) at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/x86_64-linux/PDL/Doc/Perldl.pm
>> line 52.
>>
>> BEGIN failed--compilation aborted at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/x86_64-linux/PDL/Doc/Perldl.pm
>> line 52.
>>
>> Compilation failed in require at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/x86_64-linux/PDL/default.perldlrc
>> line 37.
>>
>> BEGIN failed--compilation aborted at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/x86_64-linux/PDL/default.perldlrc
>> line 37.
>>
>> Compilation failed in require at (eval 14) line 1.
>>
>> ' - trying blib.
>>
>> WARNING: PDL startup not found only plain perl available
>>
>>
>>
>> Note: AutoLoader not enabled ('use PDL::AutoLoader' recommended)
>>
>>
>>
>> perl> use PDL::Graphics::Simple
>>
>> Can't locate PDL/Graphics/PGPLOT/Window.pm in @INC (you may need to
>> install the PDL::Graphics::PGPLOT::Window module) (@INC entries checked:
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/x86_64-linux
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/5.38.0/x86_64-linux
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/5.38.0) at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/PDL/Graphics/Simple/PGPLOT.pm
>> line 28, <STDIN> line 1.
>>
>>
>>
>> perl> imag (sin(rvals(200,200)+1))
>>
>> Sorry, all known plotting engines failed.  Install one and try again.
>>
>>  at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/PDL/Graphics/Simple.pm
>> line 434, <STDIN> line 2.
>>
>> PDL::Graphics::Simple::new("PDL::Graphics::Simple") called at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/PDL/Graphics/Simple.pm
>> line 389
>>
>> PDL::Graphics::Simple::pgswin() called at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/PDL/Graphics/Simple.pm
>> line 1262
>>
>> PDL::Graphics::Simple::_global_or_new() called at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/PDL/Graphics/Simple.pm
>> line 1151
>>
>> PDL::Graphics::Simple::imag(PDL=SCALAR(0x563dd1c9aca0)) called at (eval
>> 50) line 1
>>
>> eval 'imag (sin(rvals(200,200)+1))
>>
>> ' called at (eval 36) line 6
>>
>> main::eval_and_report("imag (sin(rvals(200,200)+1))\x{a}") called at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/bin/perldl line 618
>>
>> main::process_input() called at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/bin/perldl line 638
>>
>> eval {...} called at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/bin/perldl line 638
>>
>> require /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/bin/perldl called
>> at /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/bin/pdl2 line 27
>>
>> main::BEGIN() called at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/bin/pdl2 line 33
>>
>> eval {...} called at
>> /home/th6mas/perl5/perlbrew/perls/perl-5.38.0/bin/pdl2 line 33
>>
>>
>>
>> perl> quit
>>
>>
>>
>>
>>
>> On Fri, Sep 1, 2023 at 4:56 PM Ed . <ej...@hotmail.com> wrote:
>>
>> Please just try with the latest (Perl 5.38, PDL 2.084), and report any
>> problems?
>>
>>
>>
>> Best regards,
>>
>> Ed
>>
>>
>>
>> *From: *ng0...@gmail.com
>> *Sent: *31 August 2023 19:09
>> *To: *Ingo Schmid <ingo...@gmx.at>
>> *Cc: *pdl-devel@lists.sourceforge.net
>> *Subject: *Re: [Pdl-devel] Debian 12 "-t experimental" install of PDL
>>
>>
>>
>> Hello Ingo,
>>
>>
>>
>> much appreciate! Just to ask which perl version is most likely to run the
>> commands from the First Step PDL Book?
>>
>>
>>
>> @anyone: which perl version is known to work for that purpose?
>>
>>
>>
>> Thanks a lot, Thomas
>>
>>
>>
>> On Thu, Aug 31, 2023 at 11:00 AM Ingo Schmid <ingo...@gmx.at> wrote:
>>
>> Hi,
>>
>> I have not really read through the whole thread, I apologise if this does
>> not apply to your problem then.
>>
>> I have moved most of the PDL stuff to perlbrew which allows a fairly
>> system independent installation, it's berrybrew on windows, I don't own
>> Macs. On linux, your distribution most probably provides it, I used apt to
>> install the software itself. The best part about is, that system (perl)
>> upgrades don't break your PDL installation. This allowed me to consistently
>> run things cross platform with no troubles for a long time.
>>
>> Run
>>
>> > perlbrew install <perl version>
>> > perlbrew install-cpanm
>> > perlbrew install-patchperl
>>
>> It takes a fair amount of installation time and I guess disk space,
>> defaults to your home.
>>
>> Please consult the perlbrew docs for the exact process, this is I think
>> the most useful info: https://perlbrew.pl/Perlbrew-and-Friends.html.
>> Once you are set, use
>>
>> > perlbrew switch ...
>>
>> > cpanm PDL::Graphics::Simple
>>
>> I guess you may need to install a few dependencies that are either
>> ambiguous or simply missing using cpanm from the same shell. I don't
>> remember if P:G:S comes with a default backend or if you need to, for
>> example, install gnuplot.
>>
>> I hope this helps.
>>
>> Ingo
>>
>> On 8/31/23 10:12, ng0...@gmail.com wrote:
>>
>> Hello,
>>
>>
>>
>> would anyone with a working version mind to post some hints on how to
>> achieve:
>>
>>
>>
>> cpan PDL::Graphics::Simple
>> pdl> use PDL::Graphics::Simple
>> pdl> imag (sin(rvals(200,200)+1))
>>
>>
>>
>> on no matter on which platform but with the least number of steps?
>>
>>
>>
>> Thanks a lot, Thomas
>>
>>
>>
>> On Wed, Aug 30, 2023 at 4:51 PM William Schmidt <
>> t.william.schm...@gmail.com> wrote:
>>
>> Hello Thomas (ngO177),
>>
>>
>>
>> I encountered a similar problem building PDL 2.083 and 2.084 in macOS
>> Monterrey, to wit: getting PDL::Graphics::Simple to work, or even to pass
>> its build tests.  Rather than repeat the odyssey I went through here I
>> suggest you read the write-up I did at perlmonks that documents the build
>> debug process:
>>
>>
>>
>> https://www.perlmonks.org/?node_id=11153860
>>
>>
>>
>> I posted this as open-issue #450 at PDL meta-cpan, but alas, no one from
>> PDL dev has, as yet, bothered to read it.  In a nutshell, you need a
>> graphics engine on your machine and if there isn't one, or PDL can't find
>> it, the Alien process (since a graphics engine is defined in PDL-speak as
>> an alien process) will find one appropriate to your OS on the net, download
>> and build it for you. Alas, for macOS Monterrey, Alien built a crippled
>> plotting engine. It failed to un-comment any of the three #ifdef terminal
>> definitions that support graphics in macOS. Thus, no terminal def for macOS
>> was compiled into gnuplot. The fix, for me, was to rtfm the build docs,
>> initialize the environment to point to my preferred graphics engine
>> (gnuplot, built by me with macports rather than Alien), and enable
>> interactive build tests.  To be fair to PDL developers, this is all
>> documented in the PDL build instructions and 'man gnuplot', but most of us
>> take the ease of building Perl modules for granted and don't bother to read
>> them unless something goes wrong.  Alien is a brilliant idea but at present
>> its execution in PDL is flawed. It attempts to transparently obtain for you
>> an appropriate graphics engine but fails to build it correctly.  With a
>> little hacking you can get around this, I did, but as always, your mileage
>> will vary.  I would very much like to hear from you after you have read the
>> perlmonks post and evaluated my solution in a Linux context.  My PDL in
>> Monterrey is now working correctly, so I held off trying to build PDL in
>> Ubuntu, but if nothing works for you I will give it a try.
>>
>>
>> Regards,
>> Will Schmidt (perlboy_emeritus)
>>
>>
>>
>>
>>
>> On Wed, Aug 30, 2023 at 5:22 AM <ng0...@gmail.com> wrote:
>>
>> Hello,
>>
>>
>>
>> in order to take some first steps
>>
>> cpan PDL::Graphics::Simple
>> pdl> use PDL::Graphics::Simple
>> pdl> imag (sin(rvals(200,200)+1))
>>
>>
>>
>> on Debian 12 w/ experimental repos activated, all I try, see below, fails.
>>
>>
>>
>> Any ideas?
>>
>> Appreciate, Thomas
>> pdl
>>
>> sudo apt -t experimental install *pdl*
>>
>> sudo apt -t experimental install *pgplot5*
>>
>> sudo apt -t experimental install *libpgplot-perl*
>>
>>
>>
>> sudo apt -t experimental install *libpdl-graphics-gnuplot-perl*
>> cpan *graphics simple*
>>
>> cpan PDL::Graphics::Simple
>>
>>
>>
>> ...
>>
>> Test Summary Report
>>
>> -------------------
>>
>> t/simple.t (Wstat: 512 (exited 2) Tests: 24 Failed: 2)
>>
>>   Failed tests:  1, 12
>>
>>   Non-zero exit status: 2
>>
>>   Parse errors: No plan found in TAP output
>>
>> Files=1, Tests=24,  2 wallclock secs ( 0.01 usr  0.00 sys +  0.26 cusr
>> 0.22 csys =  0.49 CPU)
>>
>> Result: FAIL
>>
>> Failed 1/1 test programs. 2/24 subtests failed.
>>
>> make: *** [Makefile:851: test_dynamic] Error 2
>>
>>   ETJ/PDL-Graphics-Simple-1.009.tar.gz
>>
>>   make test -- NOT OK
>>
>> //hint// to see the cpan-testers results for installing this module, try:
>>
>>   reports ETJ/PDL-Graphics-Simple-1.009.tar.gz
>> *dh-make-perl*
>>
>> https://wiki.debian.org/PerlFAQ
>>
>> sudo apt -t experimental install *dh-make-perl*
>>
>>
>>
>> dh-make-perl --build --cpan PDL::Graphics::Simple
>>
>>
>>
>> ...
>>
>> Test Summary Report
>>
>> -------------------
>>
>> t/simple.t (Wstat: 512 (exited 2) Tests: 24 Failed: 2)
>>
>>   Failed tests:  1, 12
>>
>>   Non-zero exit status: 2
>>
>>   Parse errors: No plan found in TAP output
>>
>> Files=1, Tests=24,  1 wallclock secs ( 0.01 usr  0.00 sys +  0.29 cusr
>> 0.21 csys =  0.51 CPU)
>>
>> Result: FAIL
>>
>> Failed 1/1 test programs. 2/24 subtests failed.
>>
>> make[1]: *** [Makefile:854: test_dynamic] Error 2
>>
>> make[1]: Leaving directory '/home/th6mas/PDL-Graphics-Simple-1.009'
>>
>> dh_auto_test: error: make -j1 test TEST_VERBOSE=1 returned exit code 2
>>
>> make: *** [debian/rules:4: build] Error 255
>>
>> make: Leaving directory '/home/th6mas/PDL-Graphics-Simple-1.009'
>>
>> Cannot create deb package: 'debian/rules build' failed.
>>
>>
>>
>> _______________________________________________
>> pdl-devel mailing list
>> pdl-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pdl-devel
>>
>>
>>
>> _______________________________________________
>>
>> pdl-devel mailing list
>>
>> pdl-devel@lists.sourceforge.net
>>
>> https://lists.sourceforge.net/lists/listinfo/pdl-devel
>>
>> _______________________________________________
>> pdl-devel mailing list
>> pdl-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pdl-devel
>>
>>
>>
>>
>>
> _______________________________________________
> pdl-devel mailing list
> pdl-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-devel
>
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to