I'm having problems compiling PyQt on Mac OS X.

Library versions:

Mac OS X 10.4.11
Python 2.5.1
qt-mac-opensource-src-4.4.1
PyQt-mac-gpl-4.4.3
sip-4.7.8-snapshot-20080817


Commands used to compile SIP:

$ python configure.py -n -s MacOSX10.4u.sdk
$ make


Commands used to compile Qt:

$ ./configure -release -nomake examples -nomake demos -no-qdbus - universal -no-framework
$ make
$ sudo make install


Commands used to compile PyQt (this is where the problems start):

$ python configure.py -q /usr/local/Trolltech/Qt-4.4.1/bin/qmake -e QtCore -e QtGui

Results in the following output:

Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.4.3 (licensed under the GNU General Public
License) for Python 2.5.1 on darwin.

Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? yes
Checking to see if the QtGui module should be built...
QtDesigner module disabled with universal binaries.
Qt v4.4.1 free edition is being used.
SIP 4.7.8-snapshot-20080817 is being used.
The Qt header files are in /usr/local/Trolltech/Qt-4.4.1/include.
The shared Qt libraries are in /usr/local/Trolltech/Qt-4.4.1/lib.
The Qt binaries are in /usr/local/Trolltech/Qt-4.4.1/bin.
The Qt mkspecs directory is in /usr/local/Trolltech/Qt-4.4.1.
These PyQt modules will be built: QtCore QtGui.
The PyQt Python package will be installed in
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- packages.
The Designer plugin will be installed in
/usr/local/Trolltech/Qt-4.4.1/plugins/designer.
The PyQt .sip files will be installed in
/Library/Frameworks/Python.framework/Versions/2.5/share/sip/PyQt4.
pyuic4, pyrcc4 and pylupdate4 will be installed in
/Library/Frameworks/Python.framework/Versions/2.5/bin.
Generating the C++ source for the QtCore module...
sip: sip/QtCore/qtimer.sip:54: SIP_RXOBJ_CON and SIP_SLOT_CON must both be given and at most once
Error: Unable to create the C++ code.


So I changed qtimer.sip line  54 from this:

static void singleShot(int msec, SIP_RXOBJ_CON receiver / SingleShot/, SIP_SLOT_CON() member) ...

to this:

    static void singleShot(int msec, SIP_RXOBJ_CON, SIP_SLOT_CON()) ...


And run configure again, which results in this output:

Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.4.3 (licensed under the GNU General Public
License) for Python 2.5.1 on darwin.

Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? yes
Checking to see if the QtGui module should be built...
QtDesigner module disabled with universal binaries.
Qt v4.4.1 free edition is being used.
SIP 4.7.8-snapshot-20080817 is being used.
The Qt header files are in /usr/local/Trolltech/Qt-4.4.1/include.
The shared Qt libraries are in /usr/local/Trolltech/Qt-4.4.1/lib.
The Qt binaries are in /usr/local/Trolltech/Qt-4.4.1/bin.
The Qt mkspecs directory is in /usr/local/Trolltech/Qt-4.4.1.
These PyQt modules will be built: QtCore QtGui.
The PyQt Python package will be installed in
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- packages.
The Designer plugin will be installed in
/usr/local/Trolltech/Qt-4.4.1/plugins/designer.
The PyQt .sip files will be installed in
/Library/Frameworks/Python.framework/Versions/2.5/share/sip/PyQt4.
pyuic4, pyrcc4 and pylupdate4 will be installed in
/Library/Frameworks/Python.framework/Versions/2.5/bin.
Generating the C++ source for the QtCore module...
Creating the Makefile for the QtCore module...
Generating the C++ source for the QtGui module...
sip: sip/QtGui/qapplication.sip:42: syntax error
Error: Unable to create the C++ code.


So I commented out the '%If (WS_X11) ...' block in qapplication.sip (since I'm not compiling against X11, and that block seems to be the holdup). At this point the configure succeeds. So I go on to the next step:

$ make
make[1]: Nothing to be done for `all'.
g++ -c -pipe -fPIC -arch ppc -arch i386 -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -Os -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/ Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -I/ usr/local/Trolltech/Qt-4.4.1/mkspecs/default -I/usr/local/Trolltech/ Qt-4.4.1/include/QtCore -I/usr/local/Trolltech/Qt-4.4.1/include -o sipQtCorecmodule.o sipQtCorecmodule.cpp sip/QtCore/qobject.sip: In function 'int qtcore_py_to_qt_cpp (PyObject*, const sipSigArg*, void*)': sip/QtCore/qobject.sip:1033: error: 'sipAssignInstance' was not declared in this scope sip/QtCore/qobject.sip:1064: error: 'sipAssignMappedType' was not declared in this scope sip/QtCore/qobject.sip: In function 'int qtcore_py_to_qt_cpp (PyObject*, const sipSigArg*, void*)': sip/QtCore/qobject.sip:1033: error: 'sipAssignInstance' was not declared in this scope sip/QtCore/qobject.sip:1064: error: 'sipAssignMappedType' was not declared in this scope sip/QtCore/qobject.sip: In function 'PyObject* qtcore_PyArgumentStorage(const char*, PyObject*)': sip/QtCore/qobject.sip:1279: error: 'sipParseType' was not declared in this scope sip/QtCore/qobject.sip: In function 'PyObject* qtcore_PyArgumentStorage(const char*, PyObject*)': sip/QtCore/qobject.sip:1279: error: 'sipParseType' was not declared in this scope sip/QtCore/qobject.sip: In member function 'void PyQtProxy::unislot (void**)': sip/QtCore/qobject.sip:1932: error: 'sipInvokeSlot' was not declared in this scope sip/QtCore/qobject.sip:1939: error: 'SIP_SINGLE_SHOT' was not declared in this scope sip/QtCore/qobject.sip: In static member function 'static PyObject* PyQtProxy::invokeSlot(const sipSlotConnection&, void**)': sip/QtCore/qobject.sip:1970: error: 'sipInvokeSlot' was not declared in this scope sip/QtCore/qobject.sip: In member function 'void PyQtProxy::unislot (void**)': sip/QtCore/qobject.sip:1932: error: 'sipInvokeSlot' was not declared in this scope sip/QtCore/qobject.sip:1939: error: 'SIP_SINGLE_SHOT' was not declared in this scope sip/QtCore/qobject.sip: In static member function 'static PyObject* PyQtProxy::invokeSlot(const sipSlotConnection&, void**)': sip/QtCore/qobject.sip:1970: error: 'sipInvokeSlot' was not declared in this scope sip/QtCore/qobject.sip: In function 'const QMetaObject* qtcore_qt_metaobject_worker(PyTypeObject*, sipWrapperType*)': sip/QtCore/qobject.sip:3078: error: 'struct _sipTypeDef' has no member named 'td_qt' sip/QtCore/qobject.sip: In function 'const QMetaObject* qtcore_qt_metaobject_worker(PyTypeObject*, sipWrapperType*)': sip/QtCore/qobject.sip:3078: error: 'struct _sipTypeDef' has no member named 'td_qt' sip/QtCore/qobject.sip:3143: error: 'sipParseType' was not declared in this scope sip/QtCore/qobject.sip:3200: error: 'struct _sipTypeDef' has no member named 'td_qt' sip/QtCore/qobject.sip:3143: error: 'sipParseType' was not declared in this scope sip/QtCore/qobject.sip:3200: error: 'struct _sipTypeDef' has no member named 'td_qt' sip/QtCore/qobject.sip: In function 'const QMetaObject* qtcore_qt_metaobject(sipWrapper*, sipWrapperType*, const QMetaObject*)': sip/QtCore/qobject.sip:3420: error: 'struct _sipTypeDef' has no member named 'td_qt' sip/QtCore/qobject.sip: In function 'PyObject* qtcore_staticMetaObject_helper(PyObject*)': sip/QtCore/qobject.sip:3432: error: 'sipIsExactWrappedType' was not declared in this scope sip/QtCore/qobject.sip: In function 'const QMetaObject* qtcore_qt_metaobject(sipWrapper*, sipWrapperType*, const QMetaObject*)': sip/QtCore/qobject.sip:3420: error: 'struct _sipTypeDef' has no member named 'td_qt' sip/QtCore/qobject.sip: In function 'PyObject* qtcore_staticMetaObject_helper(PyObject*)': sip/QtCore/qobject.sip:3432: error: 'sipIsExactWrappedType' was not declared in this scope sip/QtCore/qobject.sip: In function 'PyObject* func_pyqtSignature (PyObject*, PyObject*)': sip/QtCore/qobject.sip:583: error: 'sipKwds' was not declared in this scope sip/QtCore/qobject.sip: In function 'PyObject* func_pyqtSignature (PyObject*, PyObject*)': sip/QtCore/qobject.sip:583: error: 'sipKwds' was not declared in this scope lipo: can't open input file: /var/tmp//ccgUWyW3.out (No such file or directory)
make[1]: *** [sipQtCorecmodule.o] Error 1
make: *** [all] Error 2


What's going on here? I never had this much trouble compiling PyQt before. Have a missed something along the way? Thanks in advance for helping.

~ Daniel

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to