Skip to content

fix: preserve executable-relative macOS rpaths - #2718

Merged
wolfv merged 2 commits into
prefix-dev:mainfrom
wolfv:fix-macos-executable-rpath
Aug 5, 2026
Merged

fix: preserve executable-relative macOS rpaths#2718
wolfv merged 2 commits into
prefix-dev:mainfrom
wolfv:fix-macos-executable-rpath

Conversation

@wolfv

@wolfv wolfv commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

Preserve @executable_path LC_RPATH entries during macOS post-processing. Like @loader_path, these paths are already relative and relocatable; removing them can leave packaged executables unable to locate dylibs outside the default lib directory.

Also fixes the misleading removal log for retained @loader_path entries and adds a regression test covering multiple executable-relative rpaths.

Fixes #2717.

Testing

  • cargo fmt --all -- --check
  • cargo check -p rattler_build_core
  • Added macOS regression test test_keep_executable_relative_rpaths

@wolfv
wolfv merged commit 5d67525 into prefix-dev:main Aug 5, 2026
11 checks passed
@wolfv wolfv mentioned this pull request Aug 13, 2026
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.

macOS relinker removes relocatable @executable_path rpaths

1 participant