[Xapian-devel] xapian-config --libs should list -luuid -lz ?

Jean-Francois Dockes jf at dockes.org
Sat Sep 25 13:00:03 BST 2010


Olly Betts writes:
 > On Sat, Sep 25, 2010 at 11:06:56AM +0200, Jean-Francois Dockes wrote:
 > > On Linux (tested on Fedora, Xapian 1.2.3), "xapian-config --libs" just
 > > lists -lxapian. On FreeBSD it also lists -lz and -luuid. Shouldn't the
 > > latter be part of the output on Linux too ?
 > 
 > No.
 > 
 > On Linux, if a shared library depends on other shared libraries, then
 > these are recorded in the dynamic section, and automatically pulled in
 > by the dynamic loader.  You can check these like so:
 > 
 > readelf -d /usr/lib/libxapian.so|grep NEEDED
 > 
 > So there's no need to specify these libraries again when linking the
 > application (unless the application independently uses them, in which
 > case you ought to).
 > 
 > [skip]

Ok, but this doesn't work with static links. We'd need something like
"xapian-config --static-libs" or some other kind of (possibly already
existing) workaround then ?

Cheers,

jf



More information about the Xapian-devel mailing list