[英]Trouble building PySide on Mac OS X (El Capitan)
I am trying build PySide on a Mac running El Capitan (10.11.5). 我正在尝试在运行El Capitan(10.11.5)的Mac上构建PySide。
This is the command I am using: 这是我正在使用的命令:
python setup.py bdist_wheel --cmake=/Applications/CMake.app/Contents/bin/cmake
However, every time I run this, I get the following error messages: 但是,每次运行此命令时,都会收到以下错误消息:
In file included from /Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp:38:
/Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.h:56:76: error: virtual function
'metaObject' has a different return type ('Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType>') than the function it overrides (which has return type 'const QMetaObject *')
virtual Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType > metaObject() const;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/Trolltech/Qt-4.8.6/include/phonon/objectdescriptionmodel.h:202:68: note: overridden virtual function is here
PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject *metaObject() const;
~~~~~~~~~~~~~^
/usr/local/Trolltech/Qt-4.8.6/include/phonon/objectdescriptionmodel.h:194:40: error: base class 'QAbstractListModel' has private copy constructor
class PHONON_TEMPLATE_CLASS_EXPORT ObjectDescriptionModel : public QAbstractListModel
^
/usr/local/Trolltech/Qt-4.8.6/lib/QtCore.framework/Headers/qabstractitemmodel.h:380:20: note: declared private here
Q_DISABLE_COPY(QAbstractListModel)
^
/Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp:636:16: note: implicit copy
constructor for 'Phonon::ObjectDescriptionModel<Phonon::ObjectDescriptionType::AudioOutputDeviceType>' first required here
return ::Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType >(((::QObject*)0));
^
/Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp:641:16: error: no viable
conversion from returned value of type 'const QMetaObject *' to function return type 'Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType>'
return this->::Phonon::AudioOutputDeviceModel::metaObject();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp:651:16: error: no matching
constructor for initialization of 'Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType>'
return ::Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType >(((::QObject*)0));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp:656:150: error: no matching
function for call to 'SbkType'
...2, "Invalid return value in function %s, expected %s, got %s.", "AudioOutputDeviceModel.metaObject", Shiboken::SbkType< Phonon::ObjectDescriptionModel >()->tp_name, pyResult->ob_type->tp_n...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_install/py2.7-qt4.8.6-64bit-release/include/shiboken/conversions.h:52:15: note: candidate template ignored: invalid explicitly-specified
argument for template parameter 'T'
PyTypeObject* SbkType()
^
/Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp:657:16: error: no matching
constructor for initialization of 'Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType>'
return ::Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType >(((::QObject*)0));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp:662:12: error: no viable
conversion from returned value of type '::Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType> *' to function return type
'Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType>'
return cppResult;
^~~~~~~~~
/Users/spearsc/Documents/pyside_tmp/PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp:1460:157: error:
incompatible operand types ('Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType>' and 'const QMetaObject *')
...? reinterpret_cast<AudioOutputDeviceModelWrapper*>(cppSelf)->::AudioOutputDeviceModelWrapper::metaObject() : cppSelf->metaObject());
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
3 warnings and 8 errors generated.
make[2]: *** [PySide/phonon/CMakeFiles/phonon.dir/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp.o] Error 1
make[1]: *** [PySide/phonon/CMakeFiles/phonon.dir/all] Error 2
make: *** [all] Error 2
error: Error compiling pyside
What is especially maddening is that I have edited the phonon_audiooutputdevicemodelwrapper files, but the edits do not seem to stick. 尤其令人发疯的是,我已经编辑了phonon_audiooutputdevicemodelwrapper文件,但是编辑似乎没有效果。 Running the setup.py script seems to undo my changes.
运行setup.py脚本似乎撤消了我的更改。
I do not need the Phonon module. 我不需要Phonon模块。 However, I do not see a way to skip this module with the PySide build.
但是,我看不到使用PySide构建跳过该模块的方法。 I can skip this with Qt, but I would prefer to not have to rebuild that again.
我可以使用Qt跳过此步骤,但我希望不必再次进行重建。
Strange, I rebuilt Qt without Phonon: 奇怪,我在没有声子的情况下重建了Qt:
$ ./configure –no-phonon –no-phonon-backend
I still have that same issue. 我仍然有同样的问题。
Then I removed the phonon directory (PySide-1.2.4/pyside_build/py2.7-qt4.8.6-64bit-release/pyside/PySide/phonon) and got a different error message. 然后我删除了phonon目录(PySide-1.2.4 / pyside_build / py2.7-qt4.8.6-64bit-release / pyside / PySide / phonon),并得到了不同的错误消息。
Here is how I built PySide without Phonon: 这是我在没有声子的情况下构建PySide的方法:
Download the PySide source to a temp direct and uncompress the archive: 将PySide源下载到临时目录,然后解压缩存档:
$ pwd
/Users/spearsc/Documents/pyside_tmp
$ tar –xvzf dist\PySide-1.2.4.tar
Now you need to edit PySide-1.2.4/sources/pyside/CMakeLists.txt. 现在您需要编辑PySide-1.2.4 / sources / pyside / CMakeLists.txt。 Find this line (line 33 I believe):
找到这行(我相信是第33行):
HAS_QT_MODULE(QT_PHONON_FOUND phonon)
Just comment out that line: 只需注释掉这一行:
# HAS_QT_MODULE(QT_PHONON_FOUND phonon)
Then run the setup.py script: 然后运行setup.py脚本:
python setup.py bdist_wheel --cmake=/Applications/CMake.app/Contents/bin/cmake
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.