3

I just compiled the latest preview of Qt4.6 on Snow Leopard in 64 bit without any major issues.

http://qt.nokia.com/developer/qt-4.6-technology-preview#download-the-qt-4-1

Now, I am trying to do the same for PyQt4.6 with the latest snapshot from the River Bank website. However, the compiler exits with the following issue:

g++ -c -pipe -fPIC -arch x86_64 -O2 -Wall -W -DNDEBUG -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/Users/drufat/Downloads/PyQt-mac-gpl-4.6-snapshot-20090914/qpy/QtCore -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I/usr/local/Trolltech/Qt-4.6.0/mkspecs/default -I/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers -I/usr/local/Trolltech/Qt-4.6.0/include -F/Users/drufat/Downloads/PyQt-mac-gpl-4.6-snapshot-20090914/qpy/QtCore -F/usr/local/Trolltech/Qt-4.6.0/lib -o sipQtCoreQResource.o sipQtCoreQResource.cpp
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h: In copy constructor ‘QResource::QResource(const QResource&)’:
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/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/lib/QtCore.framework/Headers/qresource.h:59: error: within this context
sipQtCoreQResource.cpp: In constructor ‘sipQResource::sipQResource(const QResource&)’:
sipQtCoreQResource.cpp:78: note: synthesized method ‘QResource::QResource(const QResource&)’ first required here 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h: In static member function ‘static void QScopedPointerDeleter<T>::cleanup(T*) [with T = QResourcePrivate]’:
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:100:   instantiated from ‘QScopedPointer<T, Cleanup>::~QScopedPointer() [with T = QResourcePrivate, Cleanup = QScopedPointerDeleter<QResourcePrivate>]’
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qresource.h:59:   instantiated from here
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:59: error: invalid application of ‘sizeof’ to incomplete type ‘QResourcePrivate’ 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:59: error: creating array with negative size (‘-0x00000000000000001’)
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:60: error: invalid application of ‘sizeof’ to incomplete type ‘QResourcePrivate’ 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:60: error: creating array with negative size (‘-0x00000000000000001’)
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:62: warning: possible problem detected in invocation of delete operator:
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:54: warning: ‘pointer’ has incomplete type
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qresource.h:56: warning: forward declaration of ‘struct QResourcePrivate’
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/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.

Is this an error with PyQt4 trying to access a private member of a Qt4 class? Has anybody compiled PyQt4 on Snow Leopard successfully?

4

3 に答える 3

2

PyQt 4.6.2 が 64 ビット Python 2.6.1 で動作するようになりました。ここに手順を投稿しました:http://mpastell.com/2009/11/24/pyqt-4-6-2-with-snow-leopard/

于 2009-11-24T07:52:37.550 に答える
2

変更ログでは、Phil (PyQt のメンテナー)が昨日、特に Snow Leopard の開発スナップショットで修正を発行したことがわかります。

2009/09/14 12:12:49 phil 64 ビット システムでの Snow Leopard のさらなる修正。QObject.pyqtConfigure() を追加しました。

PyQt の昨日のビルドを使用していますか?

メーリングリストのこのスレッドも特に興味深いものです。

PyQt コンパイルの問題は、Snow Leopard のデフォルトの 64 ビット コンパイルと、同梱されている Python の 64/32 ビット混合バージョンが原因のようです。

問題が解決しない場合は、問題をこのメーリングリストに送信して (問題が修正されるように - うまくいけば)、Qt と PyQt (および場合によっては python) を 32 ビット方式で (-m32 を使用して) (一時的に) 再構築します。コンパイラ フラグ) を今すぐ機能させる必要がある場合。

于 2009-09-15T20:35:29.897 に答える
0

自作プロジェクトの PyQt を使用することをお勧めします: 簡単なビルド、管理された依存関係。

すべて 64 ビットの MBP Unibody で問題なく動作します。

于 2010-03-01T19:49:46.163 に答える