Skip to content

fix_dynamic_linkage: Check HOMEBREW_RELOCATE_METAVARS#5894

Merged
sjackman merged 1 commit intoHomebrew:masterfrom
sjackman:macos-rpath
Mar 19, 2019
Merged

fix_dynamic_linkage: Check HOMEBREW_RELOCATE_METAVARS#5894
sjackman merged 1 commit intoHomebrew:masterfrom
sjackman:macos-rpath

Conversation

@sjackman
Copy link
Copy Markdown
Contributor

Only remove RPATH when HOMEBREW_RELOCATE_METAVARS is set.

See PR #5413

@woodruffw
Copy link
Copy Markdown
Member

I think the problematic line is this one:

https://github.com/Homebrew/brew/blob/f67fad1e6e4f10d1c02cf85d3069c283648564b9/Library/Homebrew/extend/os/mac/keg_relocate.rb#L123

Since we're no longer filtering @rpath-prefixed install names, they end up getting passed through fixed_name and falling through to the bad_name case. We should either revert that regexp back to /^@(loader_|executable_|r)path/ or add an additional environment check there like:

dylibs.reject! { |fn| fn =~ /^@rpath/ } unless ENV["HOMEBREW_RELOCATE_METAVARS"]

@MikeMcQuaid
Copy link
Copy Markdown
Member

We should either revert that regexp back to /^@(loader_|executable_|r)path/ or add an additional environment check there like:

dylibs.reject! { |fn| fn =~ /^@rpath/ } unless ENV["HOMEBREW_RELOCATE_METAVARS"]

👍

@sjackman
Copy link
Copy Markdown
Contributor Author

I've added…

dylibs.reject! { |fn| fn =~ /^@rpath/ } unless ENV["HOMEBREW_RELOCATE_METAVARS"]

Only remove RPATH when HOMEBREW_RELOCATE_METAVARS is set.

See PR Homebrew#5413
@sjackman sjackman merged commit 15495f0 into Homebrew:master Mar 19, 2019
@sjackman sjackman deleted the macos-rpath branch March 19, 2019 16:25
@lock lock bot added the outdated PR was locked due to age label Apr 20, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants