[SOLVED]compile pyside2+shiboken2 with QT5+phyton3 on cauldr

This forum is dedicated to testing early releases and cauldron : Howtos, tips, tricks and user global feedback and thoughts...

Helpful tip :
For bugs tracking we use : https://bugs.mageia.org = The Mageia Bug Tracker
In this bug tracker you'll find already reported bugs and you'll be able to report those you have found....

[SOLVED]compile pyside2+shiboken2 with QT5+phyton3 on cauldr

Postby john_gibbe » 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
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
Last edited by john_gibbe on Mar 12th, '18, 16:25, edited 1 time in total.
john_gibbe
 
Posts: 20
Joined: Jun 5th, '11, 15:22

Re: compile pyside2+shiboken2 with QT5 and phyton3 on cauldr

Postby doktor5000 » Dec 23rd, '17, 02:52

For the error message, you may want to look at https://bugreports.qt.io/browse/PYSIDE-76

For the cmake output, seems you're missing quite a few qt development packages. Best show the output of
Code: Select all
rpm -qa|sort|grep qt5|grep devel
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: compile pyside2+shiboken2 with QT5 and phyton3 on cauldr

Postby john_gibbe » Dec 23rd, '17, 19:12

Hello,
here are the installed packages:
Code: Select all
lib64polkitqt5-qt5-devel-0.112.0-5.mga6
lib64qt5base5-devel-5.9.1-8.mga7
lib64qt5bluetooth-devel-5.9.1-1.mga7
lib64qt5bootstrap-static-devel-5.9.1-8.mga7
lib64qt5charts-devel-5.9.1-1.mga7
lib64qt5concurrent-devel-5.9.1-8.mga7
lib64qt5core-devel-5.9.1-8.mga7
lib64qt5datavisualization-devel-5.9.1-1.mga7
lib64qt5dbus-devel-5.9.1-8.mga7
lib64qt5designer-devel-5.9.1-3.mga7
lib64qt5eglfsdeviceintegration-devel-5.9.1-8.mga7
lib64qt5eglfskmssupport-devel-5.9.1-8.mga7
lib64qt5extserialport-devel-1.2-6.mga6
lib64qt5gui-devel-5.9.1-8.mga7
lib64qt5help-devel-5.9.1-3.mga7
lib64qt5imageformats-devel-5.9.1-1.mga7
lib64qt5lockedfile-devel-2.4.1-14.mga6
lib64qt5multimedia-devel-5.9.1-1.mga7
lib64qt5multimediawidgets-devel-5.9.1-1.mga7
lib64qt5networkauth-devel-5.9.1-1.mga7
lib64qt5network-devel-5.9.1-8.mga7
lib64qt5opengl-devel-5.9.1-8.mga7
lib64qt5positioning-devel-5.9.1-2.mga7
lib64qt5printsupport-devel-5.9.1-8.mga7
lib64qt5qml-devel-5.9.1-2.mga7
lib64qt5quick-devel-5.9.1-2.mga7
lib64qt5quicktemplates-devel-5.9.1-4.mga7
lib64qt5quickwidgets-devel-5.9.1-2.mga7
lib64qt5script-devel-5.9.1-1.mga7
lib64qt5scripttools-devel-5.9.1-1.mga7
lib64qt5serialport-devel-5.9.1-1.mga7
lib64qt5sql-devel-5.9.1-8.mga7
lib64qt5svg-devel-5.9.1-1.mga7
lib64qt5test-devel-5.9.1-8.mga7
lib64qt5texttospeech-devel-5.9.1-1.mga7
lib64qt5webchannel-devel-5.9.1-1.mga7
lib64qt5webengine-devel-5.9.1-4.mga7
lib64qt5webkit-devel-5.9.1-1.mga7
lib64qt5webkitwidgets-devel-5.9.1-1.mga7
lib64qt5websockets-devel-5.9.1-1.mga7
lib64qt5webview-devel-5.9.1-1.mga7
lib64qt5widgets-devel-5.9.1-8.mga7
lib64qt5x11extras-devel-5.9.1-1.mga7
lib64qt5xcbqpa-devel-5.9.1-8.mga7
lib64qt5xml-devel-5.9.1-8.mga7
lib64qt5xmlpatterns-devel-5.9.1-1.mga7
lib64qtsingleapplication-qt5-devel-2.6.1-16.mga6
lib64qtsinglecoreapplication-qt5-devel-2.6.1-16.mga6
python3-qt5-devel-5.9-3.mga7
python-qt5-devel-5.9-3.mga7
john_gibbe
 
Posts: 20
Joined: Jun 5th, '11, 15:22

Re: compile pyside2+shiboken2 with QT5 and phyton3 on cauldr

Postby marja » Dec 25th, '17, 19:31

Note that neoclust informed us 6 days ago that he'd start to update Qt5 to version 5.9.3 https://ml.mageia.org/l/arc/dev/2017-12/msg00196.html

He pushed some of those packages three days ago, but more should follow.
User avatar
marja
 
Posts: 541
Joined: Aug 22nd, '11, 20:50

Re: compile pyside2+shiboken2 with QT5 and phyton3 on cauldr

Postby gerard » Feb 22nd, '18, 17:50

Hello,
It looks that pyside2 now use webengine instead of webkit. I've got the same trouble as you and by uninstalling qt5webkit-devel I've been able to go through the compilation.
gerard
 
Posts: 1
Joined: Feb 22nd, '18, 17:44

[SOLVED] compile pyside2+shiboken2 with QT5,phyton3 on cauld

Postby john_gibbe » Mar 12th, '18, 16:23

Thanks a lot Gerard,
by uninstalling lib64qt5webkit I've been able to compile coin, shiboken, pyside and pyside-tools
Then it has been Ok to compile opencascade 7.2.0 and then the last FreeCAD from git.
john_gibbe
 
Posts: 20
Joined: Jun 5th, '11, 15:22

Re: [SOLVED]compile pyside2+shiboken2 with QT5+phyton3 on ca

Postby morgano » Mar 13th, '18, 17:01

Great info, i might need it, thanks :)
For those more lazy of us that are satisfied with version 0.17.pre it is available as Appimage, which Mageia supports.
viewtopic.php?f=7&t=12200
Mandriva since 2006, Mageia 2011 at home & work. Thinkpad T40, T43, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1306
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden


Return to Testing : Alpha, Beta, RC and Cauldron

Who is online

Users browsing this forum: No registered users and 1 guest

cron