-
Notifications
You must be signed in to change notification settings - Fork 551
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install under M1 Macintosh mode (works in x86/rosetta 2 mode) #834
Comments
It pip tries to install from sources like it does here, then the platform is not supported by any of the existing wheels. |
If I am understanding what little documentation I have looked at regarding Travis CI. Xcode 12.0 is available by adding osx_image: xcode12u to your .travis.yml. And Xcode 12/12.2 support is what is needed for Universal support for M1 ARM... I believe. But I don't know if the travis.yml file is at Github's side, or a feature you directly control? Could you check and see if that's available, I would greatly appreciate it. |
I can check what happens when I add that |
Ok, made these changes to my ravis yml: They have the platform tag
|
So just adding the compile tag for Travis CI obviously isn't the whole story... I did some more digging, and I wish to stress, this is the first time I've even looked at Travis, beyond seeing travis logs from builds in a few repositories... I know that it does work after being updated, because I was testing this for Pillow, and psycopg2. My understanding is that they updated their Travis CI builds to add ARM64 support. This is a travis ci build YAML from Microsoft (LWJGL/lwjgl3#601 (comment)), The major differences that I see are the cmake parameters (eg -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 vs -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0) and the addition of the cmake architectures. I'm just surprised that I can't find any clear cut documentation on how to add this to Travis CI.... The appveyor.yml also was updated in that same commit to add "PLATFORM: ARM64", so maybe that also needs to be updated? https://github.com/LWJGL-CI/glfw/blob/c5ee7da34cad750429b1f2bea4c6ea7ed4e7de6f/appveyor.yml#L19 I just want to stress, I'll be happy to continue testing as needed.
|
I am a little lost at the moment. Reading some info about Rosetta2 I learned that this is some feature that supports x86 apps made for Intel processors to run on M1. It is an emulation. |
It works fine under Rosetta 2, which I’d classify more of a translation than emulation.
But I’d be very surprised to see if it couldn’t be compiled under ARM, simply because a large amount of Android systems are ARM based…
Not that I can read it all, but this appears to be someone that says they’ve compiled it under arm.
https://www.cnblogs.com/pang1567/p/4083740.html <https://www.cnblogs.com/pang1567/p/4083740.html>
I’ll dig a bit, and maybe try to compile it myself….
- Benjamin
… On Jan 25, 2021, at 8:21 AM, Jorj X. McKie ***@***.***> wrote:
I am a little lost at the moment.
The examples you mentioned do not use cibuildwheel <https://github.com/joerick/cibuildwheel> like PyMuPDF. cibuildwheel has a set of supported target architectures platform tags - see here <https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip>.
Reading some info about Rosetta2 I learned that this is some feature that supports x86 apps made for Intel processors to run on M1. It is an emulation.
I do not even know whether MuPDF can run / be generated on / for x64 M1 ...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#834 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHPEZWK2FQX2XVMZZFZR6LS3VV5NANCNFSM4WERQXZA>.
|
Not sure if this helps, but from cibuildwheel:
1.8.0
22 January 2021
🌟 Added support for emulated builds! You can now build manylinux wheels on ARM64aarch64, as well as ppc64le and 's390x'. To build under emulation, register QEMU via binfmt_misc and set theCIBW_ARCHS_LINUX <https://cibuildwheel.readthedocs.io/en/latest/options/#archs> option to the architectures you want to run. See this <https://cibuildwheel.readthedocs.io/en/latest/faq/#emulation>FAQ entry <https://cibuildwheel.readthedocs.io/en/latest/faq/#emulation>FAQ entry <https://cibuildwheel.readthedocs.io/en/latest/faq/#emulation> for more information. (#482)
According to:
pypa/cibuildwheel#473 <pypa/cibuildwheel#473>
cibuildwheel gains an --arch option, which is set to native by default, building 32 & 64 bit where appropriate
If you include universal2 or arm64 in the arch list, then cibuildwheel downloads the new Python 3.9 (and 3.8 eventually, I think?) instead of the old one. Or this could toggle based on OS version or compiler version, but I think having it toggle based on command line options is better?
If the new Python is downloaded, then the trick linked previously is used to force x86_64 or arm64 as specified.
The main issue I see, which echo’s my issues earlier, is to insure you have the latest PIP, packaging, wheel modules. They all have upgrades need to support the M1.
But it appears that cibuildwheel may still be working on ARM M1 support?
- Benjamin
… On Jan 25, 2021, at 8:21 AM, Jorj X. McKie ***@***.***> wrote:
I am a little lost at the moment.
The examples you mentioned do not use cibuildwheel <https://github.com/joerick/cibuildwheel> like PyMuPDF. cibuildwheel has a set of supported target architectures platform tags - see here <https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip>.
Reading some info about Rosetta2 I learned that this is some feature that supports x86 apps made for Intel processors to run on M1. It is an emulation.
I do not even know whether MuPDF can run / be generated on / for x64 M1 ...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#834 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHPEZWK2FQX2XVMZZFZR6LS3VV5NANCNFSM4WERQXZA>.
|
Yeah, I have read this: |
All this is covered in one go, when the wheel generation requets is sent to Travic CI. The numerous options and "export" variables, like the one mentioned above, just control the amount of different wheels generated. |
On Linux with docker installed, registering qemu via binfmt_misc can be as easy as: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes no idea if that works on OS X though. Might still be helpful to have arm wheels for linux though. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I am unable to install pymupdf under Mac OS X Big Sur Native M1 (eg pip install PyMuPDF), whereas in Intel mode (Rosetta 2/aka Intel translation mode) it works without any issue.
It appears that it is being built and the wheel is being ignored.
Your configuration (mandatory)
MAc OS X Big Sur, M1 Mac Mini w/16 Gb Ram
Python 3.9.1 (default, Jan 8 2021, 12:11:08)
[Clang 12.0.0 (clang-1200.0.32.28)] on darwin
PyMuPDF Using cached PyMuPDF-1.18.6.tar.gz (258 kB)
Additional context (optional)
I suspect that the Universal 2 wheel just needs to be created. Cryptography, and Pillow within the last day, just started to work in M1 Native mode, due to Wheel support being added to the build systems...
If there is anything that I can assist with or help, please feel free to let me know. I'd be happy to assist.
The text was updated successfully, but these errors were encountered: