-
-
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
keg_relocate (linux): prepend gcc/lib/current
to RPATH
when needed
#13631
Conversation
This should help keep bottles that require GCC working when Homebrew/homebrew-core#106755 is merged. This only works on freshly-poured bottles. Previously installed bottles will still break on systems with a host GCC older than GCC 11.
Review period will end on 2022-08-03 at 03:09:28 UTC. |
It's also worth noting that this will likely fix most, if not all, Linux-only GCC dependents in CI (as bottles are always freshly poured). |
Also add comment explaining what this line does, along with a TODO suggesting a replacement once we've shipped the GCC PR.
It's worth noting that this replaces linkage to any Homebrew GCC, even if they're not the latest, with linkage to the newest Homebrew GCC. This is safe to do only if GCC libraries are always backwards-compatible. My understanding is that they should be. At the very least, |
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.
Fine to 🚢 as-is but one question.
GCC libraries are properly versioned, so any non-backward compatible change will mean the library version will have changed. So this should not be a problem. |
Review period skipped due to |
Ok, I think I'm happy to merge this. Also, with this change in hand, we can then use a trick similar to what we did for the Linuxbrew migration to migrate installed Linux bottles to GCC 12: brew/Library/Homebrew/cmd/update-report.rb Lines 162 to 178 in 4baff3e
I think this should result in an almost pain-free migration experience for most Linux users. (Aside from the bottles that have already been lost due to changes independent from bottle removal.) Thoughts? We'll need to get the timing of tagged releases for |
Seems like a great idea 👍🏻 |
Ok, I guess we'll want those Linux bottles back then. Homebrew/homebrew-core#107148 |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?This should help keep bottles that require GCC working when
Homebrew/homebrew-core#106755 is merged.
This only works on freshly-poured bottles. Previously installed bottles
will still break on systems with a host GCC older than GCC 11.
I've marked this as draft since this isn't ready to merge yet. For one thing, this line probably needs explanation in a comment. But I've opened this to suggest a potential way to minimise the pain of breaking all these Linux bottles for the GCC 12 migration.
As noted above, this fix only applies for bottles poured after
brew
includes this change. If desired, we could add a check tobrew doctor
that recommends abrew install foo
iffoo
would benefit from having theirRPATH
fixed up by this change.