Re: Ruby stuck on binutils fixes
On Sat, Jul 05, 2003 at 06:30:52PM +0200, Robert Millan wrote:
> Hi there,
> I just made a run on Ruby, but it seems our broken binutils are playing
> bad on us. Latest binutils in CVS will hopefuly fix this, but see
> Juan, you said you were going to play with CVS binutils, did you have
> any success?
> Ruby breakage follows: (see patch in bug #197993 also)
> $ gcc main.o -L. -lruby -ldl -lcrypt -lm -o ruby
> $ ldd ruby
> libdl.so.2 => /lib/libdl.so.2 (0x2804d000)
> libcrypt.so.1 => /lib/libcrypt.so.1 (0x28051000)
> libm.so.1 => /lib/libm.so.1 (0x2807e000)
> libc.so.1 => /lib/libc.so.1 (0x2809f000)
> /lib/ld.so.1 => /lib/ld.so.1 (0x00000000)
> $ LD_LIBRARY_PATH=. ./ruby
> ./ruby: relocation error: ./ruby: undefined symbol: ruby_init
> "ruby" should have libruby.so in its library dependencies, but it doesn't.
> let's just blame ld :>
Try objdump -p ruby | grep NEEDED ldd isn't always reliable.(Even on
Linux.) Also make sure libruby.so is symlinked correctly, and that the
soname in libruby is correct. It might be statically linking libruby,
which could cause breakage.