-
Notifications
You must be signed in to change notification settings - Fork 53
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
Make images work in Rosetta 2 on macOS ARM #617
Comments
IDK of any workarounds, apart from turning off Rosetta: docker/roadmap#384 Emulating Fedora on arm64 is also very slow, in general, also on Linux. Much slower than Ubuntu. I suspect that this is because Fedora is compiled for more modern CPUIs, that are harder to emulate. E.g. an R build that takes about 10 minutes natively does not finish in 6 hours on emulated x86_64 Fedora. So if you turn off Rosetta, and qemu happens to work (which might not, qemu has a different set of similar issues), prepare that it'll be very-very slow. We could also try to build arm64 images, the problem with that is that they sometimes does not reproduce the problems on CRAN. |
Thanks. Colima is https://github.com/abiosoft/colima, an OSS alternative to Docker Desktop. I haven't tried with Docker Desktop yet. Should we try with arm64 images for one platform, and evaluate? I see how this might give different results for valgrind and asan, but I can't even get past the |
That should not matter, they both use qemu or Rosetta. This issue is with Rosetta.
We can't build arm64 Fedora images on GHA, but you can try to build the R builds and images locally. Some will build OOTB. Other |
Can't we build arm64 on the macOS runners? Agree that test-driving locally is better. I can take a stab if the itch starts hurting badly. |
AFAICT they cannot run Docker. |
Frustrating. What if we built additional Ubuntu variants for all images to support this use case? What differences do you expect compared to Fedora? Just want to see if that makes any sense. |
That's obviously extra work, newer versions of gcc are easily available on Fedora, but not on Ubuntu, and the custom BLAS/LAPACK issues typically do not reproduce on Ubuntu (or on arm64 for that matter). These are the reasons I started using Fedora, in addition to Ubuntu. |
Desperate call:
https://docs.orbstack.dev/settings#use-rosetta-to-run-intel-code |
Works for me: running |
Trying gcc14 now. |
Not even an error message 😭 ... |
orbstack/orbstack#1252 . Let's see. Thank you for your patient explanations! |
Yes, orbstack probably uses qemu instead of Rosetta. You can probably turn off Rosetta for colima as well, if you prefer that: abiosoft/colima#555 |
GH is planning to roll out free arm64 Linux runners for open source repos, if I understand correctly, then we'll be able to build arm64 images much easier. |
Okay. I think I understand better now.
I tried Arch Linux today. AFAIR, it is one of the distros that aims at supporting bleeding-edge components. The
I managed to install and start R, all on x86_64 with Rosetta 2:
Could we achieve this goal in ArchLinux (or in another distro)? Full command line (I have
|
That is not so simple, for a couple of reasons. First, we don't have system dependency support for Arch Linux. Ideally we also create binary packages at https://github.com/r-hub/repos, otherwise it takes forever to compile all dependencies from source. Arch Linux has a rolling release model, which means that the binary R packages would need to be rebuilt frequently. Also, I suspect that some of the CRAN errors only happen on AVX (etc.) builds of BLAS/LAPACK. This is why we cannot reproduce them on Ubuntu or on arm64, only on x86_64 Fedora. |
Let's wait for the arm64 builders, then. Are you planning to add binary packages for arm64? |
IDK, maybe. But again, arm64 containers will not reproduce some of the CRAN issues, so I am not sure if they'd be useful. |
I hear that. There are two kinds of gcc14/clang19 issues:
I'll leave the issue open for now. |
FWIW qemu is not a joyride, either:
|
I'm getting
when trying to run
R CMD INSTALL .
on macOS with Colima under Rosetta emulation. You mentioned earlier that this may be expected, but do you actually see a way to fix this? Or perhaps to work around? Happy to share my setup instructions -- if it works there, it's likely to work everywhere (in the words of Frank Sinatra). Thanks!The text was updated successfully, but these errors were encountered: