-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
binutils: symlink ld.so.conf #235571
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
binutils: symlink ld.so.conf #235571
Conversation
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.
I agree that we can handle this in cc shim to cover more scenarios, though this change here looks OK too.
|
cc @Homebrew/core if anyone else is aware of any problematic corner cases. Otherwise will merge sometime today. I was looking into what happens when user does Outside of Homebrew, trying to use brew homebrew-core/Formula/g/glibc.rb Lines 247 to 248 in e3120d2
|
|
It's unfortunate the I'm fine with the approach in general but do have a slight concern that it's sensitive to install order. e.g. if |
I was considering a different alternative to add a skip_clean symlink inside bottle. That should allow fallback to |
|
Happy with that if it works! |
59cb4f7 to
b4e93f0
Compare
|
Caution Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch. |
Fixes https://github.com/orgs/Homebrew/discussions/5421. No revision bump as very small number of users impacted. Those that need fix can
brew postinstall binutilsorbrew reinstall binutils.An alternative fix is adding
-rpath-linkvia cc shim, i.e. change https://github.com/Homebrew/brew/blob/main/Library/Homebrew/shims/super/cc#L374maybe to
Though this does apply it when
glibcis installed but not really needed. Would be better to constrain based on whether brewglibcis in dependency tree.For analysis of issue, looking at ld man page1, the shared libraries' libraries seem to be resolved in order of
-rpath-link-rpathexport LD_RUN_PATH=...(skip) - only if (1) and (2) are not used which is never in brewexport LD_LIBRARY_PATH=...(skip) - usually not used in brewDT_RUNPATHorDT_RPATH- these don't includeglibcBinutils does prioritize
<prefix>/etc/ld.so.confover/etc/ld.so.confat https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=ld/ldelf.c;h=f4f27fc3873440398ff85a403e8b98a834e5697c;hb=HEAD#l946Footnotes
https://man.archlinux.org/man/ld.1.en#rpath ↩