[vtkusers] VTK+Python problems on OSX

Torsten Sadowski tsadowski at gmx.net
Thu Jul 31 10:00:42 EDT 2003


Hi,

after successfully building the Cocoa-version with shared libraries and  
python support I have the annoying problem that the Python stuff  
doesn't work. BlackBox.py leads to the following errors:

Traceback (most recent call last):
   File "vtk/test/BlackBox.py", line 1, in ?
     from vtk.util import vtkMethodParser
   File  
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site- 
packages/vtk_python/vtk/__init__.py", line 28, in ?
     from filtering import *
   File  
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site- 
packages/vtk_python/vtk/filtering.py", line 7, in ?
     from libvtkFilteringPython import *
ImportError: Failure linking new module: : dyld:  
/Library/Frameworks/Python.framework/Versions/2.3/Resources/Python.app/ 
Contents/MacOS/Python Undefined symbols:
_PyArg_VTKParseTuple
_PyVTKClass_Check
_PyVTKClass_New
_PyVTKClass_vtkCollectionNew
_PyVTKClass_vtkDataObjectNew
_PyVTKClass_vtkImplicitFunctionNew
_PyVTKClass_vtkLocatorNew
_PyVTKClass_vtkObjectNew
_PyVTKClass_vtkPointLocatorNew
_PyVTKClass_vtkScalarsToColorsNew
_PyVTKClass_vtkSourceNew
__Z19vtkPythonCheckArrayP7_objectiPfi
__Z19vtkPythonCheckArrayP7_objectiPi

A quick look with nm revealed that at least some symbols are in  
libvtkCommonPython.so but the linker doesn't know about this happy  
coincidence:

[tmac:python2.3/site-packages/vtk_python] totty% otool  
libvtkFilteringPython.so -L
libvtkFilteringPython.so:
         /Volumes/Temp/Download/vtk/osx/bin/libvtkFiltering.dylib  
(compatibility version 0.0.0, current version 0.0.0)
         /Volumes/Temp/Download/vtk/osx/bin/libvtkCommon.dylib  
(compatibility version 0.0.0, current version 0.0.0)
         /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit  
(compatibility version 45.0.0, current version 663.10.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 63.0.0)

What do I have to do in the build-process to make everything work?

Torsten




More information about the vtkusers mailing list