Skip to content
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 executable running macOS on an m1 #528

Closed
mvllow opened this issue Aug 8, 2022 · 2 comments · Fixed by #529
Closed

Bad CPU type in executable running macOS on an m1 #528

mvllow opened this issue Aug 8, 2022 · 2 comments · Fixed by #529

Comments

@mvllow
Copy link
Contributor

mvllow commented Aug 8, 2022

I am having trouble executing StyLua from the pre-built releases. I tried both stylua-macos-aarch64 and stylua-macos. I assumed aarch64 was for Apple Silicon but maybe I'm misunderstanding.

$ ./stylua example.lua

exec: Failed to execute process: Bad CPU type in executable.

My usual method of installing StyLua is brew install stylua which works as expected, however there are some tools that automatically manage the installation of formatters and they tend to use the release binaries.

Appreciate any help :)

@JohnnyMorganz
Copy link
Owner

Looks like the aarch64 binary isn't actually building for aarch64...

cargo-target: x86_64-apple-darwin
Whoops.

Need to fix that. I'm assuming this error occurs if you don't have Rosetta?

@mvllow
Copy link
Contributor Author

mvllow commented Aug 8, 2022

That's probably it :) Correct about Rosetta, fresh installed macOS yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants