-
Notifications
You must be signed in to change notification settings - Fork 49
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
Support for Apple Silicon? #168
Comments
Sorry - not yet, mostly because we have no means to do CI tests. But as far as I know opam does support it, so it shouldn't be that hard to fix. I would appreciate if you could try it. |
For this specific error, the fix should be to add to the case in
You might encounter a few other places ... |
Ah, that's good to know. I was surprised that the lack of support was not documented anywhere in the repo. When I get a chance to test, I will report back here. |
We should probably add a link to this known issue from the release notes. |
@Zimmi48 : yes done. I also encouraged people who have Apple silicon to ping us for a remote debug session. |
Alright, with the changes that @MSoegtropIMC suggested above I got up to the following:
But after changing the ocaml-base-compiler version to 4.10.2 that supports arm64 at: platform/shell_scripts/install_opam.sh Line 170 in 2bcf19a
I was able to proceed seamlessly. Here's a log for specifics: https://gist.github.com/k4rtik/e23a87f573c7b6e16cac4ec1c89615cc |
Unsure if the maintainers want to wait until the availability of the CI to add (unofficial) support to the scripts. If it's not a blocker, I am happy to submit a PR. PS: I may be able to test with other versions of Coq supported in version 2021.09.0, at least for the base installs. |
@k4rtik : I would be fine to have a "not official / beta" support for Apple silicon. Regarding ocaml: it might suffice to change the OCaml version to 4.10.2. One would have to change this here (keep the cygwin version as is): platform/shell_scripts/install_opam.sh Line 170 in 2bcf19a
|
P.S.: The ocaml version chosen is the same for all versions of Coq in Coq Platform 2021.09.0. |
@k4rtik : sorry, I didn't see the second part of your post - so with the two changes it does work on Apple silicon? Can you please try "extended/x" instead of "base/b"? If this works, I would appreciate a PR. The only thing we have to check is if 4.10.2 is available on Windows, but I wouldn't see it as a blocker to have 4.10.0 on Windows and 4.10.2 elsewhere. Also I would ask you to check new versions of the Coq Platform in a timely manner (until I can get my own M1 Mac mini back to life - I bricked it in an attempt to install a fresh OS for testing ...). |
No problem and yes, it worked without any issue with base.
I will try later this week.
The page I linked to for 4.10.2 above does confirm support for Windows/Cygwin:
I can't promise this yet as I am yet to receive my own M1 Pro machine. I have been trying out M1 on a friend's machine released last year to make sure that the things I need will work. But happy to help when I can. |
I am trying the extended install. The first error I ran into is package
Full log for
I guess the source of this error might be
because on arm64 homebrew installed gmp is found at EDIT: Ah, even the opam package has the same issue: https://github.com/ocaml/opam-repository/blob/6603f2c2661a8fe202a6e1766382e48a94fb9ef5/packages/gappa/gappa.1.4.0/opam#L17 |
Found the issue, the Here's a PR: ocaml/opam-repository#19990 |
Add unofficial support for Apple Silicon, see: #168
Just adding some stats here as I try some combinations of packages on main branch after merge of #171:
Note, some of these numbers (especially the first and second) include time for downloading packages and hence may seem more than actual. My config is:
|
I was able to compile the failing config in the table above after merge of ocaml/opam-repository#20004, so I am happy to consider this issue resolved. Let me know if you need me to test any other specific config. I should have easy access to a M1 Pro machine for the foreseeable future. |
Thanks for your help with this! It would make sense to test the 8.14+beta2 config as well. Please note that the config numbers will change soon in main. I keep the issue open until release so that people more easily find it. |
Do you mean test it with some option other than full (f)? I did test it for full and base as shown in the table above. |
So I just tried installing I think I am quite satisfied. Let me know if you need me to test any other config. With extended instead of full above:
Fri Dec 3
|
Thanks for the tests - indeed this is quite fast. Just to make sure: this where builds from scratch - not just an update of an already existing switch? I am about to add a few more non Coq ocaml packages, notably a generator for prime proofs (currently in CI) and a special Z3 for Coq hammer. These might be tricky on ARM silicon. I will ping you as soon as it passed the other CI. |
P.S.: in general it would make sense to test the 'x' variant - it should take only slightly longer. |
Oh I was under the impression that full had more packages than extended. |
Yes. Sometimes these include times for downloading packages, but that will only be an overestimate then, not underestimate. |
Hope it's not too special, we had a fun time getting a new Z3 version out that works on macOS. But it helps that I got to participate in that process. |
As far as my limited understanding goes, this is just a different frontend which uses the usual Z3 shared library. |
I see. The main change we may have to do on macOS is to use the dynamic library instead. But happy to investigate when it's ready. |
P.S.: better test 4.13.2 - the latest patch release for 4.13. |
Just to be sure, I don't see an 4.13.1 currently fails as follows:
|
@MSoegtropIMC
in several package picks. EDIT: never mind, |
@k4rtik : thanks for testing! The 4.13.1 vs 4.13.2 is different if looks at the "ocaml" metapackage and the "ocaml-base-compiler" package. ocaml does have 4.13.2 but ocam-base-compiler doesn't. I can't say how relevant this is. The ppxlib down version is required by serapi - it can't live yet with a newer version. So in case of doubt I would drop serapi and keep elpi. If serapi is dropped, the restriction to ppxlib.0.15.0 can be dropped. @ejgallego : FYI. |
It might be a convenience package for testing before release as the latest on ocaml.org is also still 4.13.1 In any case, it's not installable using opam switch create:
I see at #186 (comment) that we are sticking to 4.10.2 for now. |
Tried basic pick on current
Time for the extended one next: EDIT: getting up to the system prerequisites took
EDIT2: From a clean full build:
|
@Blaisorblade : how much RAM to do you have? |
@MSoegtropIMC 64 GB |
I am now testing on a different machine (note lower CPU count and more RAM):
It certainly takes longer, but my system doesn't run out of memory anymore with 16 parallel jobs (I had other tasks such as a web browser and even a Zoom meeting running alongside these tests). |
And here's the output from my final machine (note higher CPU count and same RAM):
Clear improvement of 3 to 5 minutes with two extra cores. |
Cool! Haven't tried 8.12 but the other times seem to match my M1 Max 64 GB, which will help people save quite a bit. |
Right, I feel like it means 32GB will be sufficient for most people's needs (while 16GB was too constraining). |
Hi @MSoegtropIMC I tried installing Do you think we can close this issue now? PS: let me know if you'd like me to test any other config of the platform script options. |
Thanks for your continued test efforts! I don't think the other configurations make any difference in arm vs intel code, so I will close this issue. |
There is now a GitHub roadmap item (with no ETA) about M1 support: github/roadmap#528 |
I don't expect this to be realized any time soon - afaik there is no M1 HW which is suitable for large data centers. A web search shows that those who offer M1 servers base this on Mac Mini. For small applications (like a Coq CI) a bunch of MacMinis in a rack is fine, but I can't quite imagine that Github will do this. |
Hi
When I tried the 2021.09.0 install script for macOS on an M1 Macbook Air, I received the error that
uname -m
output of "arm64" was unrecognized.Are Apple's new SoCs supported at all?
The text was updated successfully, but these errors were encountered: