sorbet / sorbet

A fast, powerful type checker designed for Ruby
https://sorbet.org
Apache License 2.0
3.62k stars 525 forks source link

Support for Ubuntu Linux on ARM64 (aarch64) #4119

Closed jbeker closed 8 months ago

jbeker commented 3 years ago

Problem

We are starting to need to use ARM based Linux (using Ubuntu) but we can't use Sorbet since there is not a binary version of Sorbet that will run. When performing a bundle install that includes sorbet we get the following error:

Unable to find a spec satisfying sorbet-static (= 0.5.5912) in the set. 
Perhaps the lockfile is corrupted? Found sorbet-static (0.5.5912-x86_64-linux), 
sorbet-static (0.5.5912-universal-darwin-19) that did not match the current platform.

This is running on Ubuntu 20 LTS

Linux local 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:32 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Proposed solution

Add a linux aarch64 pre-built sorbet-static.

nalgenewaterbottle commented 11 months ago

I would love to help as needed too! 😄 What are the relevant roadblocks?

noizwaves commented 11 months ago

I built and released an aarch64-linux and arm64-darwin-22 version if anyone wants to take it for a test run.

Hey @tonybruess 👋 , do you have the build process you used for the arm64-darwin-22 gem build anywhere? I have a little bandwidth and would like to build some linux arm64 gems for the community, and would love to expand this to darwin too.

tonybruess commented 11 months ago

@noizwaves Unfortunately I didn't save the exact steps anywhere. The only note I left for myself is:

Change /usr/local/var/bazelcache to /Users/name/.cache/bazel in .bazelrc.local

My org just decided to remove Sorbet entirely so unfortunately I don't have any bandwidth to support further. :(

noizwaves commented 11 months ago

Oh no, that sucks @tonybruess! Thank you for all the help so far on this issue ❤️

noizwaves commented 11 months ago

I have a little bandwidth and would like to build some linux arm64 gems for the community, and would love to expand this to darwin too.

Ok folks, I was able to get some time this weekend and have set up https://github.com/sorbet-multiarch. It builds the linux/arm64 Sorbet gem on CircleCI and publishes it to Gemfury. It automatically runs nightly, and should provide up to date linux/arm64 gems moving forward.

Currently version 0.5.11150 and 0.5.10993 are available. If you need another prior version, just create an issue over here and I'll build it for you.

nalgenewaterbottle commented 10 months ago

I'm curious if this is going to get official traction. Even with community solutions published and showing a near complete path for implementation, it just doesn't seem like there's room for it. Should we expect to use @noizwaves's implementation ? Which is great, and thank you for putting it forward.

Dandush03 commented 9 months ago

I have a little bandwidth and would like to build some linux arm64 gems for the community, and would love to expand this to darwin too.

Ok folks, I was able to get some time this weekend and have set up https://github.com/sorbet-multiarch. It builds the linux/arm64 Sorbet gem on CircleCI and publishes it to Gemfury. It automatically runs nightly, and should provide up to date linux/arm64 gems moving forward.

Currently version 0.5.11150 and 0.5.10993 are available. If you need another prior version, just create an issue over here and I'll build it for you.

GREAT WORK!

X-sam commented 8 months ago

does the announcement of new m1 runners for open source projects make this an easier ask?

nalgenewaterbottle commented 8 months ago

I don't think so @X-sam - I think the solutions provided above (from @noizwaves) actually accomplish the asks. It would seem it's more so on the time @jez / @froydnj and team have to maintain and implement it. Something that doesn't seem to be prioritized. But who knows! Maybe that was really the blocker.