Problems Using rb-gsl

M

Mark Bennett

I'm trying to use rb-gsl in an application I'm writing and am able to
use it on Mac OS X but not Linux. On an old Red Hat 7.3 box I see the
following error messages when compiling use, 'ruby setup.rb setup':

gcc -fPIC -I../include -Wall -I/usr/local/include -I.
-I/usr/local/lib/ruby/1.8/i686-linux
-I/usr/local/lib/ruby/1.8/i686-linux
-I/home/mark/versioned/praxis/sbcalc/third_party/rb-gsl-1.6.0/ext -c
wavelet.c
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory

It says this for all files being compiled. When I try to run any of the
sample applications included with rb-gsl I see the message:

/usr/local/lib/ruby/site_ruby/1.8/i686-linux/rb_gsl.so: libgsl.so.0:
cannot open shared object file: No such file or directory -
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/rb_gsl.so (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/gsl.rb:1
from cheb.rb:2:in `require'
from cheb.rb:2

This same procedure works just find on my Mac. I've run ldconfig to
make sure all my GSL libraries are found, and I run 'make test' after
installing GSL. All tests passed.

Does anyone out there have a suggestion for what to do?

Thanks!

-Mark
 
Y

Yoshiki Tsunesada

Hi Mark,

I've never found the problems in my test,
on MacOS X and Redhat 9.0. Please check the
followings and try again.

* The shared object
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/rb_gsl.so
is copired correctly? Check with ext/rb_gsl.so, or copy
it by-hand.
* Add an entry "/usr/local/lib" in /etc/ld.so.conf.

Sorry for inconvenience.
Yoshiki
 
M

Mark Bennett

Yoshiki:

Thank-you for your help I really appreciate it! I did the things you
suggested in your last email.

1) rb_gsl.so seems correct

[mark@www rb-gsl-1.6.0]$ ls -la /usr/local/lib/ruby/site_ruby/1.8/i686-linux/

total 1556

drwxr-xr-x 2 root root 4096 Jan 10 15:40 .

drwxr-xr-x 4 root root 4096 Jan 10 15:19 ..

-rw-r--r-- 1 root root 143 Jan 10 15:18 narray_config.h

-rw-r--r-- 1 root root 4823 Jan 4 2004 narray.h

-rwxr-xr-x 1 root root 343577 Jan 10 15:19 narray.so

-r-xr-xr-x 1 root root 1218609 Jan 10 15:40 rb_gsl.so

[mark@www rb-gsl-1.6.0]$ md5sum ext/rb_gsl.so

7e8fb48ce8c6c12e76b05fe2c46e0b20 ext/rb_gsl.so

[mark@www rb-gsl-1.6.0]$ md5sum /usr/local/lib/ruby/site_ruby/1.8/i686-linux/rb_gsl.so

7e8fb48ce8c6c12e76b05fe2c46e0b20 /usr/local/lib/ruby/site_ruby/1.8/i686-linux/rb_gsl.so


2) Added /usr/local/lib to /etc/ld.so.conf

This directory was missing from the list in ld.so.conf but I added it.
The file now looks like this:

[mark@www rb-gsl-1.6.0]$ cat /etc/ld.so.conf

/usr/kerberos/lib

/usr/X11R6/lib

/usr/lib/qt-3.0.5/lib

/usr/lib/mysql

/usr/local/lib


After doing both these things, I tried running a setup.rb clean, then
ran though the build intructions again with the same outcome. Is there
any other information I can provide that might be helpful?

Thanks! :)

-Mark
 
Y

Yoshiki Tsunesada

Thank-you for your help I really appreciate it! I did the things you
suggested in your last email.
After doing both these things, I tried running a setup.rb clean, then
ran though the build intructions again with the same outcome. Is
there any other information I can provide that might be helpful?

Hmm, the message says the system could not find libgsl.so.0.
Where is the shared library? Is it in search path, or has it be
built?
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/rb_gsl.so: libgsl.so.0: cannot
open shared object file: No such file or directory -
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/rb_gsl.so (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/gsl.rb:1
from cheb.rb:2:in `require'
from cheb.rb:2

Yoshiki
 
M

Mark Bennett

Yoshiki:

The libgsl.so.0 is in /usr/local/lib which I'm assuming is in my search
path. Is there a way I can check this? I'm not sure which search path
I need to look at.

Here are the details of libgsl:

[mark@www cheb]$ locate libgsl.so.0

/usr/local/lib/libgsl.so.0

[mark@www cheb]$ ls -la /usr/lo

local lost+found

[mark@www cheb]$ ls -la /usr/local/lib/ | grep libgsl.so

lrwxrwxrwx 1 root root 15 Jan 10 15:16 libgsl.so -> libgsl.so.0.7.0

lrwxrwxrwx 1 root root 15 Jan 10 15:16 libgsl.so.0 -> libgsl.so.0.7.0

-rwxr-xr-x 1 root root 6248793 Jan 10 15:16 libgsl.so.0.7.0


-Mark
 
Y

Yoshiki Tsunesada

Mark,

* I guess you use GCC 3.1: it warns "changing search order
for system directory" when an option -I/usr/local/include
is given. If you use newer(older) GCC, the warning won't
appear.
* The message you showed says, the shared object rb_gsl.so
is not found in your system, but it is installed in
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/.
As you shown, narray.so is also installed in the same
place, and how about is it (or other Ruby wrappers of C
libraries)? Is it possible to run scripts using NArray?
I'm not sure the problem is of rb-gsl or of the system.

Yoshiki
 
M

Mark Bennett

--------------ms030501020908070803010002
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Yoshiki:

Just to update you and the rest of the list, I was able to get this
problem sorted out with a lot of help from Ara Howard.

Here's what I had to do to fix this problem...

1) Edit /etc/ld.so/conf

Red Hat boxes don't seem to include /usr/local/lib in their search path
so I added it along with my Ruby lib folder. My /etc/ld.so.conf now
looks like:

/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/qt-3.0.5/lib
/usr/lib/mysql
/usr/local/lib
/usr/local/lib/ruby/site_ruby/1.8/i686-linux

2) Run ldconfig

I ran ldconfig as root to update the ld.so search path

3) Rebuild rb-gsl

Followed the directions to recompile and install rb-gsl

4) Ran rb-gsl examples

When I ran the examples again they now worked with no problems. :)

Hope this helps anyone else out there with the same problems! Thanks
for all the assistance.

-Mark


Yoshiki said:
Mark,

* I guess you use GCC 3.1: it warns "changing search order
for system directory" when an option -I/usr/local/include
is given. If you use newer(older) GCC, the warning won't
appear.
* The message you showed says, the shared object rb_gsl.so
is not found in your system, but it is installed in
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/.
As you shown, narray.so is also installed in the same
place, and how about is it (or other Ruby wrappers of C
libraries)? Is it possible to run scripts using NArray?
I'm not sure the problem is of rb-gsl or of the system.

Yoshiki


--------------ms030501020908070803010002
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII9TCC
AtUwggI+oAMCAQICAw12MDANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE
ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDQxMTE5MTczMjE3WhcNMDUxMTE5MTczMjE3
WjBGMR8wHQYDVQQDExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMSMwIQYJKoZIhvcNAQkBFhRt
YXJrQHRoZS1iZW5uZXR0cy5jYTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALvG
7WwNeleYoksl1qKf8ujmzlIfv3p95r43+oZfXTstcbterwGwGyKKc8pelfjnFvnHuJTruVpQ
D/1EntrUuY0WQokD1etgWf6dGtrlBSq0kfauKt6fpL1fQbikIBNBI65y1v6ca1xchp+4JToS
Y8RfVomG1UI0YLKdxko/85LNrfxinAk43mgrjXKVPBJMNwiUVndG91DVbV58/dtDuGfD+PkP
adXruCU56DrR2PNac7ocTHdTVOgHOZexB8iL5Xa65CTHUA6v9DqQfUpT/ZXgY9VRu+oEiQ3D
7d/LwSdijGpParRbXpjsE71h7+5tNNP9vgPRNkrkedB6yhwjG28CAwEAAaMxMC8wHwYDVR0R
BBgwFoEUbWFya0B0aGUtYmVubmV0dHMuY2EwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQQF
AAOBgQBhNqyuE1FxVCPFylWYr05IBS5LfeR57hGxIsToIqHQv6kN/f3JqfPRZ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KSDhg/G
APD1GiYIr4RxcJz3z7+YaHbZozzjROLGvnK/vFUUSEVnreY+PmLCLLENHgCJFs/yCvEF5xGk
04+Nw40KUzgUBI2xQvwa32D9QXbq0HcDqDjgKvLZXlMqknZ7BPHdqMNwUngAAAAAAAA=
--------------ms030501020908070803010002--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top