-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Bad CPU type in helix editor executable after installing from brew cask on M1 Mac #1997
Comments
The tap definition is over here: https://github.com/helix-editor/homebrew-helix/blob/6afb869f03eaa59a3bdeadbd5acd114a2ecfe575/Formula/helix.rb I see a comment that makes it seem like it's expected that the x86_64 binary should work on arm64 but I'm not sure why that is. Maybe the author meant on rosetta2? |
Thanks, @the-mikedavis that's helpful. That makes sense; however, the important part of the ux that's not getting triggered here is the dialog box that asks the user whether they want to install and use rosetta.
There's some good detail here on SO. None of that behavior happened here and while it's good to know the underlying details, I'm not sure of the status of the rosetta dialog box trigger with respect to brew? |
I'm not very knowledgeable about how this works in brew and how brew usually treats rosetta and the x86_64 vs. arm64 divide. If anyone knows how to improve the formula, a PR would be most welcome! |
Another rust command line application that is supported under In case it helps:
The error is being caused (as mentioned above) by installing a Intel x86 version of helix editor (ie Rust is able to compile applications that support both Apple computers using Intel x86 and Apple M1 (aarch64) binaries - with Sorry I can help further, but I don't maintain any Homebrew taps, and I don't develop with Rust to help with building a Should a user want to install Rosetta 2 just to use the non native version of |
I'm curious if when you install W.r.t. providing a aarch64 pre-built image: it would be great if we could but there isn't currently a github actions runner that would support it. We could try cross-compiling from an x86_64 macos runner but the cross-compiler for x86_64 linux to arm64 linux was horribly old and couldn't compile some of the tree-sitter parsers. |
Hi @the-mikedavis Below are a few outputs in case they are of any further assistance:
|
In that case, we could probably fix this by getting the formula set up in homebrew core (see here). Iirc there was some trouble getting the tests to work which was preventing it from being merged for the 0.6.0 release. |
That would be good if it were possible to use Homebrew core to solve the issue 👍 . Sorry - I noticed I failed to answer your second question regarding building for Apple Silicon computers on Github! This is unfortunately a common issue, and until Microsoft (owners of GitHub) provide the anticipated supporting computers to build on, cross compiling on macOS is the only way to fix it I think (ie without using machines outside of the GitHub build environments anyway!). There is a an open issue here with more information: actions/runner-images#2187 I did notice that the Rust project cross compile macOS builds from the GitHub using the Intel x86 macOS systems to create Apple M1 Also see this issue here: rust-lang/rustup#2413 I think macOS cross compile works, as a Apple Intel x86 machines with the XCode compiler and tools installed can be used to build an Apple M1 native |
Closing this now since we're in homebrew core plus we have cross-compiled arm darwin builds for releases (#3137) |
Summary
Here's the CLI experience and output of the arch command following:
Note that arch gives arm64 but brew has installed x86_64.
I'd also recommend making the arm vs x86 distinction clear with respect to platform builds for macos. Right now, it's not clear whether M1 is supported in any way other than running linux.
Reproduction Steps
I tried this:
hx
I expected this to happen:
helix editor loaded in terminal.
Instead, this happened:
Helix log
No response
Platform
macos
Terminal Emulator
Apple Version 2.12.5 (444)
Helix Version
helix 22.03
The text was updated successfully, but these errors were encountered: