Installation problem with rsruby

Dear all,

I am having problems installing rsruby, the bindings for the
R statistical language.
I am on an OpenSuSE 10.2, 64 bit system.
It looked at first that everything in the
installation went smoothly, ie the installation of R
itself from binaries, and the installation of rsruby
(I tried both the gems and the source code, successively),
following the instructions on sciruby

http://sciruby.codeforpeople.com/sr.cgi/RubyWithRlang .

But when I try to run some code, as in the example provided
on that page, I get:

/usr/local/lib/ruby/site_ruby/1.8/x86_64-linux/rsruby.so: libRblas.so:
cannot open shared object file: No such file or directory -
/usr/local/lib/ruby/site_ruby/1.8/x86_64-linux/rsruby.so (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rsruby.rb:2
from r001.rb:2:in `require’
from r001.rb:2

‘ls’ tells me that the file is there…
I have tried appending the path, setting symbolic links,
no result.

What’s going wrong? Why don’t I see it?

Thank you for your help!

Best regards,

Axel
.
went smoothly, i.e., installation of
binary packages of R, then

Axel E. wrote:

‘ls’ tells me that the file is there…
I have tried appending the path, setting symbolic links,
no result.

What’s going wrong? Why don’t I see it?

I hate this message. It’s very confusing. The loader is complaining that
it has loaded rsruby.so, but rsruby.so needs libRblas.so and the loader
can’t find libRblas.so.

Probably you have installed libRblas.so in /usr/local/lib. Make sure you
have /usr/local/lib (or whatever directory libRblas.so is in) in your
LD_LIBRARY_PATH. Check out man ld.so(8) for more information about
LD_LIBRARY_PATH.

Dear Tim,

‘ls’ tells me that the file is there…
have /usr/local/lib (or whatever directory libRblas.so is in) in your
LD_LIBRARY_PATH. Check out man ld.so(8) for more information about
LD_LIBRARY_PATH.

Thank you for your reply. I have libRblas.so installed in
/usr/lib64/R/lib and tried setting
LD_LIBRARY_PATH to this directory and then also appended it to
/usr/local/lib, just in
case … but this didn’t work … I am still getting the same error.
Also, I came across some warning against setting LD_LIBRARY_PATH at all:

http://linuxmafia.com/faq/Admin/ld-lib-path.html

But I’d be prepared to do many things to get R and Ruby to work together
;-(

What else could I do ?

Best regards,

Axel

Axel E. wrote:

Thank you for your reply. I have libRblas.so installed in
/usr/lib64/R/lib and tried setting
LD_LIBRARY_PATH to this directory and then also appended it to /usr/local/lib, just in
case … but this didn’t work … I am still getting the same error.

Try using ldd to see where rsruby.so thinks libRblas.so is:

ldd rsruby.so

Also, I came across some warning against setting LD_LIBRARY_PATH at all:

Should I set LD_LIBRARY_PATH?

What can I say? I’ve gotten different advice. I guess you get to make
your own choice.

Axel E. wrote:

How can I make a dynamic dependency between libRblas.so and rsruby.so ?
I couldn’t find any documentation on flags at the time of installation.

I don’t know. Probably you’re going to need to get in touch with the
rsruby developers.

Dear Tim,

thanks again for replying.
This is what i get:

dhcppc1:/usr/local/lib/ruby/site_ruby/1.8/x86_64-linux # ldd -d
rsruby.so
undefined symbol: rb_eRuntimeError (./rsruby.so)
undefined symbol: rb_eNoMethodError (./rsruby.so)
undefined symbol: rb_eArgError (./rsruby.so)
undefined symbol: rb_cObject (./rsruby.so)
libR.so => /usr/lib64/R/lib/libR.so (0x00002b1d9fbc7000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b1da017f000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002b1da0383000)
libm.so.6 => /lib64/libm.so.6 (0x00002b1da05bd000)
libc.so.6 => /lib64/libc.so.6 (0x00002b1da0813000)
*** libRblas.so => /usr/lib64/R/lib/libRblas.so
(0x00002b1da0b55000)
libgfortran.so.1 => /usr/lib64/libgfortran.so.1
(0x00002b1da0da8000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b1da103f000)
libreadline.so.5 => /lib64/libreadline.so.5 (0x00002b1da124d000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
libncurses.so.5 => /lib64/libncurses.so.5 (0x00002b1da148c000)

axel@dhcppc1:/usr/lib64/R/lib> ldd -d libRblas.so
libc.so.6 => /lib64/libc.so.6 (0x00002b0b54305000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)

at first, libRblas.so was not found in the line marked with (***), but
I managed to get it found by passing it as an option in the installation
process.

How can I make a dynamic dependency between libRblas.so and rsruby.so ?
I couldn’t find any documentation on flags at the time of installation.

Thanks for your help again.

Best regards,

Axel

Alex G. wrote:

I just installed it from the Gem repository on Gentoo Linux with no
problems, once I set R_HOME=/usr/lib/R. Gentoo builds all three of (in
/usr/lib/R/lib) libRblas.so, libRlapack.so and libR.so, and everything
worked. I don’t remember what Ubuntu/Debian do, but quite a bit of CRAN
is in the Debian repositories thanks to Dirk Eddelbuettel.

I usually build R from source on everything but Gentoo (where it’s built
from source by default) and Windows (where building R from source
requires a finicky and demanding tool set and patience I don’t possess)
anyhow, so I know where everything is and can specify that everything I
need gets built.

On 17 Jul 2007, at 06:29, Tim H. wrote:

Axel E. wrote:

How can I make a dynamic dependency between libRblas.so and
rsruby.so ?
I couldn’t find any documentation on flags at the time of
installation.

I don’t know. Probably you’re going to need to get in touch with
the rsruby developers.

Hi Axel,

I’m the developer of RSRuby, sorry to see you’ve been having trouble.
I don’t seem to have libRblas.so on my machine (Ubuntu), so I’m not
sure what is causing the issue you’re having. What version of R (and
RSRuby) did you install? Feel free to email me off-list if you like -
though I am away from work for the next week so replies may be slow.

Alex G.

Bioinformatics Center
Kyoto University