homebrew-core icon indicating copy to clipboard operation
homebrew-core copied to clipboard

guile: add HOMEBREW_PREFIX/lib rpath

Open aconchillo opened this issue 4 months ago • 0 comments

This allows Guile's (dlopen) to find libraries in HOMEBREW_PREFIX/lib.

Without the added rpath you get errors when looking for libraries in HOMEBREW_PREFIX/lib.

scheme@(guile-user)> (dynamic-link "libgit2")
ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure dlopen: file "libgit2.dylib", message "dlopen(libgit2.dylib, 0x0005): tried: 'libgit2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibgit2.dylib' (no such file), '/usr/lib/libgit2.dylib' (no such file, not in dyld cache), 'libgit2.dylib' (no such file)"

With this PR we can now do:

scheme@(guile-user)> (dynamic-link "libgit2")
$1 = #<<foreign-library> filename: "libgit2" handle: #<pointer 0x8784b960>>
  • [x] Have you followed the guidelines for contributing?
  • [x] Have you ensured that your commits follow the commit style guide?
  • [x] Have you checked that there aren't other open pull requests for the same formula update/change?
  • [x] Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • [x] Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • [x] Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

aconchillo avatar Feb 24 '24 06:02 aconchillo