[SOLVED]compile pyside2+shiboken2 with QT5+phyton3 on cauldr
Posted: Dec 22nd, '17, 19:02
Hello,
I'm on Cauldron. To follow the progress of FreeCAD I'm used to compile from time to time the last Git version.
People from FreeCAD start to use QT5 and python3.
So I would like to compile pyside2 and shiboken2.0 with QT5 and Python3 (from http://code.qt.io/cgit/pyside/pyside-setup.git)
I use the script provided in the git repository, using the command line
I don't see any problem until I get the following errors
Just some warning at the cmake configuration time
I really do not know what's wrong and what I can do to go further
I'm on Cauldron. To follow the progress of FreeCAD I'm used to compile from time to time the last Git version.
People from FreeCAD start to use QT5 and python3.
So I would like to compile pyside2 and shiboken2.0 with QT5 and Python3 (from http://code.qt.io/cgit/pyside/pyside-setup.git)
I use the script provided in the git repository, using the command line
- Code: Select all
#python3 setup.py build --qmake=/usr/lib64/qt5/bin/qmake --openssl=/usr/bin/openssl
I don't see any problem until I get the following errors
- Code: Select all
[ 4%] Building CXX object PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/qabstractitemmodel_wrapper.cpp.o
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp:1241:6: error: #error writeVirtualMethodNative: QAbstractItemModel::span(const QModelIndex & index) const: Could not find a minimal constructor for type 'QSize'. This will result in a compilation error.
#error writeVirtualMethodNative: QAbstractItemModel::span(const QModelIndex & index) const: Could not find a minimal constructor for type 'QSize'. This will result in a compilation error.
^~~~~
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp:1268:2: error: #error writeMinimalConstructorExpression: Could not find a minimal constructor for type 'QSize'. This will result in a compilation error.
#error writeMinimalConstructorExpression: Could not find a minimal constructor for type 'QSize'. This will result in a compilation error.
^~~~~
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp: Dans la fonction membre « virtual QSize QAbstractItemModelWrapper::span(const QModelIndex&) const »:
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp:1244:9: error: instruction « return » without value in a function giving « QSize » as result [-fpermissive]
return ;
^~~~~~
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp:1259:9: error: instruction « return » without value in a function giving « QSize » as result [-fpermissive]
return ;
^~~~~~
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp:1262:151: error: « SBK_QSIZE_IDX » was not declared in this scope
PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppValueConvertible(reinterpret_cast<const SbkObjectType *>(SbkPySide2_QtCoreTypes[SBK_QSIZE_IDX]), pyResult);
^~~~~~~~~~~~~
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp:1262:151: note: suggested alternative: « SBK_QFILE_IDX »
PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppValueConvertible(reinterpret_cast<const SbkObjectType *>(SbkPySide2_QtCoreTypes[SBK_QSIZE_IDX]), pyResult);
^~~~~~~~~~~~~
SBK_QFILE_IDX
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp:1265:9: error: instruction « return » without value in a function giving « QSize » [-fpermissive] as result
return ;
^~~~~~
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp: In function « PyObject* Sbk_QAbstractItemModelFunc_span(PyObject*, PyObject*) »:
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp:5434:123: error: « SBK_QSIZE_IDX » was not declared in this scope
pyResult = Shiboken::Conversions::copyToPython(reinterpret_cast<const SbkObjectType *>(SbkPySide2_QtCoreTypes[SBK_QSIZE_IDX]), &cppResult);
^~~~~~~~~~~~~
/home/john/programmes/sources/pyside-setup/pyside3_build/py3.6-qt5.9.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractitemmodel_wrapper.cpp:5434:123: note: suggested alternative: « SBK_QFILE_IDX »
pyResult = Shiboken::Conversions::copyToPython(reinterpret_cast<const SbkObjectType *>(SbkPySide2_QtCoreTypes[SBK_QSIZE_IDX]), &cppResult);
^~~~~~~~~~~~~
SBK_QFILE_IDX
make[2]: *** [PySide2/QtCore/CMakeFiles/QtCore.dir/build.make:581: PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/qabstractitemmodel_wrapper.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:365: PySide2/QtCore/CMakeFiles/QtCore.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
error: Error compiling pyside2
Just some warning at the cmake configuration time
- Code: Select all
........
-- PySide will be generated using the protected hack!
-- Checking for QGtkStyle in QtWidgets -- not found
-- Checking for QMacStyle in QtWidgets -- not found
-- Checking for QSslCertificate in QtNetwork -- not found
-- Checking for QSslCipher in QtNetwork -- not found
-- Checking for QSslConfiguration in QtNetwork -- not found
-- Checking for QSslError in QtNetwork -- not found
-- Checking for QSslKey in QtNetwork -- not found
-- Checking for QSslSocket in QtNetwork -- not found
-- Configuring done
-- Generating done
I really do not know what's wrong and what I can do to go further