[PyKDE] building sip on OS X

Phil Thompson phil at riverbankcomputing.co.uk
Wed Jul 19 09:25:34 BST 2006


On Tuesday 18 July 2006 11:34 pm, Christian Bird wrote:
> Hi all,
>
> I've recently gotten a macbook pro and am trying to build pyqt on it.
> I was able to build Qt and python with no problem whatsoever, however,
> when building sip, I run into an error that I can't figure out, but
> I'm guessing that it's easy since I'm not super familiar with building
> stuff on OSX.  If anyone has suggestions or can tell the problem from
> the output, please let me know.  I don't know if the command that
> creates sip.so should include a reference to the python shared lib or
> something like that.  An help appreciated.  Thanks.
>
> log output below:
>
> -- Chris
>
> make
> cc -c -pipe -Os -w -I. -o main.o main.c
> cc -c -pipe -Os -w -I. -o transform.o transform.c
> cc -c -pipe -Os -w -I. -o gencode.o gencode.c
> cc -c -pipe -Os -w -I. -o heap.o heap.c
> cc -c -pipe -Os -w -I. -o parser.o parser.c
> cc -c -pipe -Os -w -I. -o lexer.o lexer.c
> c++ -headerpad_max_install_names -o sip main.o transform.o gencode.o
> heap.o parser.o lexer.o
> cc -c -pipe -fPIC -Os -w -I. -I/usr/local/include/python2.4 -o siplib.o
> siplib.c cc -c -pipe -fPIC -Os -w -I. -I/usr/local/include/python2.4 -o
> qtlib.o qtlib.c cc -c -pipe -fPIC -Os -w -I. -I/usr/local/include/python2.4
> -o
> threads.o threads.c
> cc -c -pipe -fPIC -Os -w -I. -I/usr/local/include/python2.4 -o objmap.o
> objmap.c c++ -c -pipe -fPIC -Os -w -I. -I/usr/local/include/python2.4 -o
> bool.o bool.cpp c++ -headerpad_max_install_names -bundle -o sip.so siplib.o
> qtlib.o threads.o objmap.o bool.o
> /usr/bin/ld: Undefined symbols:
> _PyArg_ParseTuple
> _PyBaseObject_Type
> _PyBool_FromLong
> _PyBool_Type
> _PyCFunction_NewEx
> _PyCObject_AsVoidPtr
> _PyCObject_FromVoidPtr
> _PyCObject_Type
> _PyCallable_Check
> _PyDictProxy_New
> _PyDict_Copy
> _PyDict_GetItemString
> _PyDict_New
> _PyDict_SetItem
> _PyDict_SetItemString
> _PyErr_Clear
> _PyErr_ExceptionMatches
> _PyErr_Format
> _PyErr_NoMemory
> _PyErr_Occurred
> _PyErr_SetObject
> _PyErr_SetString
> _PyEval_CallObjectWithKeywords
> _PyEval_InitThreads
> _PyExc_AttributeError
> _PyExc_Exception
> _PyExc_IndexError
> _PyExc_NotImplementedError
> _PyExc_RuntimeError
> _PyExc_SystemError
> _PyExc_TypeError
> _PyExc_ValueError
> _PyFloat_AsDouble
> _PyFloat_FromDouble
> _PyFloat_Type
> _PyFunction_Type
> _PyGILState_Ensure
> _PyGILState_Release
> _PyImport_GetModuleDict
> _PyImport_ImportModule
> _PyInt_AsLong
> _PyInt_FromLong
> _PyInt_Type
> _PyLong_AsLong
> _PyLong_AsLongLong
> _PyLong_AsUnsignedLong
> _PyLong_AsUnsignedLongLong
> _PyLong_FromLong
> _PyLong_FromLongLong
> _PyLong_FromUnsignedLong
> _PyLong_FromUnsignedLongLong
> _PyLong_FromVoidPtr
> _PyMem_Free
> _PyMem_Malloc
> _PyMethod_New
> _PyMethod_Type
> _PyModule_GetDict
> _PyObject_Call
> _PyObject_CallObject
> _PyObject_GetAttrString
> _PyObject_Init
> _PyObject_Malloc
> _PyString_AsString
> _PyString_FromString
> _PyString_FromStringAndSize
> _PyString_Type
> _PyThreadState_Get
> _PyTuple_New
> _PyTuple_Size
> _PyTuple_Type
> _PyType_IsSubtype
> _PyType_Ready
> _PyType_Type
> _Py_AtExit
> _Py_BuildValue
> _Py_FatalError
> _Py_InitModule4
> __Py_NoneStruct
> __Py_NotImplementedStruct
> __Py_TrueStruct
> _PyCFunction_Type
> _PyErr_Fetch
> _PyErr_GivenExceptionMatches
> _PyErr_Restore
> _PyEval_RestoreThread
> _PyEval_SaveThread
> _PyExc_NameError
> _PyTuple_GetSlice
> _PyWeakref_GetObject
> _PyWeakref_NewRef
> __Py_ZeroStruct
> _PyThread_get_thread_ident
> collect2: ld returned 1 exit status
> make[1]: *** [sip.so] Error 1
> make: *** [all] Error 2

You are obviously not picking up the Python library.

Why not use the binary installer from python.org rather than building it 
yourself?

Phil




More information about the PyQt mailing list