In honor of tomorrow's PDL::G::PLplot colloquium, I decided to give
installing PDL::G::PLplot on my computer another shot.

Downloaded PLplot 5.9.6, built it, and then tried to compile the PDL
interface... same errors... bunch of symbols not found, etc.

Eventually, I followed the advice given below by Hazen via Matt. To summarize

$ cd PDL/
$ perl Makefile.PL

# edit Graphics/PLplot/Makefile
# search for LDDLFLAGS (it's around line 44 for PDL 2.4.6) and replace
LDDLFLAGS =  -shared -L/usr/local/lib -L/usr/local/lib·
# with...
LDDLFLAGS = -bundle -undefined dynamic_lookup -L/usr/local/lib


$ make
$ sudo make install

and, voila! it works. The only issue, I can't seem to write out png
files. I get the error

perldl> $pl = PDL::Graphics::PLplot->new (DEV => 'png', FILE =>
'test.png')
Requested device png not available

Plotting Options:
 < 1> xwin       X-Window (Xlib)
 < 2> ps         PostScript File (monochrome)
 < 3> psc        PostScript File (color)
 < 4> xfig       Fig file
 < 5> null       Null device
 < 6> mem        User-supplied memory device
 < 7> svg        Scalable Vector Graphics (SVG 1.1)


I tried svg, and that works fine. Anyone have any idea why png output
is not available? I have libpng installed correctly. Is there any
place I have to specify when building P::G::PLplot that it should
enable png output?



On Wed, Apr 21, 2010 at 4:32 AM, Matthew Kenworthy
<[email protected]> wrote:
> Thankyou Hazen - that solved the compiling of PLplot problem! I now have
> plplot problems in perldl, but at least the compile goes through.
>
> To recap:
>
> cd PDL/
> perl Makefile.PL
> edit Graphics/PLplot/Makefile
>
> # search for LDDLFLAGS (it's around line 44 for PDL 2.4.6) and replace
> LDDLFLAGS =  -shared -L/usr/local/lib -L/usr/local/lib·
> # with...
> LDDLFLAGS = -bundle -undefined dynamic_lookup -L/usr/local/lib
>
>
> $ make
>
> Matt
>
> On Tue, Apr 20, 2010 at 5:58 PM, Hazen Babcock <[email protected]> wrote:
>>
>> I would guess that this is (still...) the problem:
>>
>> http://article.gmane.org/gmane.comp.lang.perl.pdl.devel/838
>>
>> In short the LDDLFLAGS are still set incorrectly for OS-X.
>> In the generated Makefile they are (probably):
>> LDDLFLAGS =  -shared -L/usr/local/lib -L/usr/local/lib
>>
>> When they should be (at least for OS-X, and it has been awhile since I
>> actually tested this...):
>> LDDLFLAGS = -bundle -undefined dynamic_lookup -L/usr/local/lib
>>
>> -Hazen
>>
>
> --
> Matthew Kenworthy / Assistant Professor / Leiden Observatory
> Niels Bohrweg 2 (#463) / P.O. Box 9513 / 2300 RA Leiden / NL
>
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to