-
-
Notifications
You must be signed in to change notification settings - Fork 10.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
Homebrew is producing bottles with problematic binstubs #11558
Comments
Needing |
That's what we had before that patch went in! The goal of that PR was to remove fully-qualified paths to make bottles prefix-independent. Another option I guess would be to write a placeholder path specifically when building as a bottle, and have the bottle pouring process rewrite that placeholder path to the real one. Basically what we do with |
Isn't that what happens already? I'm pretty sure we replace all instances of This does create some platform-dependent deviations between bottles, but not because of our binstubs. Usually, this is because there are some textfiles that contain I wonder if we should just replace Found my comment! Homebrew/homebrew-core#75943 (comment) |
We should stop replacing |
We could do that, but I think we ought still replace
or perhaps a somewhat more restrictive glob/regex that could potentially depend on the contents of the relevant kegs. |
I left a comment in slack but I figure I'll cross-post here: When determining relocatability in binary files (on the default prefix), we already only check |
Agreed 👍🏻
yes |
Since this came up again in a related PR: I'm still not sure why we need #11537, as keg relocation already handles env scripts. For example, from a bottled env script (cf. Homebrew/homebrew-core#79575), we have:
so I don't think platform-dependent prefixes are an impediment to Have I just misunderstood something here? |
I was not aware that #11537 broke things this badly. Oops 💀 sorry for the inconvenience.
Yeah. I just took a peek in some bottles. I think now that #11537 was not needed after all. At some point I ran into a weird case where I noticed in bottling up everything that something was not getting an |
For future reference: There are some formulae where On the other hand, there are also formulae where this relocation is desirable, and we should be substituting |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
As of #11537, we're now producing binstubs which contain
brew --prefix
instead of the absolute path. This has unexpectedly introduced problems when using one of those bottles as a dependency when building formulae from source. Given the following:install
method from havingbrew
in itsPATH
,Formulae can no longer safely call the binaries of their own dependencies during their build if those binaries are Homebrew-produced binstubs. This happened in the wild with the homebrew-sass tap, whose
dart
dependency uses Homebrew-produced binstubs. It lead to the following error when calling any of them:I think the goal of ensuring we're not encoding Homebrew paths in scripts is good, but it's not safe to put calls to
brew
in them. Let's work out another prefix-independent way we can safely write these calls.While we work to figure out an alternate solution, I'd like to back this change out ASAP. Otherwise, we're going to start shipping bottles that will cause issues when we depend on them in building bottles from other packages.
cc @alebcay
The text was updated successfully, but these errors were encountered: