[vtkusers] Anyone Compile for python on Mac OS X 10.3 panther?

Frank Lindseth Frank.Lindseth at sintef.no
Tue Nov 25 19:31:49 EST 2003


Hi Sheehan,

I guess you are using the Python that came with the system.
Try adding a link from /Library/Frameworks (the place for the old full  
framework install)
to /System/Library/Frameworks/ (the place for the new preinstalled  
python framworks)
[sule:/Library/Frameworks] frankl% ls -l
lrwxr-xr-x   1 root  admin   43 26 Nov 00:04 Python.framework ->  
/System/Library/Frameworks/Python.framework
drwxrwxr-x   6 root  admin  204 14 Nov 10:40 StuffIt.framework
drwxr-xr-x  11 root  admin  374 28 Oct 15:13 Tcl.framework
dr-xr-xr-x  11 root  admin  374 28 Oct 15:13 Tk.framework

Judging  from my ongoing build this might do the trick.
As for the reason, I'm not sure, isn't /System/Library/Frameworks/ in  
the path?, is
/Library/Frameworks hardcoded somewhere?
Please comment.

Best regards,
Frank



On Sunday, November 23, 2003, at 01:16 AM, Sheehan Olver wrote:

> I've been trying to compile vtk with the python wrappings on panther.
> Note that I have successfully compiled with C++ and Carbon wrappings.
> When I "make", I get the errors:
>
> /usr/bin/libtool: internal link edit command failed
> ld: warning prebinding disabled because of undefined symbols
> ld: Undefined symbols:
> _PyErr_Clear
> _PyFloat_FromDouble
> _PyInt_FromLong
> _PyString_FromString
> __Py_NoneStruct
> _Py_BuildValue
> _PyArg_ParseTuple
> _PyCallable_Check
> _PyErr_SetString
> _PyExc_ValueError
> _PyString_FromStringAndSize
> _PyArg_ParseTupleAndKeywords
> _PyArg_VaParse
> _PyCFunction_NewEx
> _PyDict_DelItem
> _PyDict_DelItemString
> _PyDict_GetItem
> _PyDict_GetItemString
> _PyDict_New
> _PyDict_SetItem
> _PyDict_Type
> _PyErr_ExceptionMatches
> _PyErr_Print
> _PyEval_CallObjectWithKeywords
> _PyEval_GetGlobals
> _PyExc_AttributeError
> _PyExc_KeyboardInterrupt
> _PyExc_RuntimeError
> _PyExc_TypeError
> _PyFloat_AsDouble
> _PyInt_AsLong
> _PyList_Append
> _PyList_GetItem
> _PyList_New
> _PyList_SetItem
> _PyList_Sort
> _PyMethod_New
> _PyObject_Free
> _PyObject_GetAttrString
> _PySequence_GetItem
> _PySequence_SetItem
> _PyString_AsString
> _PyString_InternFromString
> _PyString_Type
> _PyTuple_GetItem
> _PyTuple_GetSlice
> _PyTuple_New
> _PyTuple_Size
> _PyTuple_Type
> _PyType_IsSubtype
> _PyType_Type
> _Py_AtExit
> _Py_Exit
> __PyObject_New
> __PyString_Resize
> make[3]: ***
> [/Users/solver/Projects/opensource/VTK/pythonBuild/bin/ 
> libvtkCommonPytho
> nD.dylib] Error 1
> make[2]: *** [default_target] Error 2
> make[1]: *** [default_target_Common] Error 2
> make: *** [default_target] Error 2
>
> I've set the following settings in CMakeCache.txt, using the system
> Python.framework:
>
> //What is the path where the file Python.h can be found
> PYTHON_INCLUDE_PATH:PATH=/System/Library/Frameworks/Python.framework/ 
> Hea
> ders
>
> //Where can one of the python23, python2.3, python22, python2.2,
> // python21, python2.1, python20, python2.0, python16, python1.6,
> // python15 or python1.5 libraries be found
> PYTHON_LIBRARY:FILEPATH=-framework Python
>
> //Utility library needed for vtkpython
> PYTHON_UTIL_LIBRARY:FILEPATH=PYTHON_UTIL_LIBRARY-NOTFOUND
>
> I also tried PYTHON_LIBRARY:STRING=-framework Python, but that had the
> same error.  Note that when I compile the following test program  
> test.c:
>
>
> #include <Python/Python.h>
>
> int main(int arc, const char * argv[])
> {
>     Py_Exit(1);
>
>     return 0;
> }
>
>
> with
>
> 	gcc -framework Python test.c
>
> It does not complain, so the framework does have at least some of the
> symbols that caused errors.  Anyone have any suggestions?
>
> Thanks for any help,
> Sheehan Olver
>
>




More information about the vtkusers mailing list