Jean-Francois Dockes
2006-Oct-02 12:32 UTC
[Xapian-devel] xapian-config --libs output on Suse 10.1
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 Actually, I am not quite sure about what "xapian-config --libs" is supposed to be used for (it's not too clear in the manual page), so I don't even know if this is a bug or a feature. I'm only sure it causes problems with the way I use it. Regards, J.F. Dockes
James Aylett
2006-Oct-02 12:58 UTC
[Xapian-devel] xapian-config --libs output on Suse 10.1
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.aHmm. 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. You need it on Solaris for various reasons, but that's only (I think) because GCC isn't the standard compiler - I'd have thought it was on Suse. Do you have the config.log file from xapian-core? Actually, your libxapian.la might be more helpful - it'll be in /usr/lib judging by the above output.> Actually, I am not quite sure about what "xapian-config --libs" is supposed > to be used for (it's not too clear in the manual page), so I don't even > know if this is a bug or a feature. I'm only sure it causes problems with > the way I use it.xapian-config --libs outputs the complete set of flags to pass through to your linker when building an application that uses Xapian. So it links in the Xapian library, and any other additional libraries that are needed to get it to work. It looks like the detection of this is wrong on Suse, or at least on your install of it :-( J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james at tartarus.org uncertaintydivision.org
James Aylett
2006-Oct-02 14:03 UTC
[Xapian-devel] xapian-config --libs output on Suse 10.1
[Please keep correspondance on-list.] On Mon, Oct 02, 2006 at 03:25:47PM +0200, Jean-Francois Dockes wrote:> On Solaris, xapian-config --libs just prints "-L/usr/local/lib -lxapian". > Can you mix g++ and Sun CC c++ objects anyway ? If you are linking > with g++, I think it can figure out about libgcc_sYou can't mix g++ and Sun Forte C++ afaik due to different name mangling conventions. I've had -lgcc_s issues before on Solaris (with Berkeley DB), which is why I mentioned it. (But there it did automatically figure it out, yes.)> > Do you have the config.log file from xapian-core? Actually, your > > libxapian.la might be more helpful - it'll be in /usr/lib judging by > > the above output. > > I am attaching libxapian.la, and libstdc++.la because the flags seem to be > coming from there.As Olly says, libxapian.la shouldn't be referencing this at all. If you edit it out, do things compile smoothly for you? J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james at tartarus.org uncertaintydivision.org