[Top][All Lists]

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

Re: Why am I linking to an installed library?

From: Ralf Wildenhues
Subject: Re: Why am I linking to an installed library?
Date: Mon, 12 Sep 2005 14:59:32 +0200
User-agent: Mutt/1.4.1i

Hi Bruce,

* Bruce Korb wrote on Sat, Sep 10, 2005 at 05:17:15PM CEST:
> On x86 Linux:  i686-pc-linux-gnu
> I just made an extension to the shared library in my pet project.
> The older version has been installed in /usr/lib via rpm and
> in /usr/local/lib via "make install".  /etc/ seems a
> bit over the top, but looks like this:
> When I rebuild autogen, .libs/lt-autogen winds up pulling
> /usr/lib/ despite the fact the current
> project has a .libs/ version.  So, here's
> the stuff from the Makefiles:
> Makefile (configured values):
> > LIBGUILE_LIBS = -lguile -lguile-ltdl -lqthreads -lpthread -lcrypt -lm
> > DYNAMIC_AG = -export-dynamic
> > GEN_CSRC   = opts.h directive.h expr.ini expr.h proto.h pseudo-fsm.h
> > nodist_autogen_SOURCES = ag.c
> > autogen_SOURCES = $(GEN_CSRC)
> > autogen_LDADD   = $(top_builddir)/autoopts/ $(LIBGUILE_LIBS)
> > autogen_LDFLAGS = $(DYNAMIC_AG)
> > autogen_CFLAGS  = $(LIBGUILE_CFLAGS)
> If I hand edit the script "autogen" to contain:
> > LD_LIBRARY_PATH=#{top_builddir}/autoopts/.libs
> > export LD_LIBRARY_PATH

(You meant ${top_builddir}, I assume.)

> then it works correctly.

It should work without that.

> If I do not do that, it binds to the previous
> library version in /usr/lib.

Which is broken.

> Everything is also fine if I:
> # rpm --erase autogen
> What's wrong?  :-)  Thank you!  Regards, Bruce

Dunno yet.  But recently there have been similar reports like yours;
let's hope they are all incarnations of one bug only.  (I haven't gotten
to analyzing them fully yet, unfortunately.)

We (I for one) would love more information: `./libtool --version', and
the full link line of the `autogen' binary and all of its output with
`--debug' added.

Does it work if you replace
> > autogen_LDADD   = $(top_builddir)/autoopts/ $(LIBGUILE_LIBS)

  autogen_LDADD   = relative_path_to/autoopts/ $(LIBGUILE_LIBS)

? IOW, did you use
  ../relative/path/to/configure [OPTIONS]
  /absolute/path/to/configure [OPTIONS]


reply via email to

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