Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Building python-pyside2 for Almalinux 9
Forum Updated to NodeBB v4.3 + New Features

Building python-pyside2 for Almalinux 9

Scheduled Pinned Locked Moved Unsolved Qt for Python
8 Posts 3 Posters 518 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PatrickB
    wrote last edited by
    #1

    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

    jsulmJ 1 Reply Last reply
    0
    • P PatrickB

      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

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote last edited by
      #2

      @PatrickB said in Building python-pyside2 for Almalinux 9:

      dependancy python-pyside2

      Doesn't Almalinux provide that package?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        PatrickB
        wrote last edited by
        #3

        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
        1 Reply Last reply
        0
        • P Offline
          P Offline
          PatrickB
          wrote last edited by
          #4

          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.

          1 Reply Last reply
          0
          • F Offline
            F Offline
            friedemannkleint
            wrote last edited by
            #5

            PySide 2 can only be built with clang / llvm versions <= 15. We provide some versions at https://download.qt.io/development_releases/prebuilt/libclang/ .

            1 Reply Last reply
            0
            • P Offline
              P Offline
              PatrickB
              wrote last edited by
              #6

              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.

              1 Reply Last reply
              0
              • F Offline
                F Offline
                friedemannkleint
                wrote last edited by
                #7

                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.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  PatrickB
                  wrote last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved