installing ppgplot (using OS X 10.3 / gcc 3.4 / python 2.3b)

Dennis Hore dhore at uoregon.edu
Sun Jun 6 15:06:38 EDT 2004


I'm trying to install Nick Patavalis' ppgplot package on Mac OS X 10.3 
with python 2.3.  I first sent this message to Nick, but he said he 
doesn't have any experience with the Mac platform.

after installing using python setup.py install (using Numeric; no error 
messages), and then in python trying
 >>> import ppgplot

i get:

Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/sw/lib/python2.3/site-packages/ppgplot/__init__.py", line 1, 
in ?
     from _ppgplot import *
ImportError: Failure linking new module: : dyld: python Undefined 
symbols:
.objc_class_name_NSBezierPath
.objc_class_name_NSBitmapImageRep
.objc_class_name_NSColor
.objc_class_name_NSWorkspace
_NSCalibratedRGBColorSpace

This looks very familiar, it's the standard error messages that occur 
when an application is compiled without specifying "-framework AppKit" 
on the Mac as an option to the linker.

Also, I'm using gcc 3.4, so the linker options must now be specified as:
-Wl,-framework -Wl,AppKit

I first tried to include these options in setup.py, but gcc ignores all 
linking options when it is told to compile only with -c

So then I ran:
make clean
make

The compiling phase should be okay.  Then I tried to manually do the 
linking with

gcc -L/usr/X11R6/lib/ -L/sw/lib/ -L/sw/lib/pgplot -bundle 
-flat_namespace -undefined suppress -lcpgplot -lpgplot -lpng -lX11 -lm 
-lg2c -lz -Wl,-framework -Wl,AppKit
-o build/lib.darwin-7.4.0-PowerMacintosh-2.3/ppgplot/_ppgplot.so
build/temp.darwin-7.4.0-PowerMacintosh-2.3/src/_ppgplot.o

no errors, but importing the ppgplot library into python gives the same 
old errors again (looks like missing AppKit).  Back to square one! :)

By the way, I have a working pgplot installation.  I can compile my own 
fortran programs which call pgplot subroutines with:

g77 -o dennis_demo dennis_demo.f -L/sw/lib/pgplot -L/usr/X11R6/lib 
-L/sw/lib -L/usr/lib -lpgplot -lpng -lz -lX11 -Wl,-framework -Wl,AppKit

Any suggestions?

Thanks!!!
best wishes,
dennis





More information about the Python-list mailing list