-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Apalache build fails on Apple silicon #751
Comments
I just relabelled it as an enhancement, as we could not foresee Apple introducing one more CPU architecture. Just curious, does it work in docker on M1? |
Just checked: as a workaround, running Apalache via Docker on Apple M1 works fine:) As desribed here One thing that is nice with docker is how easy it is to experiment with different Apalache versions: you only need to change the version you want to run; it will be downloaded automatically:) Also, there might be some issues with running Docker images for Intel on Apple M1. E.g., as I have a spec with old-style type annotations, I have tried Apalache versions before Snowcat; version |
Sorry, I was too fast to celebrate. Some phases work fine; but it seems that as soon as it comes to running Z3, it segfaults. |
Here is a more precise info when running different Docker images: v.0.9.0
v.0.8.3 v.0.8.2, v.0.8.0 Sometimes I get again segfaults:
So in general Apalache with Docker on M1 doesn't seem to work reliably. |
I have checked with Apalache docker image for 0.8.2 on Linux -- it does behave non-deterministically. |
From this comment, it sounds like there may still be some issues with Z3 on M1, though they might have been fixed in the z3-turnkey project (which Apalache is using, right?) already: Z3Prover/z3#4979 (comment) |
I tentatively have found a workaround, although I will give it a few days to say for sure.
I'll include details on how I installed Apalache as well, since that may have affected things.
|
I can confirm that the trick with using x86_64 Java, described above, works on my M1 as well. Many thanks, @jtremback ! |
Given that Apalache comes with Turnkey Z3, have you considered bundling a suitable JVM? Since performance isn't critical for the Scala/Java layer of Apalache, you could even consider creating a native image. That way, users wouldn't have to fiddle with an x86-64 VM on Silicon and could use a native JVM for TLC. For those familiar with the JVM ecosystem (I don't expect many TLA+ users to be), jenv makes it easy to switch JVMs when working with Apalache and TLC. Haven't checked if it helps in this case. |
Shall we close this issue now? @andrey-kuprianov can you confirm that you can Apalache on M1? |
I've requested support for |
I like the idea of creating a native image. If that's feasible for us, I'd be in favor of targeting it. |
Apalache (and Z3) now runs on native |
This is great! I'm curious, do you observe any performance benefits? |
I believe our benchmarks currently run on x86 only, and I haven't investigated further. CC @shonfeder |
Description
Apalache fails to build on Apple ARM due to missing support from Z3 side:
System information
The text was updated successfully, but these errors were encountered: