[Rubygems-developers] [ rubygems-Bugs-26050 ] gem links native extensions against wrong version of ruby

noreply at rubyforge.org noreply at rubyforge.org
Wed May 27 19:20:59 EDT 2009


Bugs item #26050, was opened at 2009-05-27 16:20
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=26050&group_id=126

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Aaron Turner (synfinatic)
Assigned to: Nobody (None)
Summary: gem links native extensions against wrong version of ruby

Initial Comment:
I have ruby 1.8 (/usr/bin/ruby) and 1.9.1 (/usr/bin/ruby1.9) installed.  I downloaded rubygems 1.3.3 and ran:

ruby1.9 setup.rb

which correctly installed rubygems in /usr/lib/ruby/site_ruby/1.9.1 but did not honor the default --format-executable flag since it created /usr/bin/gem rather then /usr/bin/gem1.9

I then copied over /usr/bin/gem -> /usr/bin/gem1.9 and edited the shebang appropriately and tried installing hpricot:

gem1.9 install hpricot

which built, but was incorrectly linked against ruby 1.8:
ldd /usr/lib/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot_scan.so
	libruby.so.1.8 => /usr/lib/libruby.so.1.8 (0x0049b000)
	libc.so.6 => /lib/tls/libc.so.6 (0x00ca1000)
	libdl.so.2 => /lib/libdl.so.2 (0x008d5000)
	libcrypt.so.1 => /lib/libcrypt.so.1 (0x00b6f000)
	libm.so.6 => /lib/tls/libm.so.6 (0x0032f000)
	/lib/ld-linux.so.2 (0x46843000)

This results in hpricot segfaulting immediately upon require.

Extras:
output of gem1.9 install -V hpricot: http://pastie.org/492109
hpricot Makefile: http://pastie.org/492106

Note: I (synfinatic) was working with drbrain on #ruby-lang on this issue.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=26050&group_id=126


More information about the Rubygems-developers mailing list