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. Is it possible to build PySide2 for M1 (arm64)?

Is it possible to build PySide2 for M1 (arm64)?

Scheduled Pinned Locked Moved Unsolved Qt for Python
pyside2
3 Posts 3 Posters 1.4k Views 1 Watching
  • 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.
  • carlos-villavicencioC Offline
    carlos-villavicencioC Offline
    carlos-villavicencio
    wrote on last edited by
    #1

    I’m trying to build my project dependencies for native Apple Silicon support. However, I’m having issues compiling PySide2. I know… I know… it’s too old and it’s better to use PySide6. We want to upgrade that too. But my point is to know if I can do the arm64 support first.

    To build PySide2 I’m using:

    • macOS 12.6
    • XCode 14
    • I compiled Python 3.9 with no issues.
    • QT 5.15.10
    • libclang 12
    • pyside-setup (source code) 5.15.2.1

    My error message when I try to build PySide2 with python setup.py install --qmake=... is:

    Something's broken.  UCHAR_MAX should be defined in limits.h.
    

    I realized that since QT 5.15.4 I can use the option QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" but I’m not sure how to pass it to pyside-setup.

    I have a couple of questions:

    1. Is it possible to compile PySide2 (QT5) for arm?
    2. How can I build PySide2 locally without a Qt license just for development purposes? I have my file only on CI and when I try locally I get:

    Error: Qt license file was not found! Project ERROR: License check failed! Giving up ... error: Failed to query for Qt's QMAKE_MACOSX_DEPLOYMENT_TARGET.

    Y 1 Reply Last reply
    1
    • carlos-villavicencioC carlos-villavicencio

      I’m trying to build my project dependencies for native Apple Silicon support. However, I’m having issues compiling PySide2. I know… I know… it’s too old and it’s better to use PySide6. We want to upgrade that too. But my point is to know if I can do the arm64 support first.

      To build PySide2 I’m using:

      • macOS 12.6
      • XCode 14
      • I compiled Python 3.9 with no issues.
      • QT 5.15.10
      • libclang 12
      • pyside-setup (source code) 5.15.2.1

      My error message when I try to build PySide2 with python setup.py install --qmake=... is:

      Something's broken.  UCHAR_MAX should be defined in limits.h.
      

      I realized that since QT 5.15.4 I can use the option QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" but I’m not sure how to pass it to pyside-setup.

      I have a couple of questions:

      1. Is it possible to compile PySide2 (QT5) for arm?
      2. How can I build PySide2 locally without a Qt license just for development purposes? I have my file only on CI and when I try locally I get:

      Error: Qt license file was not found! Project ERROR: License check failed! Giving up ... error: Failed to query for Qt's QMAKE_MACOSX_DEPLOYMENT_TARGET.

      Y Offline
      Y Offline
      yusuf_dev
      wrote on last edited by
      #2

      @carlos-villavicencio hi, did you find solution? Also how did you build pyside2 from source?

      SGaistS 1 Reply Last reply
      0
      • Y yusuf_dev

        @carlos-villavicencio hi, did you find solution? Also how did you build pyside2 from source?

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Since Qt 5.15.2 contains only x86_64, one thing you can do is start a shell with the arch command so that it runs in x86_64 mode and from there follow the build instructions.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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