Skip to content

Conversation

@jimeh
Copy link
Owner

@jimeh jimeh commented Jun 26, 2025

This is a horrible hack to work around macOS 15.4 no longer allowing the use of shared libraries which have duplicate RPATHs. Annoying libgccjit from Nix has two sets of duplicate RPATHs.

Hence the fix is to check the RPATHs of libgccjit*.dylib, remove any duplicates, and also ensure there's no duplicates in CFLAGS, LDFLAGS, or LIBRARY_PATHS which can cause libgccjit to output new compiled code with duplicate RPATHs.

If needed, it will trigger sudo to modify the libgccjit*.dylib file within the Nix store. It does create a .bak backup file, so you can restore it if needed.

This is a horrible hack to work around macOS 15.4 no longer allowing the
use of shared libraries which have duplicate RPATHs. Annoying libgccjit
from Nix has two sets of duplicate RPATHs.

Hence the fix is to check the RPATHs of `libgccjit*.dylib`, remove any
duplicates, and also ensure there's no duplicates in CFLAGS, LDFLAGS, or
LIBRARY_PATHS which can cause libgccjit to output new compiled code with
duplicate RPATHs.

If needed, it will trigger sudo to modify the `libgccjit*.dylib` file
within the Nix store. It does create a `.bak` backup file, so you can
restore it if needed.
@jimeh jimeh force-pushed the auto-fix-duplicate-rpaths branch from b933aba to 95377aa Compare June 26, 2025 23:35
@jimeh jimeh marked this pull request as ready for review June 26, 2025 23:37
@jimeh jimeh changed the title fix(deps): work-around duplicate RPATHs in libgccjit from Nix fix(deps): work around duplicate RPATHs in libgccjit from Nix Jun 26, 2025
@jimeh jimeh merged commit 3cf1977 into master Jun 27, 2025
3 of 4 checks passed
@jimeh jimeh deleted the auto-fix-duplicate-rpaths branch June 27, 2025 10:05
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