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
Please use $HOMEBREW_PREFIX and/or brew --prefix
to add a library path
#1030
Comments
Not every system has or needs Homebrew, so this should never be a requirement. Instead of bleeding at and guessing at dependencies, gem authors should be able to adjust dylib search path(s). Without this ability, or by guessing incorrectly, things break at scale such as isolated, vendored environments. |
My
|
That code was already merged but it doesn't solve dylibs in other locations.
Present a self-contained, reproducible MCE because that would be unexpected
behavior.
…On Tue, May 16, 2023 at 12:53 PM Ivan Larionov ***@***.***> wrote:
DYLD_FALLBACK_LIBRARY_PATH and DYLD_LIBRARY_PATH are not unset. spring
would cause this behavior because it doesn't inherit the current
environment.
My irb shell inherits LD_LIBRARY_PATH tho. But not
DYLD_FALLBACK_LIBRARY_PATH / DYLD_LIBRARY_PATH.
Not every system has or needs Homebrew, so this should never be a
requirement.
Instead of bleeding at and guessing at dependencies, gem authors should be
able to adjust dylib search path(s). Without this ability, or by guessing
incorrectly, things break at scale such as isolated, vendored environments.
ffi already guesses homebrew libs location, my suggestion is to use more
reliable mechanisms for that:
https://github.com/ffi/ffi/blob/73c36d77d76ef681cade4c4024abfe73af8a38b6/lib/ffi/dynamic_library.rb#L33C1-L36
—
Reply to this email directly, view it on GitHub
<#1030 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABWYMALVQ2DFVK5OQ3HQNTXGO5IPANCNFSM6AAAAAAXTKNHRU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi!
I'm struggling with making
ruby-vips
/ffi
work with custom Homebrew location on Intel mac:It fails with:
Setting the following doesn't help:
In fact I think ruby sets
DYLD_LIBRARY_PATH
andDYLD_FALLBACK_LIBRARY_PATH
tonil
on load:I saw a discussion in #968 about using
ENV['HOMEBREW_PREFIX']
orbrew --prefix
shellout to get an extra library path and I think this would solve my issue.Using
ffi
from the master branch didn't fix the issue. I've added the following code todynamic_library.rb
as an experiment:and it finally worked.
The text was updated successfully, but these errors were encountered: