[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interdependent shared library problem
From: |
Patrick Welche |
Subject: |
Re: interdependent shared library problem |
Date: |
Mon, 16 Oct 2006 12:17:42 +0100 |
User-agent: |
Mutt/1.5.11 |
On Sun, Oct 15, 2006 at 08:17:54PM -0500, Albert Chin wrote:
> On Sun, Oct 15, 2006 at 08:53:41PM +0100, Patrick Welche wrote:
> > With CVS autotools of this month I am getting in a pickle trying
> > to build a program which depends on a shared library which depends
> > on a shared library. This is on NetBSD which uses rpath. An example
> > based on one from autobook is attached which builds
> >
> > hello -> libhello -> (libSM,libICE)
> >
> > .libs/libhello.so seems fine (objdump -x):
> >
> > NEEDED libSM.so.6
> > NEEDED libICE.so.6
> > SONAME libhello.so.0
> > RPATH /usr/X11R6/lib
> >
> > but the binary .libs/hello seems less happy:
> >
> > NEEDED libhello.so.0
> > NEEDED libSM.so.6
> > NEEDED libICE.so.6
> > NEEDED libc.so.12
> > RPATH /usr/local/lib
>
> What does the dependency_libs variable in libhello.la look like? Does
> an ldd on libhello.so.0 find the correct libraries?
libhello.so is fine.
# Libraries that this one depends upon.
dependency_libs=' -R/usr/X11R6/lib -L/usr/X11R6/lib -lSM -lICE'
.libs/libhello.so:
-lICE.6 => /usr/X11R6/lib/libICE.so.6
-lSM.6 => /usr/X11R6/lib/libSM.so.6
> Because /usr/X11R6/lib isn't in the default set of paths searched by
> the loader?
/usr/X11R6/lib doesn't need to be in the default set of paths searched
by the loader. As I mentioned, with a different compile line to the one
generated by libtool, I have a working hello. The problem is that the
binary created by libtool contains the dependencies of the shared the
library rather than just depending on the shared library.
Cheers,
Patrick