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

keg_relocate: add HOMEBREW_PREFIX/lib to rpaths #15721

Closed
wants to merge 1 commit into from

Conversation

carlocab
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

...on non-/usr/local prefixes.

This allows dlopen to just work on Homebrew-installed (and linked)
libraries. We don't need to do this for /usr/local/lib because this is
already in dyld's default search path.

We already do this manually via setting LDFLAGS for some formulae
(e.g. Python, LuaJIT, etc).

I'll likely wait until we've removed HOMEBREW_RELOCATABLE_INSTALL_NAMES gating before merging this.

...on non-`/usr/local` prefixes.

This allows `dlopen` to just work on Homebrew-installed (and linked)
libraries. We don't need to do this for `/usr/local/lib` because this is
already in dyld's default search path.

We already do this manually via setting `LDFLAGS` for some formulae
(e.g. Python, LuaJIT, etc).
@carlocab carlocab added the in progress Maintainers are working on this label Jul 20, 2023
@carlocab
Copy link
Member Author

An alternative implementation would be to add the appropriate -rpath flags to superenv/LDFLAGS.

I think the approach here is better because it guarantees that HOMEBREW_PREFIX/lib is added to rpaths last, which is important because we don't want to inadvertently pick up, say, a linked library of a different version for a keg-only formula.

@MikeMcQuaid
Copy link
Member

I think the approach here is better because it guarantees that HOMEBREW_PREFIX/lib is added to rpaths last, which is important because we don't want to inadvertently pick up, say, a linked library of a different version for a keg-only formula.

Agreed 👍🏻

@p-linnane p-linnane removed the in progress Maintainers are working on this label Mar 15, 2024
Copy link

github-actions bot commented Apr 6, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Apr 6, 2024
@github-actions github-actions bot closed this Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants