-
Notifications
You must be signed in to change notification settings - Fork 185
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
Apple Silicon support #2181
Comments
Blocked by oracle/graal#2666. I'm afraid this issue needs some expert attention by the people who manage things like JVMCI and JVM builds - this is really specialised stuff needing the Oracle build farm I think and I'm not able to do it myself. |
Regarding builds on darwin-aarch64:
Until that's done I guess using Rosetta 2 is the best solution for running TruffleRuby on Apple's M1. |
@chrisseaton @eregon thanks both for the answers In fact, it's already possible to build for Mac ARMs using Github Actions on the recent Mac x86_64 machines since Xcode 12.2. Already this project (https://github.com/keeweb/keeweb/releases) builds own ARM Mac builds using GA. On GA there aren't available any Apple Silicon machines for testing builds on them though. You build own releases and test them on own bare metal machines anyway. |
I think we'd want to have automated testing in CI before making darwin-aarch64 builds. |
@eregon After almost a month spend with M1 I don't think that is a good way. It requires to use seperated Homebrew for x86_64. I already switch to Homebrew for ARM only since over 70 % of bottles are already ARM ready. Homebrew doesn't support something like universal builds. That complicates many things while compiling 3rd dependencies. Keeping two separated Homebrew is not also easy. Just take a look at |
Thanks for the update. Why does it require a separate Homebrew? To install libssl? I've seen many issues from M1 users e.g. on the FFI gem issues, it seems there is confusion, but probably some of that should be handled better by Homebrew or Apple. |
@eregon Yes, the main problem is I understand your points. But I guess this is not only about Apple M1, I feel it's more about benefiting other ARM based CPUs generally. The changes for Apple M1 bring better SW compability e.g. for Rasberry computer. TruffleRuby/GraalVM cannot be run e.g. on Rasberry Pi yet. |
@eregon Hello, is there any internal news if some basic support of Apple ARM's will be landed soon into GraalVM/Sulong? |
@deepj See oracle/graal#2666 (comment), nothing can happen until upstream JDK supports darwin-arm64. |
FWIW, linux-aarch64 is another story, for that case there are already JDK11 builds for it, and TruffleRuby can already be built there (but Sulong does not work yet on linux-aarch64). |
@eregon it seems Apple ARM support in OpenJDK (openjdk/jdk#2200) will be landed soon. I guess there will be some work on Graal side. Is any chance to offer some experimental builds of TruffleRuby with Apple ARM support? I want to really avoid any compilation of Graal/TruffleRuby on my system. Of course, you have other priorities. I'm just asking :) |
I hope to get an M1 laptop when Apple take away my DTK, so may go back to working on this. |
Once there are labsjdk JVMCI builds (oracle/graal#2666), we can look at this and share an experimental build. |
Support of Apple ARM's has been merged into OpenJDK (just sayin') |
@eregon Hm, is there any internal progress in Graal to support Apple ARM since OpenJDK has it already? |
We're still blocked by oracle/graal#2666. Might be best to ask there until that issue is fixed. |
As it says above, we're still blocked by oracle/graal#2666. That's the blocker. That's where you need to ask for progress. We really appreciate your enthusiasm, but we can't do anything ourselves. |
To build and run using Rosetta on an M1 machine:
|
Thanks, @chrisseaton. Those steps were very helpful. To simplify the correct Homebrew installation loading, you can use if [ (uname -m) = "arm64" ]
eval (/opt/homebrew/bin/brew shellenv)
else
eval (/usr/local/homebrew/bin/brew shellenv)
end That implies that you installed Homebrew for M1 first. If you did it the other way around, just swap the branches (or the condition). That's for the fish shell. The same basic idea should work for your shell of choice. |
if [[ $CPUTYPE == arm64 ]]
then
eval "$(/opt/homebrew/bin/brew shellenv)"
else
eval "$(/usr/local/homebrew/bin/brew shellenv)"
fi |
Not having to invoke another process would be preferable, but that |
@nirvdrum This shouldn't be that big of a problem since ZSH is the default shell for MacOS -- although to make it more portable, spawning a uname instance would be better. It's pretty cheap and won't affect much. |
@Yush08 Thanks. I don't use ZSH though, thus my note. |
There are dev builds of GraalVM supporting Apple Silicon. https://github.com/graalvm/graalvm-ce-dev-builds/releases/tag/22.1.0-dev-20220321_2332 Can we see testing builds of TruffleRuby supporting Apple Silicon in near future? :) |
Yes, it's being worked on by @lewurm. |
Great work @chrisseaton and the others! I hope we can try nightly builds very soon. I can't wait to test TruffleRuby after so long time :) |
Thank you! @eregon Is there any public nightly build is available? |
We should be able to have GraalVM dev builds at https://github.com/graalvm/graalvm-ce-dev-builds, but those lag a few days up to 1-2 weeks behind due to using the truffleruby import in GraalVM. For the standalone dev builds (https://github.com/ruby/truffleruby-dev-builder), I don't see any way currently as GitHub-hosted runners are not available darwin-aarch64 (neither linux-aarch64), all of https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources is amd64 only. |
I successfully installed a native build from https://github.com/graalvm/graalvm-ce-dev-builds on my M1 mac :)
|
Darwin-aarch64 dev builds are now available via
with rbenv/ruby-build#1980. Should probably add those builds to RVM too at some point. |
I've just received Macbook Air with M1 as a replacement for my half-broken old Macbook Pro with Intel i5 what became very slow thanks to the bazillion security fixes for the Intel chip.
I tried to run TruffleRuby (
2.1.0.0-dev
) on the new Macbook and so far, so good. It's running under Rosetta 2 very well. I haven't noticed any issues yet.So my question is, when we can expect TruffleRuby for Apple Sillicon builds? 🤓
The text was updated successfully, but these errors were encountered: