On Fri, Apr 21, 2000 at 03:38:19PM -0700, Tim Newsom wrote:
> If i have the LD_LIBRARY_PATH unset gnucash will start fine.
> If I set it, then I get an error:  SLIB not installed ....
> 
> What should I have in my LD_LIBRARY_PATH to make gnucash start and still
> allow all my other programs that use it start too?

My guess is that LD_LIBRARY_PATH is set to /usr/local/lib.  That means that
when gnucash is starting, it looks for shared libraries in /usr/local/lib
before /usr/lib or /lib.  My guess is that you have an old version of some
library in /usr/local/lib.

In the absense of LD_LIBRARY_PATH, shared libraries are usually found in
/lib then in /usr/lib.  That is, of course, unless /lib is just a symbolic
link to /usr/lib (solaris does this).  If you need LD_LIBRARY_PATH to be
set, but you want /usr/lib to be used before /usr/local/lib, set it to
/usr/lib:/usr/local/lib.

To find out which libraries are really getting used, try this.  There are
no spelling errors here...  In the first one, LD_LIBRARY_PATH is being set
to an empty string.  You may need to adjust the path to wherever gnucash is
installed.

    env LD_LIBRARY_PATH= ldd /usr/bin/gnucash
    env LD_LIBRARY_PATH=/usr/local/lib ldd /usr/bin/gnucash
    env LD_LIBRARY_PATH=/usr/lib:/usr/local/lib ldd /usr/bin/gnucash

Of course Linux uses ldconfig(8) to generate a cache of paths to libraries.
This is bad in that it confuses users of other UNIX variants, but is good
in that at startup you don't have a series of system calls that look like:

    stat("/opt/foo/lib/libc.so") = -1
    stat("/opt/bar/lib/libc.so") = -1
    stat("/opt/baz/lib/libc.so") = -1
    stat("/usr/local/lib/libc.so") = -1
    stat("/lib/libc.so") = -1
    stat("/usr/lib/libc.so") = 0
    open("/usr/lib/libc.so") = 3

The above would correspond to LD_LIBRARY_PATH being set to
/opt/foo/lib:/opt/bar/lib:/usr/local/lib.  With ldconfig's cache, it would
already know where libc is at.

Did I confuse you enough?

Mike

--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to