Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix @rpath reference for macOS #455

Closed
wants to merge 1 commit into from

Conversation

carlocab
Copy link

@carlocab carlocab commented Aug 5, 2023

The semantic equivalent of $ORIGIN on macOS is @loader_path. That seems to be the intent here, so let's use @loader_path instead of @rpath.

Setting an RPATH of @rpath is, in any case, non-sensical. An @rpath reference tells dyld (the dynamic loader) to use the known RPATHs to resolve the reference, so adding @rpath to the list of known RPATHs doesn't give dyld any more information than it already has.

The semantic equivalent of `$ORIGIN` on macOS is `@loader_path`. That seems to be the intent here, so let's use `@loader_path` instead of `@rpath`.

Setting an RPATH of `@rpath` is, in any case, non-sensical. An `@rpath` reference tells dyld (the dynamic loader) to use the known RPATHs to resolve the reference, so adding `@rpath` to the list of known RPATHs doesn't give dyld any more information than it already has.
carlocab added a commit to carlocab/brew that referenced this pull request Aug 5, 2023
This is just a recipe for infinite loops. Plus, recursive references are
likely to be invalid, so we don't really gain much by attempting to
resolve them.[^1] (But we could if we made the logic here much more
complicated.)

Fixes a CI failure seen at Homebrew/homebrew-core#138323.

[^1]: See, for example, RenderKit/embree#455.
dduugg pushed a commit to dduugg/brew that referenced this pull request Sep 30, 2023
This is just a recipe for infinite loops. Plus, recursive references are
likely to be invalid, so we don't really gain much by attempting to
resolve them.[^1] (But we could if we made the logic here much more
complicated.)

Fixes a CI failure seen at Homebrew/homebrew-core#138323.

[^1]: See, for example, RenderKit/embree#455.
@freibold
Copy link
Contributor

Thanks for the PR! This was merged into our internal devel branch and released with an earlier Embree release.

@freibold freibold closed this Apr 29, 2024
@carlocab carlocab deleted the macos-rpaths branch April 30, 2024 06:29
@carlocab
Copy link
Author

Thanks!

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.

None yet

2 participants