Building python-pyside2 for Almalinux 9
-
Hi,
my goal is to buil FreeCAD tool for Almalinux 9 where it is not available. I'm using source rpms from fedora 35 project and I'm stuck with the last dependancy python-pyside2 from several days and I need your help.- Building from python-pyside2-5.15.2-5.fc35.src.rpm fails because it requires an older version for numpy and I cannot dowgrade this rpm as it is widely used. Almalinux 9 provides python3-numpy-1.23 (fedora35 provides 1.21) and the problem is with UPDATEIFCOPY:
The UPDATEIFCOPY array flag has been removed together with the enum NPY_ARRAY_UPDATEIFCOPY. The associated (and deprecated) PyArray_XDECREF_ERR was also removed. These were all deprecated in 1.14. They are replaced by NPY_ARRAY_WRITEBACKIFCOPY, that requires calling PyArray_ResolveWritebackIfCopy before the array is deallocated.
- using a more recent source rpm python-pyside2-5.15.7-2.fc38.src.rpm (from fedora 38 providing numpy 1.24) and numpy-1.24.1-2.fc38.src.rpm from fedora 38 too it also fails with similar error :
~/rpmbuild/BUILD/pyside-setup-opensource-src-5.15.7/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp:119:22: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY
How can I build python-pyside2 or where can I find a valid version for numpy 1.23 and Qt5 to build FreeCAD tool ?
I'm not famillar at all with building such libraries and may be this is a newbie question, so thank you for your indulgence if I make a serious mistake.Patrick
-
Hi,
my goal is to buil FreeCAD tool for Almalinux 9 where it is not available. I'm using source rpms from fedora 35 project and I'm stuck with the last dependancy python-pyside2 from several days and I need your help.- Building from python-pyside2-5.15.2-5.fc35.src.rpm fails because it requires an older version for numpy and I cannot dowgrade this rpm as it is widely used. Almalinux 9 provides python3-numpy-1.23 (fedora35 provides 1.21) and the problem is with UPDATEIFCOPY:
The UPDATEIFCOPY array flag has been removed together with the enum NPY_ARRAY_UPDATEIFCOPY. The associated (and deprecated) PyArray_XDECREF_ERR was also removed. These were all deprecated in 1.14. They are replaced by NPY_ARRAY_WRITEBACKIFCOPY, that requires calling PyArray_ResolveWritebackIfCopy before the array is deallocated.
- using a more recent source rpm python-pyside2-5.15.7-2.fc38.src.rpm (from fedora 38 providing numpy 1.24) and numpy-1.24.1-2.fc38.src.rpm from fedora 38 too it also fails with similar error :
~/rpmbuild/BUILD/pyside-setup-opensource-src-5.15.7/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp:119:22: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY
How can I build python-pyside2 or where can I find a valid version for numpy 1.23 and Qt5 to build FreeCAD tool ?
I'm not famillar at all with building such libraries and may be this is a newbie question, so thank you for your indulgence if I make a serious mistake.Patrick
@PatrickB said in Building python-pyside2 for Almalinux 9:
dependancy python-pyside2
Doesn't Almalinux provide that package?
-
Not Almalinux, but Epel9 provides python3-pyside2-devel.x86_64 but it is not installable:
Problème: package python3-pyside2-devel-1:5.15.7-2.el9.x86_64 from epel requires libpyside2.cpython-39-x86_64-linux-gnu.so.5.15()(64bit), but none of the providers can be installed
- requêtes conflictuelles
- nothing provides libQt5Charts.so.5(Qt_5.15.3_PRIVATE_API)(64bit) needed by python3-pyside2-1:5.15.7-2.el9.x86_64 from epel
- nothing provides libQt5Core.so.5(Qt_5.15.3_PRIVATE_API)(64bit) needed by python3-pyside2-1:5.15.7-2.el9.x86_64 from epel
- nothing provides libQt5Qml.so.5(Qt_5.15.3_PRIVATE_API)(64bit) needed by python3-pyside2-1:5.15.7-2.el9.x86_64 from epel
- nothing provides libQt5Quick.so.5(Qt_5.15.3_PRIVATE_API)(64bit) needed by python3-pyside2-1:5.15.7-2.el9.x86_64 from epel
-
I'm still working on this build of the rpm. I hit now the "no member named 'DragMove' in 'QOpenGLShader'" problem with pyside-setup-opensource-src-5.15.11.tar.xz and clang version 19.1.7.
There are many discussion about bug resolution on the python3-pyside2 side and some saying it's related to older versions of llvm, but I do not found how to resolve this.
Did someone have a workaround ?
Some discussion says to move to Pyside6 and Qt6 but Freecad requires python3-pyside2.
Thanks. -
PySide 2 can only be built with clang / llvm versions <= 15. We provide some versions at https://download.qt.io/development_releases/prebuilt/libclang/ .
-
Thanks for your suggestion, I'm trying building pyside2 with this way now, but something is now unclear for me:
- this strategy means building pyside2 witch llvm <=15 even if my linux provides llvm 19 (I set the PATH to use llvm15)
- what about building FreeCAD after deploying pyside2 (if my build is successfull) ? Using llvm15 or the llvm19 of the OS ?
- Some other prerequisites fro FreeCAD are built with llvm19 too, should I build them with llvm15 instead ?
I'm a little bit lost with this approach.
-
That depends on whether FreeCAD runs PySide's code generator, shiboken, to generate bindings. This would then require clang <= 15. But FreeCAD should really update to PySide6.
-
I have successfully built pyside2 with your help, many thanks. I'm building it again today more cleanly with steps documentation and rpm packaging of the binaries to deploy on numerous laptops and servers running almalinux9. Next I will try to build the Fedora35 Freecad version from the source rpm.
Yes latest Freecad versions are based on pyside6 and qt6, but Almalinux provides qt5 (and optionally qt6) but not PySide6. I will also try this build later.