[Xapian-devel] xapian-config --libs output on Suse 10.1

Olly Betts olly at survex.com
Mon Oct 2 14:32:13 BST 2006


On Mon, Oct 02, 2006 at 01:58:42PM +0100, James Aylett wrote:
> On Mon, Oct 02, 2006 at 02:32:13PM +0200, Jean-Francois Dockes wrote:
> 
> > On Suse 10.1, xapian-config --libs outputs the following:
> > 
> > -L/usr/lib -lxapian -L/usr/lib -lstdc++ -lm -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s
> > 
> > The usual output on other linuxes seems to be like 
> >  -L/where/is/lib/ -lxapian
> > 
> > This causes a problem when trying to perform a static link with xapian,
> > because there does not seem to exist a libgcc_s.a 

I believe this library contain stuff which needs to be in a shared
library so that you can't get mismatching versions - even if a program
is statically linked, it could still dlopen() modules.  I think it's
related to exception handling.

> Hmm. It's coming out a lot, which suggests that pretty much every time
> we try to detect stuff in configure (which I think is effectively
> where this list of options is figured out - it ends up in a
> libtool-generated file based on compile options) it thinks -lgcc_s is
> important.

I have access to a SuSE 10 box and this is actually mostly coming from
libstdc++.la.  These shouldn't be pulled in at all, since Linux
automatically pulls in shared library dependencies.  Looks like libtool
might be misdetecting this or something.  I'll investigate and see
what's going on.

The first "-L/usr/lib" shouldn't be there, but there's a typo in
xapian-config.in (which I've just committed a fix for).

But as to your actual problem, if you're wanting to force a static link
with xapian, it would probably be better to provide an option to
xapian-config.  I doubt you really want to statically link libc, etc
anyway.

Cheers,
    Olly



More information about the Xapian-devel mailing list