-
Notifications
You must be signed in to change notification settings - Fork 165
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
incompatible library version - proj4_c_impl.bundle (fatal) #114
Comments
Thank you for digging into this problem and for the thorough write-up. Your solution makes sense to me. The current ruby installation should be the the first path to search. Please open a PR. In related news, I'm not sure we should include all the other existing paths by default. Perhaps homebrew paths and standard linux paths. Other libraries (nokogiri, for one) seem to handle configuring dependent install paths with flags on the install where you can specify a non-standard path of dependent libraries. |
That code can certainly use some clean up, but figuring out why Homebrew's Ruby fails would be a good next step. Close issue? |
I did further testing and it appears that Homebrew's Ruby does work out of the box. The problem was very specific to compiling with Homebrew's Ruby headers and then running Rails with another (RVM, in my case). Also, it appears that my proposed solution resolved the issue for the StackOverflow question I mentioned above. |
I was getting the error
proj4_c_impl.bundle: [BUG] Segmentation fault at 0x00000000000440
but when I upgraded to ruby 2.2.3 and rangem pristine rgeo
as described in Issue #105 but when I ran the suggested fix, I got the following error:~/.rvm/gems/ruby-2.2.3@civicinsightedge/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in 'require': incompatible library version - ~/.rvm/gems/ruby-2.2.3@civicinsightedge/gems/rgeo-0.3.20/lib/rgeo/coord_sys/proj4_c_impl.bundle (fatal)
There was a StackOverflow post on this issue yesterday, which you can see here.
After some digging around, I figured it out what was wrong.
I opened up proj4_c_impl.bundle file in a hex editor and saw that the binary was being linked to
/usr/local/lib/libruby.2.2.0.dylib
, which was strange because I was using RVM to manage my rubies.libruby.2.2.0.dylib
was a symlink to/usr/local/Cellar/ruby/2.2.3/lib/libruby.2.2.0.dylib
so that told me it was using a Ruby version installed with Homebrew. I am not sure why I installed the Homebrew version of Ruby, but I did.I removed the Homebrew packges
ruby
andruby-build
, rangem pristine rgeo
, opened upproj4_c_impl.bundle
and saw that was linking to~/.rvm/rubies/ruby-2.2.3/lib/libruby.2.2.0.dylib
and the app loaded fine.This leads to two other questions. First, do we want to support Homebrew's ruby? If so, we need to debug this further.
The second question is: Do we assume that Ruby Managers are common? I would say so, and whenever I use a Ruby manager I am assuming that the current Ruby environment takes precedent over any other Ruby versions I have installed.
So I prioritized the order of libraries, and gave the Ruby manager environment precedent, committed to a branch, tested within my application and it works fine. Here is the fix:
eddietejeda@975984b
If there are no objections, I would like to make a pull request for this, but please feel free to discuss if there is a reason why we would not want to give precedence to Ruby Managers that I am not aware of.
The text was updated successfully, but these errors were encountered: