-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
install.sh: check processor. #347
Conversation
Thoughts on allowing it if |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Providing basic instructions for enabling Rosetta 2 would help, I think.
if [[ "$UNAME_MACHINE" == "arm64" ]]; then | ||
abort "$(cat <<EOABORT | ||
Homebrew is not (yet) supported on ARM processors! | ||
Rerun the Homebrew installer under Rosetta 2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rerun the Homebrew installer under Rosetta 2. | |
To rerun the Homebrew installer under Rosetta 2, | |
select your Terminal app in Finder and click Get Info. | |
Make sure that "Open using Rosetta" is checked. | |
Then quit and re-open your Terminal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claui Does this force your Terminal to always open in Rosetta? I'm wondering if there are any nicer ways than this as it seems like this may not be what people want, I dunno. If not: no worries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it forces the Terminal to always open in Rosetta.
It may not always be what people want but I’d still prefer to recommend it than recommending to prepend arch -x86_64
.
The latter may be more convenient but:
- it’s extremely easy to forget during daily use, and
- imho it’s also kind of awkward to describe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if Rosetta is not yet installed (as it sounds like it isn't/won't be by default)?
It may not always be what people want but I’d still prefer to recommend it than recommending to prepend
arch -x86_64
.
Doing this and then having something like a rosettabrew
alias that runs arch -x86_64 brew
feels like it'd be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if Rosetta is not yet installed
Maybe add a link that tells people how to install Rosetta upfront. Like:
If Rosetta is not installed, please follow the instructions at <url>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving as-is for now but will happily 👀 any PR to improve the text. Thanks for the help and testing @claui ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving as-is for now but will happily 👀 any PR to improve the text.
@MikeMcQuaid Fyi, Homebrew/brew#9126 includes a few suggestions. I plan to apply those here once they’re merged there.
Refuse to install unless on Intel processors. If we're on macOS ARM then output a custom message letting people know they can use Rosetta.
Co-authored-by: Claudia Pellegrino <claui@users.noreply.github.com>
The results are in. 🎉 Running the installer on native Apple Silicon:
Running the installer on Apple Silicon under Rosetta: Command output==> You are using macOS 11.0. ==> We do not provide support for this pre-release version. This installation may not succeed. After installation, you will encounter build failures with some formulae. Please create pull requests instead of asking for help on Homebrew\'s GitHub, Discourse, Twitter or IRC. You are responsible for resolving any issues you experience while you are running this pre-release version.
==> Homebrew has enabled anonymous aggregate formulae and cask analytics. ==> Homebrew is run entirely by unpaid volunteers. Please consider donating: ==> Next steps:
|
Applying Homebrew/brew#9102:
Unsetting
Installing a formula from bottle:
Testing:
Works just fine. |
@@ -317,6 +317,19 @@ EOABORT | |||
)" | |||
fi | |||
|
|||
UNAME_MACHINE="$(uname -m)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we exclude the whole block when HOMEBREW_ON_LINUX is 1? Just to make sure this Mac-specific code is not run there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iMichka sorry the page autorefresh didn't show this until after I merged 😬. This should be there still on ARM on Linux because it's an unsupported configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is, but it will tell people to use Rosetta on ARM linux I guess?
Refuse to install unless on Intel processors. If we're on macOS ARM then output a custom message letting people know they can use Rosetta.
This needs to be merged and in a tagged release before Big Sur is released so please prioritise testing and reviewing this ASAP CC @claui @Bo98 @fxcoudert @mistydemeo