On Sat, Aug 29, 2009 at 10:50 AM, P Kishor<[email protected]> wrote:
> On Sat, Aug 29, 2009 at 8:52 AM, Chris Marshall<[email protected]> wrote:
>> P Kishor wrote:
>>>
>>> On Fri, Aug 28, 2009 at 7:59 PM, P Kishor<[email protected]> wrote:
>>>
>>>>
>>>> In my quest to learn PDL, I am trying to create simple 2D arrays of z
>>>> values and plotting them, kinda like possible with this little R
>>>> program at
>>>> http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=27
>>>>
>>>> I have several questions in this regard, from the simplest, most
>>>> complex to the most complex but possibly simplest --
>>>>
>>>> 1. How do I do the above?
>>>>
>>
>> PDL::Graphics::TriD is the 3d graphics display module which includes
>> some surface plot routines.
>>
>> PDL::Graphics::PLplot has 2d graphics routines for plotting
>> surfaces as well.
>>
>>>> 2. How do I determine what PDL sub-modules I have already installed?
>>>>
>>
>> A quick check is to start the perldl shell and search the documentation.
>> If a module is not installed then its docs will not be built.  A more
>> official check would be to try to use the module.  The perldl.conf
>> file lists what modules with external dependencies are to be built or
>> attempted to be built.
>>
>>>> 3. How do I install PDL::Graphics::TriD on a Mac with Leopard 10.5.8?
>>>> I don't have this particular module installed, and when I tried to, I
>>>> got a boatload of error messages, so many that I don't know even where
>>>> to start. How do I capture these messages so I can try to trace back
>>>> as to what is failing?
>>
>> It is much easier to debug build problems with a manual config
>> and install:
>>
>> 1. download latest PDL-2.4.4_08.tar.gz
>> 2. edit perldl.conf as desired
>> 3. perl Makefile.PL
>> 4. make
>> 5. make test
>> 6. make doctest
>>
>> I usually run this as (in bash)
>> ( set -x; perl Makefile.PL && make && make test && make doctest ) 2>&1 | tee
>> -a ../pdl-24408-log.txt
>> to collect all the build output, warnings, or errors.  They are verbose but
>> helpful in the case
>> of problems.
>>..
>
>
> Thanks for your advice Chris.
>
> I downloaded the latest 2.4.4_08 source and proceeded per your
> directions. I commented out the PLplot building switch in perldl.conf,
> but then I got the following test failure for HDF
>
> t/hdf_sd....................ok 28/32PDL: Dimensions must be positive
> Caught at file t/hdf_sd.t, line 306, pkg main
> # Looks like you planned 32 tests but ran 31.
> # Looks like your test exited with 2 just after 31.
> t/hdf_sd....................dubious
>        Test returned status 2 (wstat 512, 0x200)
> DIED. FAILED test 32
>        Failed 1/32 tests, 96.88% okay
>
>
> So, I turned off HDF as well. Interestingly, while HDF was not build,
> I still got the above test error. Anyway, then I proceeded to make and
> make install. It all seemed to work. Then I went into perldl and got
> the following --
>
> punk...@134 ~/Projects/Working_with_R$perldl
> perlDL shell v1.35
> ..
>
> perldl> use PDL::Graphics::TriD
> Can't locate PDL/Graphics/OpenGL.pm in @INC (@INC contains:
> /usr/local/lib/perl5/5.8.8/darwin-2level /usr/local/lib/perl5/5.8.8
> /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level
> /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .)
> at /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/PDL/Graphics/TriD/GL.pm
> line 9, <DATA> line 387.
> BEGIN failed--compilation aborted at
> /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/PDL/Graphics/TriD/GL.pm
> line 9, <DATA> line 387.
> Compilation failed in require at
> /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/PDL/Graphics/TriD/Window.pm
> line 70, <DATA> line 387.
> BEGIN failed--compilation aborted at
> /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/PDL/Graphics/TriD/Window.pm
> line 70, <DATA> line 387.
> Compilation failed in require at
> /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/PDL/Graphics/TriD.pm
> line 513, <DATA> line 387.
> BEGIN failed--compilation aborted at
> /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/PDL/Graphics/TriD.pm
> line 513, <DATA> line 387.
> Compilation failed in require at (eval 44) line 5, <DATA> line 387.
> BEGIN failed--compilation aborted at (eval 44) line 5, <DATA> line 387.
>
> perldl>
>


I went back and did a make clean and perl Makefile.PL again, and
noticed the following --


   WITH_3D: Looking for xdpyinfo to check GLX .
   WITH_3D: Found xdpyinfo, now checking for GLX extension
   WITH_3D: Found GLX (1 match)

   WITH_3D: Trying OpenGL initial OPENGL_LIB configuration -><-

     Trying libGL...
                YES

   WITH_3D: Success using -L/usr/X11R6/lib -lGLU -lGL -lXext -lX11 -lm

   WITH_3D: Set WITH_3D => 1 and build OpenGL and TriD

   skipping build of TriD::OpenGL(Q) modules - unable to find libs

Writing Makefile for PDL::Graphics::TriD::Rout
Writing Makefile for PDL::Graphics::VRML
Writing Makefile for PDL::Graphics::TriD
Writing Makefile for PDL::Graphics::PGPLOT::Window
Writing Makefile for PDL::Graphics::PGPLOT
Writing Makefile for PDL::Graphics::LUT::tables::DATA
Writing Makefile for PDL::Graphics::LUT::ramps::DATA
Writing Makefile for PDL::Graphics::LUT
Writing Makefile for PDL::Graphics::IIS


So, it seems OpenGL is missing even though libGL is present. Do I have
an unusual configuration, or an unusual configuration is required for
PDL::Graphics::TriD to build on Mac OS X?



>
> Any further suggestions?
>
> By the way, I did follow the instructions on PLplot website to build
> it on my computer, but, as I noted in an earlier email, when building
> PLplot, it seems to look for the existense of PDL::Graphics::PLplot
> which is really confusing. I thought it would be the other way
> around... the P::G::P would depend on PLplot, not the other way
> around.
>
> Puneet.
>



-- 
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
=======================================================================
Sent from Ft Myer, VA, United States

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

Reply via email to