[ruby] Build with --enable-load-relative
?
#5485
Unanswered
Frederick888
asked this question in
Tap maintenance and brew development
Replies: 1 comment 1 reply
-
That doesn't sound good
That will make life much worse for a bunch of people that don't install in the default location. I don't think that's worth it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Output of
brew config
Output of
brew doctor
Description of issue
I added
/usr/local/opt/ruby/bin
to my PATH, and have a fewgem install --user-install
'ed gems. This allows me to have a global default Ruby setup with a few gems likesolargraph
,neovim
, etc. without having to reinstall them across patch version updates.I also use a version manager (mise) for many projects. Now if there is a native gem in
~/.gem
for the same Ruby major/minor version, I'll get alinked to incompatible libruby
error requiring it, as~/.gem
bundles are linked to absolute path/usr/local/opt/ruby/lib/libruby.3.3.dylib
. The same thing happens even if I install the same gem to mise gem path, as~/.gem
has a higher priority by default.I can fix this issue by changing the
/usr/local/opt/ruby/lib/libruby.3.3.dylib
to@executable_path/../lib/libruby.3.3.dylib
:Now there's actually a flag to do this by default:
--enable-load-relative
. It seems to be a little problematic in the past but looks alright now. We'll also need to skip relocation (how?), which overwrites libruby's install name:As I'm not the best person to ask about these stuff, I'm wondering if it makes sense to do this change, or there are any other issues I'm not aware of?
Beta Was this translation helpful? Give feedback.
All reactions