Skip to main content.
home | support | download

Back to List Archive

Re: Do I have libxml2?

From: Bill Moseley <moseley(at)>
Date: Tue Dec 09 2003 - 00:33:24 GMT
On Mon, Dec 08, 2003 at 02:43:22PM -0800, Deane Barker wrote:
> How do I know if I have libxml2 in my installation?

Here's one way:

moseley@bumby:~$ ldd `which swish-e` | grep libxml => /usr/lib/ (0x40024000)

Here's another way:

moseley@bumby:~/swish-e$ fgrep -i xml config.log
configure:23859: checking for xml2-config
configure:23877: found /usr/bin/xml2-config
configure:23890: result: /usr/bin/xml2-config
configure:23916: checking for libxml libraries >= 2.4.3
LIBXML2_LIB='-L/usr/lib -lxml2 -lz -lpthread -lm'

And another:

moseley@bumby:~/swish-e$ fgrep -i xml src/acconfig.h
/* Libxml2 support included */
#define HAVE_LIBXML2

> "IndexContents HTML2 .html"
> I get:
> "Unknown document type 'HTML2'"

That would make me think it wasn't linked with libxml2.  The program
xml2-config must be in your path when running the configure script.

moseley@bumby:~/swish-e$ xml2-config --libs         
-L/usr/lib -lxml2 -lz -lpthread -lm

> It's not capturing META and the BODY tag and such, and it's not
> respecting the <!-- noindex --> tags.

Yep, that happens in the parser.c code which is linked in when libxml2
is available.

> Perhaps I'm naive, but I thought that the compilation would detect
> libxml2 and include it.  Or did I have to configure something special
> when I compiled?

As above, you need to have xml2-config in your path for it to be

Bill Moseley
Received on Tue Dec 9 00:33:28 2003