[PyQt] Re: build pyqt on mac osx 10.5.6

Mitchell L Model MLMConsulting at comcast.net
Sun Dec 6 21:41:47 GMT 2009


> Date: Sun, 6 Dec 2009 04:03:11 +0100
> From: Massimo Di Stefano <massimodisasha at yahoo.it>
> Subject: [PyQt] build pyqt on mac osx 10.5.6
> To: Liste PyQt <PyQt at riverbankcomputing.com>
> Message-ID: <EB37DBE7-32D5-43BD-A910-4D002DA3D71C at yahoo.it>
> Content-Type: text/plain; charset="windows-1252"
>
> hi,
>
> have you any clue about this error
>
> http://paste.debian.net/53267/
>
> g++ -c -pipe -fno-strict-aliasing -O2 -arch x86_64 -Xarch_x86_64 - 
> mmacosx-version-min=10.5 -fPIC -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB - 
> DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.6.0/mkspecs/ 
> macx-g++ -I. -I/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/ 
> Versions/4/Headers -I/usr/local/Trolltech/Qt-4.6.0/include/QtCore -I/ 
> usr/local/Trolltech/Qt-4.6.0/lib/QtGui.framework/Versions/4/Headers - 
> I/usr/local/Trolltech/Qt-4.6.0/include/QtGui -I/usr/local/Trolltech/ 
> Qt-4.6.0/include -I/usr/local/include -I/System/Library/Frameworks/ 
> Python.framework/Versions/2.6/include/python2.6 -I../../QtCore -I. - 
> I. -F/usr/local/Trolltech/Qt-4.6.0/lib -o qpycore_pyqtsignal.o  
> qpycore_pyqtsignal.cpp
> qpycore_pyqtsignal.cpp: In function ‘int qpycore_get_lazy_attr(const  
> sipTypeDef*, PyObject*)’:
> qpycore_pyqtsignal.cpp:458: error: ‘const struct _pyqt4QtSignal’ has  
> no member named ‘docstring’
> qpycore_pyqtsignal.cpp: At global scope:
> qpycore_pyqtsignal.cpp:473: warning: ‘int  
> add_overload(qpycore_pyqtSignal*, const char*, const char*)’ defined  
> but not used
> make[2]: *** [qpycore_pyqtsignal.o] Error 1
> make[1]: *** [all] Error 2
> make: *** [all] Error 2
>
>
> i'm on osx 10.6 qt-4.6 (cocoa) , sip snapshot , pyqt snapshot
>
> i build qt from source with -cocoa flag
>
> sip snapshot using this configure :
>
> python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/ 
> local/bin \
> -e /usr/local/include -v /usr/local/share/sip --arch=x86_64
>
>
> and pyqt configure using :
>
> python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/ 
> local/bin --use-arch x86_64

It is my impression that you must specify --arch=i386 for sip and -- 
use-arch i386 for PyQt because the Qt installer for OS-X installs a 32- 
bit library. I don't know whether this is the cause of your error.

Even if you do give it those flags, it is my belief, based on  
extensive experiments, posts to this list, and a communication from  
Mark Summerield, that PyQt will not compile on OX 10.5 or 10.6 using  
Python 2.5 or 2.6. Error messages vary, but near the end of the make  
there are symbols missing. Here's what I get on 10.5, either on a  
MacBook Pro or Mac Pro with --arch=i386 for sip and --use-arch i386  
for PyQt:

rm -f libpythonplugin.dylib
g++ -headerpad_max_install_names -arch i386 -single_module -dynamiclib  
-o libpythonplugin.dylib pluginloader.o moc_pluginloader.o  -F/Library/ 
Frameworks -L/Library/Frameworks -framework Python -framework  
QtDesigner -framework QtScript -framework QtXml -framework QtGui - 
framework Carbon -framework AppKit -framework QtCore -lz -lm - 
framework ApplicationServices
Undefined symbols:
   "_PyString_FromString", referenced from:
       PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [libpythonplugin.dylib] Error 1
make: *** [all] Error 2





More information about the PyQt mailing list