[Xapian-devel] xapian-config --libs outputs libstdc++.la as a dependency

Olly Betts olly at survex.com
Fri Jan 13 21:47:48 GMT 2006


On Fri, Jan 13, 2006 at 07:48:10AM +0100, Jean-Francois Dockes wrote:
> What happens is that "xapian-config --libs" outputs libstdc++.la in the
> list of libraries. Something like:
> 
> -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib \
>  /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.la 

Hmm, that's not good.

I guess we need to recursively check for .la files in dependency_libs
and substitute the actual library to link against, plus the contents of
the .la file's dependency_libs.  That's a bit fiddly though...

We might be able to get away with just dropping libstdc++.la, since
linking C++ code should pull it in anyway.  I can't see any other
.la files making it in there unless we start depending on other
libraries.

Anyway, I'll take a look.

> As recoll is linked with g++, this generates an error (I guess it might
> work if libtool was used?).

If you're using libtool, then xapian-config --ltlibs should be used
instead (which happens automatically if you use XO_LIB_XAPIAN in
configure.in/configure.ac and use AC_PROG_LIBTOOL or AM_PROG_LIBTOOL).

Cheers,
    Olly




More information about the Xapian-devel mailing list