Skip to content

Fix missing transitive rpath for fetched dependencies on macOS#33

Merged
kryksyh merged 2 commits into
musescore:mainfrom
kryksyh:macos-dep-transitive-rpath
Jul 15, 2026
Merged

Fix missing transitive rpath for fetched dependencies on macOS#33
kryksyh merged 2 commits into
musescore:mainfrom
kryksyh:macos-dep-transitive-rpath

Conversation

@kryksyh

@kryksyh kryksyh commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Original PR: #31 by @cbjeukendrup

Fix macos dylib loading of transitive deps by adding @loader_path rpaths to fetched dylibs

cbjeukendrup and others added 2 commits July 11, 2026 17:22
_bd_relocatable_macos never received depends_prefixes, unlike its
Linux counterpart _bd_relocatable_elf, so a fetched dependency's own
dylib never got an rpath entry for its own dependencies' lib
directories. Any binary linking only the top-level dependency (not its
transitive shared-lib dependencies) would then fail to load at
runtime with a dyld "Library not loaded" error, since neither the
binary nor the dependency's dylib recorded where to find it.

Mirror the existing patchelf-based Linux logic: add
install_name_tool -add_rpath calls using @loader_path-relative paths
to each dependency prefix's lib directory.
@kryksyh
kryksyh merged commit e20e4d3 into musescore:main Jul 15, 2026
1 check passed
@kryksyh
kryksyh deleted the macos-dep-transitive-rpath branch July 15, 2026 08:11
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.

3 participants