[Top][All Lists]

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

Re: libtool issue in a reference

From: Ralf Wildenhues
Subject: Re: libtool issue in a reference
Date: Mon, 25 Jan 2010 21:36:59 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

* Steffen Dettmer wrote on Mon, Jan 25, 2010 at 12:06:11PM CET:
> On Mon, Jan 25, 2010 at 8:25 AM, Murray S. Kucherawy wrote:
> > I've got a package that first builds a library and then a
> > binary that links to the library.  The binary build references
> > it via:
> >
> > progname_LIBADD = ../libdirectory/
> I'm not sure if we do it correctly, but we'd set
> LIBS=-L$(top_builddir)/libdirectory -lraryname
> in such cases (in configure. ohh and we don't use libtool).

OTOH, when using libtool, writing
  progname_LDADD = ../libdirectory/

has two additional, desirable effects:

1) It allows automake to add a make rule dependency on the file
"../libdirectory/" which means that when rerunning "make"
in a build tree, progname will be rebuilt if was updated.

Which is something that doesn't work OOTB with your setup.

2) It allows libtool to detect that you're linking against an
uninstalled library, and thus won't add a run path for the uninstalled
directory location to the installed program.  (It might do so for the
uninstalled program, dependening on whether fast-install was enabled or
not, and on hardcoding capabilities of the underlying system.)

The fact that an early -L/usr/local/lib breaks linking against the
uninstalled library is a bug in libtool.  Murray, it is crucial to know
which system you're on, please post
  ./libtool --config

I know that the issue exists on OpenBSD and on old SunOS systems.


reply via email to

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