Skip to content

Add support for @loader_path and @executable_path in macOS dylib relinking#2358

Open
wolfv wants to merge 2 commits intomainfrom
claude/fix-ruby-overlinking-warnings-e2uI9
Open

Add support for @loader_path and @executable_path in macOS dylib relinking#2358
wolfv wants to merge 2 commits intomainfrom
claude/fix-ruby-overlinking-warnings-e2uI9

Conversation

@wolfv
Copy link
Member

@wolfv wolfv commented Mar 20, 2026

This PR extends the macOS dylib relinking logic to properly resolve @loader_path and @executable_path references, which are common in macOS binaries for specifying library locations relative to the loading binary or executable.

claude added 2 commits March 19, 2026 17:05
…library refs

The resolve_libraries() method only handled @rpath/ and absolute paths
when resolving library references. Libraries referenced via
@executable_path (common in Ruby .bundle files) or @loader_path were
left unresolved, causing the overlinking check to emit false warnings.

Now @loader_path is resolved relative to the binary's own directory
(same as in resolve_rpath), and @executable_path is resolved by trying
bin/ and the prefix root as candidate executable directories.

https://claude.ai/code/session_01QNpNnemWFpDFBtgYmU3ZNV
Instead of trying both <prefix>/bin and <prefix>/ as candidate
executable directories, only use <prefix>/bin since that is the
conventional location for executables in conda prefixes.

https://claude.ai/code/session_01QNpNnemWFpDFBtgYmU3ZNV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants