-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
extend/os/mac/keg_relocate: fix relocation of duplicate RPATH
s
#11392
Conversation
One potential risk here is that this will change I'll keep an eye on problems arising from this. If there are any, one way to fix it is to split |
Homebrew/homebrew-core#77623 revealed two bugs. One in `ruby-macho`, which turns out to be unable to delete duplicated `RPATH`s. This was fixed with `ruby-macho` 2.5.1. The second, which this commit fixes, is in our handling of duplicate `RPATH`s. Since we iterate over each `RPATH`, attempting to relocate the first duplicate fails since it will no longer exist after having relocated the original.
Review period will end on 2021-05-18 at 00:00:00 UTC. |
Review period skipped due to |
Since `delete_rpath` differs from the behaviour of `otool` in that duplicate rpaths are deleted in a single invocation, we should be consistent with that and not report duplicates even when they exist. Otherwise, this can break workflows that iterate through a macho-o file's rpaths and does something with each of them. I currently have a workaround for this in brew [1], but I realised this should actually probably be fixed here. [1] Homebrew/brew#11392
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Homebrew/homebrew-core#77263 revealed two bugs. One in
ruby-macho
,which turns out to be unable to delete duplicated
RPATH
s. This wasfixed with
ruby-macho
2.5.1.The second, which this PR fixes, is in our handling of duplicate
RPATH
s. Since we iterate over eachRPATH
, attempting to relocate thefirst duplicate fails since it will no longer exist after having
relocated the original.
Unblocks Homebrew/homebrew-core#77263.