On Thu, 3 Feb 2005, Rankin, SE (Stephen) wrote:
> Just out of curiosity is the install path built into the shared libs and
> binaries? Running ldd on the astrom binary tells me that libsla.so.0 is
> not found, so I still have to set LD_LIBRARY_PATH to get the binary to
> work.
Steve,
the path for locating shared libraries can be baked into the executables
and other shared libraries (although the latter isn't generally used,
except when it is to be dl-loadable, like the JNI shareables). This is
done using the -rpath option of ld. All of the executables are currently
linked by libtool which does this for us. So yes the install path of the
shareable libraries is built into the binaries.
The downside is a slight confusion about the preference of LD_LIBRARY_PATH
and RPATH. On Linux I think RPATH has priority and under Solaris
LD_LIBRARY_PATH.
> My install path is /home/EPMPACK/install but using grep to see if this
> path is in the binaries and .so files tells me that it is indeed
> present. But if I grep for /home/EPMPACK/install/lib then this path is
> not found in the binaries or .so files. I am confused, if the binaries
> have any chance of finding the .so files then shouldn't
> /home/EPMPACK/install/lib be in them.
Sounds like it, but it is possible to separate the path baked into the
binaries from the actual installation directory, maybe you've done that.
(Norman knows too much about this magic, see DESTDIR and staging area talk
in the automake info pages).
> I am also confused about the issues surrounding these shared libs, what
> is wrong in setting LD_LIBRARY_PATH or the equivalent?
Nothing, if the binaries are installed in a different place to the one
baked in using -rpath you have to, but clearly this need should be
avoided.
Cheers,
Peter.
|