I am trying to revisit building PLplot on my Mac OS X 10.5.8 machine
with Perl 5.10.1 but am failing completely. I hope to make one more
detailed attempt at hopefully solving this, so please bear with me...
this is a long email, and probably of interest only to those who want
to see PDL::Graphics::PLplot built on a Mac.

punk...@lucknow ~/Projects/PDL-2.4.6$perl -v

This is perl, v5.10.1 (*) built for darwin-thread-multi-2level

----
$ cd ~/Projects
~/Projects$ svn co
https://plplot.svn.sourceforge.net/svnroot/plplot/trunk plplot
~/Projects$ cd plplot
~/Projects/plplot$ mkdir build
~/Projects/plplot$ cd build
~/Projects/plplot/build$ cmake -DBUILD_TEST=ON -DENABLE_pdl=OFF ../ >& cmake.out
~/Projects/plplot/build$ make >& make.out
~/Projects/plplot/build$ ctest >& ctest.out

---- ctest.out ----
Start processing tests
Test project /Users/punkish/Projects/plplot-5.9.5/build
  1/ 10 Testing examples_c                       Passed
  2/ 10 Testing examples_cxx                     Passed
  3/ 10 Testing examples_f77                     Passed
  4/ 10 Testing examples_f95                     Passed
  5/ 10 Testing examples_java                    Passed
  6/ 10 Testing examples_python               ***Failed
  7/ 10 Testing examples_tcl                     Passed
  8/ 10 Testing examples_svg                     Passed
  9/ 10 Testing examples_xfig                    Passed
 10/ 10 Testing examples_compare              ***Failed

80% tests passed, 2 tests failed out of 10

The following tests FAILED:
          6 - examples_python (Failed)
         10 - examples_compare (Failed)
Errors while running CTest
----
Note: I have python 2.6 that I built myself, yet python tests fail. I
can get around that by passing -DENABLE_python=off to cmake, but I
have no idea why examples_compare fails. Anyway, moving on...
----

~/Projects/plplot/build$ sudo make install >& make_install.out
~/Projects/plplot/build$ cd /usr/local/share/plplot5.9.5/examples/
/usr/local/share/plplot5.9.5/examples$ sudo make >& make_examples.out

---- make_examples.out ----
cd c; make
/usr/bin/gcc     x01c.c   -o x01c
In file included from x01c.c:25:
plcdemos.h:14:22: error: plConfig.h: No such file or directory
plcdemos.h:15:20: error: plplot.h: No such file or directory
plcdemos.h:69:1: warning: "isnan" redefined
In file included from /usr/include/math.h:28,
                 from plcdemos.h:10,
                 from x01c.c:25:
/usr/include/architecture/i386/math.h:162:1: warning: this is the
location of the previous definition
x01c.c:26:21: error: plevent.h: No such file or directory
x01c.c:33: error: syntax error before ‘x’
.. <errors in every .c file> ..
x01c.c:356: error: ‘space0’ undeclared (first use in this function)
make[1]: *** [x01c] Error 1
make: *** [c/x01c] Error 2
----
Note: plplot5.9.5/examples/c/plcdemos.h has the following lines

#include "plConfig.h"
#include "plplot.h"

I am not sure how it intends to find plConfig.h and plplot.h. I
changed those lines like so

#include "/usr/local/include/plplot/plConfig.h"
#include "/usr/local/include/plplot/plplot.h"

And then the above errors go away, but there are other errors here as
well. I am assuming this is possibly just a configuration error.
Perhaps PLplot itself has built correctly. So, moving on...
----

/usr/local/share/plplot5.9.5/examples$ sudo ./plplot-test.sh >&
plplot-test.sh.out

---- plplot-test.sh.out ----
Testing front-end c
./test_c.sh: line 44: ./c/x01c: No such file or directory
Testing front-end cxx
./test_cxx.sh: line 36: ./c++/x01cc: No such file or directory
./test_cxx.sh: line 50: ./c++/x01: No such file or directory
Testing front-end f77
./test_f77.sh: line 43: ./f77/x16af: No such file or directory
Testing front-end f95
./test_f95.sh: line 43: ./f95/x16af: No such file or directory
Testing front-end java

*** PLPLOT WARNING ***
plgriddata(): you must have the Qhull library installed to use GRID_DTLI.
  Reverting to GRID_NNAIDW.

*** PLPLOT WARNING ***
plgriddata(): you must have the Qhull library installed to use GRID_NNI.
  Reverting to GRID_NNAIDW.

*** PLPLOT WARNING ***
plgriddata(): you must have the Qhull library installed to use GRID_DTLI.
  Reverting to GRID_NNAIDW.

*** PLPLOT WARNING ***
plgriddata(): you must have the Qhull library installed to use GRID_NNI.
  Reverting to GRID_NNAIDW.

*** PLPLOT WARNING ***
Driver does not support native gradients, switching to software
fallback gradient.


*** PLPLOT WARNING ***
Driver does not support native gradients, switching to software
fallback gradient.

Output file name is ./x31j.psc
Testing front-end python
./test_python.sh: line 32: 99338 Abort trap
/usr/local/bin/python2.6 "$pythondir"/x$index -dev $device -o
"${OUTPUT_DIR}"/x${index}${lang}%n.$dsuffix $options 2> test.error
>|"${OUTPUT_DIR}"/x${index}${lang}_${dsuffix}.txt
Fatal Python error: Interpreter not initialized (version mismatch?)
Testing front-end tcl
Read 721 data points, 2 separate streams
Read 721 data points, 4 separate streams
Read 12 data points, 1 separate streams
Read 100 data points, 1 separate streams

*** PLPLOT WARNING ***
plgriddata(): you must have the Qhull library installed to use GRID_DTLI.
  Reverting to GRID_NNAIDW.

*** PLPLOT WARNING ***
plgriddata(): you must have the Qhull library installed to use GRID_NNI.
  Reverting to GRID_NNAIDW.

*** PLPLOT WARNING ***
plgriddata(): you must have the Qhull library installed to use GRID_DTLI.
  Reverting to GRID_NNAIDW.

*** PLPLOT WARNING ***
plgriddata(): you must have the Qhull library installed to use GRID_NNI.
  Reverting to GRID_NNAIDW.

*** PLPLOT WARNING ***
Driver does not support native gradients, switching to software
fallback gradient.


*** PLPLOT WARNING ***
Driver does not support native gradients, switching to software
fallback gradient.

Output file name is /usr/local/share/plplot5.9.5/examples/x31t.psc
----
Note: By this time my hope for a successful PDL::Graphics::PLplot
build are less than zero. But anyway, I set the relevant perldl.conf
settings to

        WITH_PLPLOT          => 1, # Leave it up to PDL to decide
        WHERE_PLPLOT_LIBS    => undef, # let PDL search for plplot installation
        WHERE_PLPLOT_INCLUDE => undef, # let PDL search for plplot installation

and build PDL. I get the following output

Checking PDL::Graphics::PLplot...
found_plplot is 1
        Succeeded linking PLplot with -L/usr/local/plplot/lib -lplplotd
        plsmem function found, in-memory plotting available!
        plsvect function found, vector plotting available!
        c_plgcol0a function found, alpha transparency available!
        plpoly3 needs 6 arguments => version 5.2.0 or later!
Writing Makefile for PDL::Graphics::PLplot

But, on make, everything is fubar.

/usr/local/bin/perl -I/Users/punkish/Projects/PDL-2.4.6/blib/lib
-I/Users/punkish/Projects/PDL-2.4.6/blib/arch "-MPDL::PP
qw/PDL::Graphics::PLplot PDL::Graphics::PLplot PLplot/" plplot.pd
cp PLplot.pm ../../blib/lib/PDL/Graphics/PLplot.pm
/usr/local/bin/perl /usr/local/lib/perl5/5.10.1/ExtUtils/xsubpp
-typemap /usr/local/lib/perl5/5.10.1/ExtUtils/typemap -typemap
/Users/punkish/Projects/PDL-2.4.6/Basic/Core/typemap.pdl  PLplot.xs >
PLplot.xsc && mv PLplot.xsc PLplot.c
cc -c  -I/Users/punkish/Projects/PDL-2.4.6/Basic/Core
-I/usr/local/plplot/include/plplot -I/usr/local/plplot/include
-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -O3   -DVERSION=\"2.4.6\"
-DXS_VERSION=\"2.4.6\"
"-I/usr/local/lib/perl5/5.10.1/darwin-thread-multi-2level/CORE"
PLplot.c
PLplot.xs: In function ‘pdl_plParseOpts_readdata’:
PLplot.xs:23127: warning: passing argument 2 of ‘plParseOpts’ from
incompatible pointer type
PLplot.xs:23133: warning: ignoring return value of ‘Perl_av_shift’,
declared with attribute warn_unused_result
PLplot.xs: In function ‘pdl_plstripc_readdata’:
PLplot.xs:30723: warning: passing argument 17 of ‘c_plstripc’ from
incompatible pointer type
Running Mkbootstrap for PDL::Graphics::PLplot ()
chmod 644 PLplot.bs
rm -f ../../blib/arch/auto/PDL/Graphics/PLplot/PLplot.bundle
LD_RUN_PATH="/usr/local/plplot/lib" env MACOSX_DEPLOYMENT_TARGET=10.3
cc  -shared -L/usr/local/plplot/lib -L/usr/local/lib  PLplot.o  -o
../../blib/arch/auto/PDL/Graphics/PLplot/PLplot.bundle  \
           -L/usr/local/plplot/lib -lplplotd    \
        
Undefined symbols:
  "_Perl_Istack_sp_ptr", referenced from:
      _pdl_pladv_redodims in PLplot.o
      _pdl_pladv_redodims in PLplot.o
      _pdl_pladv_redodims in PLplot.o

      .. and about 20,000 more lines ..

            _XS_PDL_plstripc in PLplot.o
      _XS_PDL_plgriddata in PLplot.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [../../blib/arch/auto/PDL/Graphics/PLplot/PLplot.bundle] Error 1
make[1]: *** [subdirs] Error 2
make: *** [subdirs] Error 2

-- 
Puneet Kishor

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

Reply via email to