autoconf
[Top][All Lists]
Advanced

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

Re: detecting required libraries in AC_CHECK_LIB


From: Steve M. Robbins
Subject: Re: detecting required libraries in AC_CHECK_LIB
Date: Mon, 4 Jun 2001 14:54:54 -0400
User-agent: Mutt/1.3.18i

On Mon, Jun 04, 2001 at 08:40:13PM +0200, Simon Josefsson wrote:
> "Steve M. Robbins" <address@hidden> writes:
> 
> > On Mon, Jun 04, 2001 at 05:49:41PM +0200, Peter Eisentraut wrote:
> >> Steve M. Robbins writes:
> >> 
> >> > I expect that one cannot do so in general.  But I'll take a partial
> >> > solution, if there is one.  On linux, at least, "ldd libfoo.so" will
> >> > tell me which other shared objects libfoo links against, so this
> >> > info is embedded in the shared object.
> >> 
> >> If the info is embedded in the shared object then your work is done
> >> because the dynamic loader will automatically load the dependent libraries
> >> at run-time.  The case you're concerned about is when this has not been
> >> done (shame on that package),
> > 
> > Well, I'm seeing a linker failure, e.g.
> > 
> >     /usr/bin/ld: warning: libXext.so.6, needed by /usr/lib/libglut.so, not 
> > found (try using -rpath or -rpath-link)
> > 
> > I interpret this to mean that the shared objects required by libglut.so
> > are encoded in it.
> ...
> > The link line, btw, is
> > 
> >     gcc -g -O2 -o Display ... list of .o files ... 
> >     -L/usr/X11R6/lib -lSM -lICE -lglut -lGL -lGLU -lX11 -lXmu -lm
> > 
> > Thanks for your help,
> 
> Does it help to follow the advice given by the error message?

Yes, it does.  I put "-rpath /usr/X11R6/lib" into LDFLAGS (which
automake magically transformed) and the link succeeds.

I have never had to do this before, however, so I thought it was
due to a proliferation of extra X libraries.  But maybe something
has changed with my linker.  Or with the X library build process.
[My system tracks Debian/unstable, and things change fairly rapidly.]

So, is using -rpath the proper way to do link things nowadays?
Can this be handled automatically?

Thanks for any insight,
-Steve

-- 
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants




reply via email to

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