-
Notifications
You must be signed in to change notification settings - Fork 60
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
Mac OS: LoadError: Could not open library 'vips' #141
Comments
Have a look at #130 and try the suggestions... I think it's a bad install configuration issue and you need to track down where it went wrong. |
I tried again here and it seems to be working on sierra at least:
|
|
Putting debug prints into ffi I see it loads
What is poppler? Maybe it's smth wrong with it?
UPD: in the |
Switching back via
|
Applying patch from #144 ( Maybe its libpoppler-glib that can't find the proper path to poppler.dylib? Wanted to debug paths that process tries to open but |
Weird stuff. Looking for a way to debug I found such tools as P.S.:
|
Probably related: ros2/ros2#391 (comment) |
So as workaround I've decided to copy a $ sudo cp /usr/bin/ruby ./
$ chmod 500 ./ruby Here is how I made things work: IRBIf you do $ ./ruby irb RSPEC
$ PATH=`pwd`:$PATH rspec RAKERunning rspec via rake is tricky -- it is doing it in another way and seems to use the system ruby. How to check it? The only working way to know the exact path to executable by PID on Mac OS I've found is https://stackoverflow.com/a/14805946/322020 so you compile it and put the tool nearby. You can see it's working by: $ ruby -e 'puts `./pathfind #{Process.pid}`'
proc 19893: /usr/bin/ruby
$ PATH=`pwd`:$PATH ruby -e 'puts `pathfind #{Process.pid}`'
proc 19897: /Users/nakilon/.../ruby
$ PATH=`pwd`:$PATH /usr/bin/env ruby -e 'puts `pathfind #{Process.pid}`'
proc 19900: /Users/nakilon/.../ruby Now at the bottom of vips issue backtrace we see #!/usr/bin/env ruby
require 'rspec/core'
RSpec::Core::Runner.invoke Right after shebang you add the following line for debug: puts __FILE__, `/Users/nakilon/.../pathfind #{Process.pid}` Now when you run the rake again you see:
that means shebang is ignored. Open the
right before the
where the
The $ grep -rI "RUBY =" /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/ you'll find the $ RUBY=`pwd`/ruby rake if the default rake task is rspec, and: $ ./ruby `which rake` my_custom_rask for simple custom tasks. |
Thank you for writing this @Nakilon, it's very helpful. I guess another solution would be to recommend the homebrew Ruby, is that right? |
Since the issue didn't exist earlier, I think smth is broken and can be fixed. Maybe some updated dependency does not meet modern Mac OS practices. That's not nice to force people to use another Ruby or disable SIP. |
Update to large comment. This bundle exec ./ruby `which irb` seems to stop working if you install rbenv. In this case you should do: bundle exec ./ruby /usr/bin/irb since the Same about rake: ./ruby `rbenv which rake` mytask |
I'm having the same/similar problem. |
From what I've read, it seems plausible that DYLD_LIBRARY_PATH no longer works with SIP which is on by default. Therefore, the only solution AFAIK is to specify the full path of the library or install it into a standard location. |
Okay, by specifying explicit paths to ffi_lib for |
@ioquatix with what Ruby distribution did it work for you? System one, or rbenv, or rvm? |
I'm using |
The ruby-ffi issue on this has an interesting idea: They are suggesting that when SIP is on, executables started from To fix this, simply make a link from
and it might all start working. Worth a try. |
Sadly it doesn't work for
And even without that it does not work for me:
And about
|
Upgraded macOS from El Captain to High Sierra -- it comes with Ruby 2.3.3. And issue seems to be gone. |
This worked for me: Just ran For those who don't know what |
So I did
brew upgrade vips
that poured thevips-8.5.8_2.el_capitan
and nowrequire vips
(the gem is the latest one) cause:Ruby is native to this OS: 2.0.0p648
The thing I've noticed about brew is that now it drags some portable Ruby 2.3 -- not sure if that's relevant.
The text was updated successfully, but these errors were encountered: