logo       

Re: Perl calling C calling Ruby (linking problem): msg#01182

lang.ruby.general

Subject: Re: Perl calling C calling Ruby (linking problem)

>Hi,
>
>At Tue, 13 Aug 2002 06:36:33 +0900,
>Peter Munro wrote:
>> $ perl test.pl
>> Ruby exception: /opt/lib/ruby/1.6/i686-linux/digest/md5.so:
>> undefined symbol:
>> rb_cObject - /opt/lib/ruby/1.6/i686-linux/digest/md5.so
>> (eval): uninitialized constant Digest (NameError)
>> (eval): [BUG] Segmentation fault
>> ruby 1.6.7 (2002-03-01) [i686-linux]
>> Aborted
>
>Do you link it with static library of ruby instead of shared
>version?

Ah! yes, I built it with the static library. And thank you for the
response.

BUT... I've now built the dynamic Ruby library, and re-linked the code:

$ ldd regdb.so
libruby.so.1.6 => /usr/local/lib/libruby.so.1.6 (0x4001c000)
libm.so.6 => /lib/libm.so.6 (0x400e1000)
libdl.so.2 => /lib/libdl.so.2 (0x40103000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40108000)
libc.so.6 => /lib/libc.so.6 (0x40135000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

And it _still_ gives me this:
$ perl test.pl
Ruby exception: /opt/lib/ruby/1.6/i686-linux/digest/md5.so: undefined
symbol: rb_cObject - /opt/lib/ruby/1.6/i686-linux/digest/md5.so

Any thoughts?

Many thanks in advance,
Peter Munro





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise