[PyQt] Need a recipe for building

Brian Brown rbb at techgame.net
Tue Sep 29 23:52:04 BST 2009


Hello folks!

I'm yet another Snow Leopard user and I'm trying to get 4.6 going (I'm  
a commercial PyQt user).

 From a starting place, I'm confused as to what I should be using.

    - The Qt 4.6 technology preview (tp1), or get a particular version  
from their repository?
        - If you just check out the trunk, it claims to be 4.7 and  
doesn't work at all

    - The 4.9 sip release or current snapshot?
    - The 4.6 PyQt release or current snapshot?

If none of this is supported or possible under snow leopard I would  
expect to see that on the web site or in a README or something. If  
there is a method of getting this going, could someone put it on the  
wiki?


I'm trying to build it as 32-bit and so am using arch of i386 - I've  
read the list archives and seen various suggestions to get this to  
work, and I've tried many of them. Qt itself builds and works just  
fine, but I currently get the following with Qt 4.6 tp1, Release 4.6  
PyQt and Release 4.9 sip.


g++ -c -pipe -fPIC -arch i386 -O2 -Wall -W -DNDEBUG -DQT_NO_DEBUG - 
DQT_CORE_LIB -I. -I/Users/brian/Dev/Qt/PyQt-mac-commercial-4.6/qpy/ 
QtCore -I/System/Library/Frameworks/Python.framework/Versions/2.6/ 
include/python2.6 -I/usr/local/Trolltech/Qt-4.6.0-tp1/mkspecs/default - 
I/usr/local/Trolltech/Qt-4.6.0-tp1/lib/QtCore.framework/Headers -I/usr/ 
local/Trolltech/Qt-4.6.0-tp1/include -F/Users/brian/Dev/Qt/PyQt-mac- 
commercial-4.6/qpy/QtCore -F/usr/local/Trolltech/Qt-4.6.0-tp1/lib -o  
sipQtCoreQResource.o sipQtCoreQResource.cpp
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h: In  
copy constructor ‘QResource::QResource(const QResource&)’:
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h:180:  
error: ‘QScopedPointer<T, Cleanup>::QScopedPointer(const  
QScopedPointer<T, Cleanup>&) [with T = QResourcePrivate, Cleanup =  
QScopedPointerDeleter<QResourcePrivate>]’ is private
/usr/local/Trolltech/Qt-4.6.0-tp1/lib/QtCore.framework/Headers/ 
qresource.h:59: error: within this context
sipQtCoreQResource.cpp: In constructor ‘sipQResource::sipQResource 
(const QResource&)’:
sipQtCoreQResource.cpp:62: note: synthesized method  
‘QResource::QResource(const QResource&)’ first required here
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h: In  
static member function ‘static void QScopedPointerDeleter<T>::cleanup 
(T*) [with T = QResourcePrivate]’:
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h: 
100:   instantiated from ‘QScopedPointer<T, Cleanup>::~QScopedPointer 
() [with T = QResourcePrivate, Cleanup =  
QScopedPointerDeleter<QResourcePrivate>]’
/usr/local/Trolltech/Qt-4.6.0-tp1/lib/QtCore.framework/Headers/ 
qresource.h:59:   instantiated from here
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h:59:  
error: invalid application of ‘sizeof’ to incomplete type  
‘QResourcePrivate’
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h:59:  
error: creating array with negative size (‘-0x00000000000000001’)
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h:60:  
error: invalid application of ‘sizeof’ to incomplete type  
‘QResourcePrivate’
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h:60:  
error: creating array with negative size (‘-0x00000000000000001’)
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h:62:  
warning: possible problem detected in invocation of delete operator:
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h:54:  
warning: ‘pointer’ has incomplete type
/usr/local/Trolltech/Qt-4.6.0-tp1/lib/QtCore.framework/Headers/ 
qresource.h:56: warning: forward declaration of ‘struct  
QResourcePrivate’
/usr/local/Trolltech/Qt-4.6.0-tp1/include/QtCore/qscopedpointer.h:62:  
note: neither the destructor nor the class-specific operator delete  
will be called, even if they are declared when the class is defined.
make[1]: *** [sipQtCoreQResource.o] Error 1
make: *** [all] Error 2

- Brian



More information about the PyQt mailing list