Bug 18448 - Building Ruby gems with Bundler fails after binutils commit d4ae5fb0b5d1ae4270b3343509e8bd2d529aa291
Summary: Building Ruby gems with Bundler fails after binutils commit d4ae5fb0b5d1ae427...
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.25
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-22 09:24 UTC by Denis Misiurca
Modified: 2015-06-07 04:48 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Misiurca 2015-05-22 09:24:53 UTC
After updating to binutils-2.25 I found that after bundle install command in one of my Ruby on Rails project it failed to start with en error message like:

/home/infoman/work/dev/binutils-bisect/bundler-test/vendor/bundle/ruby/2.0.0/gems/nokogumbo-1.4.2/lib/nokogumbo.rb:2:in `require': nokogiri.so: cannot open shared object file: No such file or directory - /home/infoman/work/dev/binutils-bisect/bundler-test/vendor/bundle/ruby/2.0.0/extensions/x86-linux/2.0.0/nokogumbo-1.4.2/nokogumboc.so (LoadError)

After some research I found that the old binutils added full path to nokogiri.so, but in 2.25 it was just a library name that links to nowhere — because nokogiri.so is only installed under bundler and is not in any of the system paths.

Then git bisect led me to commit d4ae5fb0b5d1ae4270b3343509e8bd2d529aa291, which changed behavior in -l:*.so processing.

For a testcase you can create a simple Gemfile with the following content:

source "https://rubygems.org"
gem 'nokogumbo'

Then run:
bundle install --path=vendor/bundle
bundle console

For binutils-2.24 this opens an IRB console with requested gems loaded to it.
For binutils-2.25, git master and possibly any revision starting from d4ae5fb just an error message appears about nokogiri.so.

Is this a bug in binutils or possibly nokogumbo (and other gems with binary extensions depending on another gems) must change something in their build process?
Comment 1 Alan Modra 2015-06-07 04:48:44 UTC
It was a bug in binutils that the -l:* left the full path to the library.  This has now been fixed, so packages relying on the old buggy behaviour need to be updated.