help-mcsim
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Installation problems for libmcsim.so


From: Frederic Y . Bois
Subject: Installation problems for libmcsim.so
Date: Thu, 29 Nov 2007 08:52:23 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

>From anonymous MCSim User:
Question: Installation Problem for libmcsim.so
Date: Tue, 20 Nov 2007

Hi,

I tried to install MCSim on my Red Hat Enterprise Linux WS vs.4 
(64-bit Intel EM64T) 
and kept getting the following error message:

make[1]: Entering directory `Programs/mcsim/sim'
Linking libmcsim.so...
/usr/bin/ld: /tmp/cckVUj.o: relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with -fPIC
/tmp/cckVUj.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libmcsim.so] Error 1

I edited a line in sim/Makefile by adding -fPIC to the LFLAGS line:

LFLAGS = -lgsl -lgslcblas -lm -fPIC

It did solve my problem, but when I ran further with the example 
(mcsim.perc) and got another error message: 

$ ./mcsim.perc
./mcsim.perc: error while loading shared libraries: libgsl.so.0: cannot 
open shared object file: No such file or directory

What should I do?

-----------
Answer: 

Gsl library problem: in most systems it is installed in /usr/local/lib. 

First, do you have the "-L /usr/local/lib" option set in CLFLAGS? 

Another potential cause is that you may not have registered libgsl 
and libgslcblas 
with the kernel when you installed them. One way to check is to do 
"ldd /usr/lib/libmcsim.so" (or whatever the path for libmcsim.so is). 
You should get something like:
        linux-gate.so.1 =>  (0xffffe000)
        libgsl.so.0 => /usr/local/lib/libgsl.so.0 (0x4003c000)
        libgslcblas.so.0 => /usr/local/lib/libgslcblas.so.0 (0x401a2000)
        libm.so.6 => /lib/tls/libm.so.6 (0x401d4000)
        libc.so.6 => /lib/tls/libc.so.6 (0x401f6000)
        /lib/ld-linux.so.2 (0x80000000)
You can see that it knows where to find libgsl.so. 

Another way to check is "/sbin/ldconfig -p | grep gsl". 
You should get something
like:
        libgslcblas.so.0 (libc6) => /usr/local/lib/libgslcblas.so.0
        libgslcblas.so (libc6) => /usr/local/lib/libgslcblas.so
        libgsl.so.0 (libc6) => /usr/local/lib/libgsl.so.0
        libgsl.so (libc6) => /usr/local/lib/libgsl.so
which shows that the pointers are setup ok. 

If you don't see gsl when you run "/sbin/ldconfig -p" then run 
"/sbin/ldconfig /usr/local/lib"
(see man ldconfig). 
That should update the repertory of libraries (redo "/sbin/ldconfig -p" 
to be sure).

F. Bois






reply via email to

[Prev in Thread] Current Thread [Next in Thread]