-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Discussion: longterm Homebrew prefix on Apple Silicon Macs #9177
Comments
My preference is |
I'd say
I think we can still accomplish this by adding |
My preference is Early feedback from people outside of Homebrew has been largely positive. I’m looking forward to getting one of the most often-cited pain points solved. |
Sorry fat fingers |
Any chance how to get launchd to pick this up, too, so GUI apps can inherit it? That would keep brewed commands (and scripts that use them) working when launched from Xcode or a text editor. |
I am unsure about this. Some software might never compile under ARM. So we will always need 2 prefixes, one for ARM, one for Rosetta. |
This comment has been minimized.
This comment has been minimized.
Can you tell me more, from a Linuxbrew perspective, how well this works for users? Do users get confused by libraries and headers not being found by compilers by default?
Rosetta isn't staying around forever. If it's like PowerPC support, we'll only have support for running Intel binaries on ARM for another few years. |
Reasoning: we've talked a bunch in the past about whether we should move the default prefix away from
The main reason I can see against is that e.g. RubyGems won't automatically find things in
@cmarquardt Thanks! That's something we considered but it feels inelegant to me given the existing locations. I've locked this thread not because of your (insightful) comment but just generally to keep this discussion limited to Homebrew maintainers.
Agreed @iMichka.
In my experience it's less of an issue with |
Yep - it's the library lookup path and the header lookup path from the compiler, not the executable
As I mentioned earlier, Rosetta is only staying around for awhile. We should plan for it for the next 2-3 years but we shouldn't have plans that include its existence past that. 😄 |
Remember what happened with windows XP or Internet Explorer 6 ? 😄 I think it will stay for a long time as a lot of software will never get ported. |
A lot of PowerPC software never got ported and Rosetta 1 went away anyway. Same deal with 32-bit software support. Apple are pretty willing to yank away the rug after having given a few years' advance warning. I don't see Rosetta 2 as being any different from previous cases! |
Making a comment because locking a conversation also blocks reactions (why?). I fully agree with @mistydemeo. Apple will say bye-bye to Intel as soon as they can and won’t shed a single tear for software that no longer compiles. Tim might’ve said they would be supporting Intel Macs “for years to come”, but apparently that applied to OS support on older Macs, not making new machines (not finding the source, but Greg Joswiak mentioned it in a recent interview). As for HB’s primary installation, no opposition to |
I'm fine with what we came up then:
|
I think there is a general agreement on @Homebrew/tsc, please vote by ticking your name below and change the prefix to your preferred option.
|
I think |
Looks like we have a consensus on Based on this: Mike's already done the initial work towards the I'll leave this issue open for the time being so we can document the followup steps. We can close it once we have PRs for action items. Here's a proposed set of items:
|
Users would need to add |
Hmm, would |
Running commands via |
Those are both good suggestions for building packages in the homebrew environment, which is what my initial comment mentioned, but upon thinking further, there's also the matter of runtime when you would also want one quibble I have with |
That's the main downside of leaving ( |
We should hold off on this until we are planning on providing official "support". This means having the majority of packages bottled and building.
I've discussed that in #9287 (review) but it's worth noting also my comments in #9126. TL;DR: what we care about is installing things in the "wrong" prefix and not running e.g.
|
This is already a common problem with keg-only software (e.g. OpenSSL most notably) with pretty simple solutions at this point. As long as Homebrew handles our own usage and provides the necessary paths with helpers like |
I have needed to set
Great! That's just what I was looking for.
If you're referring to system integrity protection, yeah that makes it really confusing. My most recent experience involved wondering why |
In Catalina and later, I think it's almost unusable (disabled as a security risk). My point was: if something needs to set |
Heads up that the bottle code might need a small tweak if you introduce a new prefix: see #9310 where I stumbled over an issue with bottles having different prefixes. |
Feature suggestion
We need to determine which prefix we'll use as the default prefix for Apple Silicon-based Macs on a permanent basis.
A detailed description of the proposed feature
In #9117, we switched to a new prefix of
/opt/homebrew
for installations on Apple Silicon. This was written and shipped with heroic speed to help prevent strange issues with bleeding edge users on the first consumer Apple Silicon Macs. I'd like to make sure we have a conversation about our longterm plans here before we commit to something. This is an aspect with potential consequences for users, so it's important we've fully weighed the pros and cons before we come to a final decision.Today, Homebrew's prefix is
/usr/local
, with the repository in/usr/local/Homebrew
. In the initial phase of Apple Silicon migration, in order to avoid using the same prefix for both Intel and ARM binaries, we have two prefixes instead:/usr/local
for Intel, and/opt/homebrew
for Apple Silicon. Eventually, the need for/usr/local
as a Rosetta installation of Homebrew will go away and Apple Silicon users will have only one installation.Way back in the mists of history,
/usr/local
was chosen for a few reasons:/usr/local/bin
is in the defaultPATH
, so most things a user will use will end up seeing Homebrew-installed tools without configuration./usr/local/include
,/usr/local/lib
and/usr/local/lib/pkgconfig
by default, so non-Homebrew software will find Homebrew-installed libraries without configuration.These reasons were all in contrast to MacPorts, which installed its software in
/opt/local
./usr/local
was chosen in response to the issues users were experiencing at the time. We have also received some feedback from users who would prefer a different default prefix, namely:/usr/local
, for the same reason Homebrew does, and so there are sometimes conflicts between them.Consequently, the question here is: once Apple Silicon Homebrew becomes the primary installation on Apple Silicon Macs, which should be prefix be?
/usr/local
/opt/homebrew
We have a bit of time before we start creating our first bottles, so let's make sure we've discussed this in detail before then.
The motivation for the feature
Ensuring the best user experience.
How the feature would be relevant to at least 90% of Homebrew users
Eventually, close to 100% of Homebrew users will be using Apple Silicon.
What alternatives to the feature have been considered
See the discussion above.
The text was updated successfully, but these errors were encountered: