-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graphics module not installing or acting weird #26
Comments
Hi,
As regards the pdl2 shell, I'd recommend just using it and see if it works
ok for you.
I seemed to fare a little better than you:
#####
pdl2
Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call
didn't work. The COLUMNS and LINES environment variables didn't work. at
C:/_64/strawberry-5.32.1-PDL/perl/vendor/lib/Term/ReadLine/readline.pm line
410.
load_rcfile: got $HOME = C:\_64\strawberry-5.32.1-PDL\data
load_rcfile: loading PDL/default.pdl
Perldl2 Shell v0.008
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.
Loaded plugins:
CleanErrors
Commands
Completion
CompletionDriver::INC
CompletionDriver::Keywords
CompletionDriver::LexEnv
CompletionDriver::Methods
DDS
FindVariable
History
LexEnv
MultiLine::PPI
NiceSlice
PDLCommands
Packages
PrintControl
ReadLineHistory
Type 'help' for online help
Type Ctrl-D or quit to exit
Loaded PDL v2.025
pdl>
#####
You'll need the pgplot library in order to build PGPLOT and
PDL::Graphics::PGPLOT.
If you like, I can send you the pgplot library that I used when I was
building those 2 perl modules.
Strawberry ships with the plplot library, so PDL::Graphics::PLplot-0.74
should be buildable.
That module is currently broken for Windows - but the breakage is hopefully
fixable.
Download
https://cpan.metacpan.org/authors/id/D/DH/DHUNT/PDL-Graphics-PLplot-0.74.tar.gz,
unpack it and cd to the top level directory ( PDL-Graphics-PLplot-0.74).
Then run 'perl Makefile.PL'.
I get the following braindead rubbish:
#####
C:\sisyphusion\PDL-Graphics-PLplot-0.74>perl Makefile.PL
PDL is installed
Checking PDL::Graphics::PLplot...
Searching for libplplot.dll library.
Searching for libplplotd.dll library.
Cannot find plplot library (libplplotd.dll), skipping PDL::Graphics::PLplot
Not building PDL::Graphics::PLplot
Cannot find plplot library (libplplotd.dll), skipping PDL::Graphics::PLplot
Not building PDL::Graphics::PLplot
Checking if your kit is complete...
Looks good
#####
So, the first thing to try is to fix the Makefile.PL so that libplplot.dll
(which exists in c/bin) is located.
At line 57 of the Makefile.PL, I inserted the location of libplplot.dll:
#####
foreach my $libdir (
'C:/_64/strawberry-5.32.1-PDL/c/bin', # location of
libplplot.dll on my machine
...
#####
I also set 2 environment variables:
set PLPLOT_LIBDIR=C:/_64/strawberry-5.32.1-PDL/c/lib
set PLPLOT_INCDIR=C:/_64/strawberry-5.32.1-PDL/c/include/plplot
The 'perl Makefile.PL' step then succeeded.
Next, I ran 'gmake test', but there was an undefined reference:
#####
gmake test
...
C:/_64/strawberry-5.32.1-PDL/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
PLplot.o:PLplot.c:(.text+0x91b59): undefined reference to `c_plshade1'
collect2.exe: error: ld returned 1 exit status
gmake: *** [Makefile:481: blib\arch\auto\PDL\Graphics\PLplot\PLplot.xs.dll]
Error 1
#####
I don't know why that is happening. It's late over here, and the rest will
have to wait until tomorrow.
Maybe you can make some more progress in the meantime.
Cheers,
Rob
…On Thu, May 20, 2021 at 10:49 PM Suman Khanal ***@***.***> wrote:
I am trying to use PDL(https://metacpan.org/pod/PDL) and for plotting the
ndarrays, I need Graphics libraries. So I tried to install
PDL::Graphics::PGPLOT
cpanm PDL::Graphics::PGPLOT
--> Working on PDL::Graphics::PGPLOT
Fetching http://www.cpan.org/authors/id/E/ET/ETJ/PDL-2.047.tar.gz ... OK
Configuring PDL-2.047 ... OK
Building and testing PDL-2.047 ... OK
Successfully installed PDL-2.047
1 distribution installed
and PDL::Graphics::PLplot
C:\strawberry-perl-5.32.1.1-64bit-PDL>cpanm 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
Trying to use those libraries throw error:
pdl> use PDL::Grpahics::PGPLOT
Compile error: Can't locate PDL/Grpahics/PGPLOT.pm in @inc (you may need to install the PDL::Grpahics::PGPLOT module) ***@***.*** contains: C:/strawberry-perl-5.32.1.1-64bit-PDL/perl/site/lib/MSWin32-x64-multi-thread C:/strawberry-perl-5.32.1.1-64bit-PDL/perl/site/lib C:/strawberry-perl-5.32.1.1-64bit-PDL/perl/vendor/lib C:/strawberry-perl-5.32.1.1-64bit-PDL/perl/lib) at (eval 414) line 7.
BEGIN failed--compilation aborted at (eval 414) line 7.
pdl> use PDL::Grpahics::PLplot
Compile error: Can't locate PDL/Grpahics/PLplot.pm in @inc (you may need to install the PDL::Grpahics::PLplot module) ***@***.*** contains: C:/strawberry-perl-5.32.1.1-64bit-PDL/perl/site/lib/MSWin32-x64-multi-thread C:/strawberry-perl-5.32.1.1-64bit-PDL/perl/site/lib C:/strawberry-perl-5.32.1.1-64bit-PDL/perl/vendor/lib C:/strawberry-perl-5.32.1.1-64bit-PDL/perl/lib) at (eval 422) line 7.
BEGIN failed--compilation aborted at (eval 422) line 7.
To practice examples on http://pdl.perl.org/?page=FirstSteps I again
tried installing PDL::Graphics::Simple
C:\strawberry-perl-5.32.1.1-64bit-PDL>cpanm PDL::Graphics::Simple
--> Working on PDL::Graphics::Simple
Fetching http://www.cpan.org/authors/id/Z/ZO/ZOWIE/PDL-Graphics-Simple-1.005.tar.gz ... OK
Configuring PDL-Graphics-Simple-1.005 ... OK
Building and testing PDL-Graphics-Simple-1.005 ... FAIL
! Installing PDL::Graphics::Simple failed. See C:\strawberry-perl-5.32.1.1-64bit-PDL\data\.cpanm\work\1621510604.10224\build.log for details. Retry with --force to force install it.
but it fails. Using --force however installs but *using it* in program
fails:
pdl> use PDL::Graphics::Simple
pdl> imag (sin(rvals(200,200)+1))
Trying gnuplot (PDL::Graphics::Gnuplot)...PDL::Graphics::SImple: Gnuplot exists but yours doesn't support either the x11 or wxt terminal
Trying pgplot (PDL::Graphics::PGPLOT::Window)...nope
Trying plplot (PDL::Graphics::PLplot)...nope
Trying prima (PDL::Graphics::Prima)...nope
Runtime error: Sorry, all known plotting engines failed. Install one and try again.
pdl>
Looking at the error Gnuplot exists but yours doesn't support either the
x11 or wxt terminal, I don't know what to do.
How to get over this error and use PDL with strawberry perl?
Any help?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAR3PAHMS3TXKALIQUS24TTOUAO7ANCNFSM45G6CNLQ>
.
|
On Fri, May 21, 2021 at 1:26 AM sisyphus ***@***.***> wrote:
#####
> gmake test
...
C:/_64/strawberry-5.32.1-PDL/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
PLplot.o:PLplot.c:(.text+0x91b59): undefined reference to `c_plshade1'
collect2.exe: error: ld returned 1 exit status
gmake: *** [Makefile:481:
blib\arch\auto\PDL\Graphics\PLplot\PLplot.xs.dll] Error 1
#####
Seems that "c_plshade1" has been deprecated.
See PDLPorters/pdl-graphics-plplot#6
IIUC, the function would have been available if Strawberry had built the
PLplot library with -DPL_DEPRECATED .
But that wasn't done.
I have strawberry-perl-5.28.0.1-64bit-PDL.zip, and its PLplot library
*does* provide "c_plshade1".
So the simplest thing for you to do, is to replace your current
c/bin/libplplot.dll and c/lib/lib/plplot.a with the same files from the
5.28.0 strawberry PDL distro.
Also you need to replace the c/include/plplot directory with the same
directory from the 5.28.0 strawberry PDL distro.
(The PLplot installation that ships with the 5.30.0 strawberry PDL distro
might also be ok .... I haven't tested that.)
Of course, you'll also need to do the things I outlined in my previous post
- ie fix the Makefile.PL and set the 2 environment variables.
That worked fine for me, despite some noisy tests (compiler warnings, and a
couple of generated files that couldn't be unlinked):
#####
All tests successful.
Files=3, Tests=253, 51 wallclock secs ( 0.06 usr + 0.01 sys = 0.08 CPU)
Result: PASS
#####
|
Thank you for looking into the issue. |
On Sat, May 29, 2021 at 2:30 PM Suman Khanal ***@***.***> wrote:
Thank you for looking into the issue.
I hope strawberry would look into these intricacies and make it easier for
a beginner who want to start with scientific programming in perl.
Yes, it would be nice if they could re-build the PLplot library with
-DPL_DEPRECATED and maybe, for the PDL distro, they could also set the
PLPLOT_LIBDIR and PLPLOT_INCDIR environment variables in portableshell.bat.
But that won't help the Makefile.PL locate the plplot dll.
That should be fixed by the PDL::Graphics::PLplot maintainer but, until
that happens, the person wanting to build PDL::Graphics::PLplot is the one
who is probably going to have to hack the Makefile.PL
Maybe, if you're lucky, the Strawberry developers will do that hacking and
also then provide PDL::Graphics::PLplot in the distro ..... but I'm not
sure how much trouble they want to (or ought to) go to.
It will be interesting to see what the Strawberry Perl releases of their
perl-5.34.0 distros actually contain.
Cheers,
Rob
|
Please try PDL-Graphics-PLplot-0.79. This may have been fixed by PDLPorters/pdl-graphics-plplot#16. You may see an issue with interactive plotting, but plotting to files should work. |
A straight out
Then I installed Alien::PLplot the ol' fashioned manual way. (I've no reason to doubt that Then I installed PDL-Graphics-PLplot-0.79 via the same manual method. (Again, I believe The 'gmake test' step produced some noise (see attached plplot_tests.txt) - though I think all of that noise is expected. |
Thank you for testing that @sisyphus! Yes, that noise is expected from the tests on Windows. |
Testing PDL::Graphics::PLplot with the current 5.36.1 dev release results in test failures. It looks like the system crashes on test 17 when it tries to call $pl->shadeplot ($z, $nsteps, BOX => [-1, 1, -1, 1], PALETTE => 'RAINBOW') Wrapping the code in an eval has no effect. If I run
Edit - I set the PLPLOT env vars to the relevant share dir before running the build. |
Setting Backtrace below after compiling with
|
FWIW, the backtrace looks similar to the last parts of the one for OpenGL. |
Also FWIW, there are similar test failures under linux with perl 5.37.x so this would not seem to be Strawberry Perl specific. This one, for example, also crashes on test 17: http://www.cpantesters.org/cpan/report/6c4cf676-cc37-11ed-95c7-b1478086ef20 |
Is this fixed by the vmem change? |
No. This strawberry build includes the vmem change. |
I'm a bit lost, because it's not at all clear what function it's crashing in (and the same is true of the OpenGL problem, though thanks for capturing the info onto an issue). Would it be possible to tell gdb to |
I'm sure it's possible but it's best done by someone familiar with the process. If anyone wants to have a go then the relevant Strawberry perl version can be downloaded from https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/tag/dev_5.36.1_20230528_gcc13 |
If it helps, the set of patches and other settings used for the build are below.
Perl-Dist-Strawberry/share/64bit-5.36.1.1.pp Lines 57 to 86 in da78325
|
Disabling |
I am trying to use
PDL
(https://metacpan.org/pod/PDL) and for plotting thendarrays
, I need Graphics libraries. So I tried to installPDL::Graphics::PGPLOT
and
PDL::Graphics::PLplot
Trying to use those libraries throw error:
To practice examples on http://pdl.perl.org/?page=FirstSteps I again tried installing
PDL::Graphics::Simple
but it fails. Using
--force
however installs but using it in program fails:Looking at the error
Gnuplot exists but yours doesn't support either the x11 or wxt terminal
, I don't know what to do.How to get over this error and use
PDL
with strawberry perl?Any help?
The text was updated successfully, but these errors were encountered: