[Top][All Lists]

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

Re: [igraph] Re: shared library error

From: Tamas Nepusz
Subject: Re: [igraph] Re: shared library error
Date: Wed, 26 Jan 2011 11:50:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7

Dear Sergiu,

LD_LIBRARY_PATH is definitely a good step towards the solution; it seems
like your system does not look for shared libraries in /usr/local/lib by
default, and that's where you put the igraph libs. You can force your
system to look for libs there either by setting LD_LIBRARY_PATH (I'd do
it in the shell profile if I were you so that it is enforced every time
you log in), or by adding /usr/local/lib to /etc/ld.so.conf.

As for the segmentation fault, we need more information to sort that
out; at least we have to know which function the program crashes in.
First, try to compile your program using the -g switch to add the debug
symbols to the executable, then run it under gdb (the GNU debugger) and
list the backtrace (using the "bt" command) when it crashes. The
backtrace is invaluable to determine whether the crash happens somewhere
in igraph or not. (And if it does, we would also need the source code of
your program, or even better, a self-contained example that reproduces
the crash).


> Some further news,
> I checked the content of $LD_LIBRARY_PATH and it was empty, so I added my 
> path:
> export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
> Now my program ran but with a segmentation fault. However I got no seg
> faults on cygwin :((
> Not sure that I solved the shared library problem though, make it
> chooses the wrong file, I saw three:
> libigraph.so libigraph.so.0  libigraph.so.0.0.0
> On Wed, Jan 26, 2011 at 11:03 AM, sergiu netotea
> <address@hidden> wrote:
>> Hi,
>> I have a server running Red Hat Enterprize edition, I installed the
>> igraph library from source code following the normal ./configure,
>> make, make install steps. I have a program that runs well on my local
>> cygwin, compiled with:
>> gcc grn.c -Wall -I/usr/local/include/igraph -L/usr/local/lib -ligraph -o grna
>> It does compile on the server without any message but when I run it, it 
>> gives:
>> ./grna: error while loading shared libraries: libigraph.so.0: cannot
>> open shared object file: No such file or directory
>> However the libs are there, beside the fact that in the compilation
>> step it managed to find them:
>> ls /usr/local/lib
>> libgsl.a  libgslcblas.a  libgslcblas.la  libgslcblas.so
>> libgslcblas.so.0  libgslcblas.so.0.0.0  libgsl.la  libgsl.so
>> libgsl.so.0  libgsl.so.0.15.0  libigraph.a  libigraph.la  libigraph.so
>>  libigraph.so.0  libigraph.so.0.0.0  pkgconfig
>> The include files are also in their place. I suspect it has to do with
>> bad registration of the shared library. But why didn't I get any
>> message at installation, or when I compiled my program?
>> I wanted to check the cache of ldconfig but strangely enough the
>> command is not available.
>> Looking at this it all seems like a big hurdle and I don't have much
>> time right now:
>> http://www.faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html#AEN115
>> I am not very good at libtools, perhaps you can give me some help
>> running my program? JJ
>> Thanks!
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help

reply via email to

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