[vtkusers] Building Python bindings on OS X
Russel Howe
russel at appliedminds.net
Thu Mar 22 12:09:53 EDT 2007
I am attempting to use Darwinports to build vtk under OS X.
Darwinports currently uses
VTK-4.2-LatestRelease.tar.gz
The Darwinports build works fine, but it does not include python
bindings. When I enable the python bindings with
-D VTK_WRAP_PYTHON:BOOL=ON
the build fails with undefined symbols, listed below. Most of these
should come from the python framework, but the preceding link command
does not include any python files. I made the following changes to
CMakeCache to point to the Darwinports python with the same result
//Path to a program.
PYTHON_EXECUTABLE:FILEPATH=/opt/local/bin/pythonw2.4
//Path to a file.
PYTHON_INCLUDE_PATH:PATH=/opt/local/Library/Frameworks/
Python.framework/Headers
It appears CMake knows about the correct python, what else should I
look at?
The error:
cd /opt/local/var/db/dports/sources/
rsync.rsync.darwinports.org_dpupdate_dports/graphics/vtk/work/VTK/
Filtering && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/
vtkFilteringPython.dir/link.txt --verbose=1
/usr/bin/c++ -Wno-deprecated -no-cpp-precomp -bundle -
headerpad_max_install_names -o ../bin/libvtkFilteringPython.so
"CMakeFiles/vtkFilteringPython.dir/vtkCardinalSplinePython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkCastToConcretePython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkCellLocatorPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkColorTransferFunctionPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkConePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkCylinderPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkDataObjectSourcePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkDataSetSourcePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkDataSetToDataSetFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkDataSetToImageFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkDataSetToPolyDataFilterPython.o"
"CMakeFiles/vtkFilteringPython.dir/
vtkDataSetToStructuredGridFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkDataSetToStructuredPointsFilterPython.o"
"CMakeFiles/vtkFilteringPython.dir/
vtkDataSetToUnstructuredGridFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkImageInPlaceFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkImageMultipleInputFilterPython.o"
"CMakeFiles/vtkFilteringPython.dir/
vtkImageMultipleInputOutputFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkImageSourcePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkImageToImageFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkImageToStructuredPointsPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkImageTwoInputFilterPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkImplicitBooleanPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkImplicitDataSetPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkImplicitSelectionLoopPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkImplicitSumPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkImplicitVolumePython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkImplicitWindowFunctionPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkKochanekSplinePython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkMergePointsPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkPerlinNoisePython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkPiecewiseFunctionPython.o"
"CMakeFiles/vtkFilteringPython.dir/
vtkPiecewiseFunctionShiftScalePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkPiecewiseFunctionSourcePython.o"
"CMakeFiles/vtkFilteringPython.dir/
vtkPiecewiseFunctionToPiecewiseFunctionFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkPointSetSourcePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkPointSetToPointSetFilterPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkPolyDataCollectionPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkPolyDataSourcePython.o"
"CMakeFiles/vtkFilteringPython.dir/
vtkPolyDataToPolyDataFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkRectilinearGridSourcePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkRectilinearGridToPolyDataFilterPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkScalarTreePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkSimpleImageToImageFilterPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkSimpleScalarTreePython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkSpherePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkSplinePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkStructuredGridSourcePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkStructuredGridToPolyDataFilterPython.o"
"CMakeFiles/vtkFilteringPython.dir/
vtkStructuredGridToStructuredGridFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkStructuredPointsCollectionPython.o"
"CMakeFiles/vtkFilteringPython.dir/vtkStructuredPointsSourcePython.o"
"CMakeFiles/vtkFilteringPython.dir/
vtkStructuredPointsToPolyDataFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/
vtkStructuredPointsToStructuredPointsFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/
vtkStructuredPointsToUnstructuredGridFilterPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkSuperquadricPython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkUnstructuredGridSourcePython.o" "CMakeFiles/
vtkFilteringPython.dir/vtkUnstructuredGridToPolyDataFilterPython.o"
"CMakeFiles/vtkFilteringPython.dir/
vtkUnstructuredGridToUnstructuredGridFilterPython.o" -L. -L/opt/local/
var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/
graphics/vtk/work/VTK/bin -lvtkFiltering -lvtkCommon -framework
AppKit -lpthread -lm
/usr/bin/ld: Undefined symbols:
_PyArg_ParseTuple
_PyArg_VTKParseTuple
_PyFloat_FromDouble
_PyInt_FromLong
_PyString_FromString
_PyVTKClass_Check
_PyVTKClass_New
__Py_NoneStruct
vtkPythonGetObjectFromPointer(vtkObjectBase*)
vtkPythonGetPointerFromObject(_object*, char const*)
_PyVTKClass_vtkLocatorNew
_PyErr_Clear
_PyVTKClass_vtkScalarsToColorsNew
_Py_BuildValue
vtkPythonCheckArray(_object*, int, float*, int)
_PyVTKClass_vtkImplicitFunctionNew
_PyVTKClass_vtkSourceNew
vtkPythonCheckArray(_object*, int, int*, int)
_PyVTKClass_vtkPointLocatorNew
_PyVTKClass_vtkDataObjectNew
_PyVTKClass_vtkCollectionNew
_PyVTKClass_vtkObjectNew
collect2: ld returned 1 exit status
make[2]: *** [bin/libvtkFilteringPython.so] Error 1
make[1]: *** [Filtering/CMakeFiles/vtkFilteringPython.dir/all] Error 2
make: *** [all] Error 2
More information about the vtkusers
mailing list