Re: [xml] Problem compiling libxml2-2.6.4

Ian Marlier said:
I'm trying to compile libxml2-2.6.4 on a Mac OS X machine.
Configure runs
fine, but make fails at the same place every time, and I don't know
coding to solve this...

<lots of compilation messages...>
source='valid.c' object='valid.lo' libtool=yes \
depfile='.deps/valid.Plo' tmpdepfile='.deps/valid.TPlo' \
depmode=gcc /bin/sh ./depcomp \
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.
-I./include  -D_REENTRANT      -g -O2 -Wall -c -o valid.lo `test -f
'valid.c' || echo './'`valid.c
 gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include
-Wall -c valid.c -Wp,-MD,.deps/valid.TPlo  -fno-common -DPIC -o
valid.c: In function `xmlFreeID':
valid.c:2398: structure has no member named `doc'
valid.c:2399: structure has no member named `doc'
valid.c: In function `xmlAddID':
valid.c:2458: structure has no member named `doc'
make[2]: *** [valid.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I looked for the functions that were having problems, and this is
what I

[network:~/libxml2-2.6.4] marlier# grep -n "xmlFreeID" valid.c
2387: * xmlFreeID:
2393:xmlFreeID(xmlIDPtr id) {
2485:   xmlFreeID(ret);
2494: * xmlFreeIDTable:
2500:xmlFreeIDTable(xmlIDTablePtr table) {
2501:    xmlHashFree(table, (xmlHashDeallocator) xmlFreeID);
2592:    xmlHashUpdateEntry(table, ID, NULL, (xmlHashDeallocator)
6301:          xmlFreeIDTable(doc->ids);
6498:          xmlFreeIDTable(doc->ids);
[network:~/libxml2-2.6.4] marlier# grep -n "xmlAddID" valid.c
2410: * xmlAddID:
2421:xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar
2444:           "xmlAddID: Table creation failed!\n");
4117:        if (xmlAddID(ctxt, doc, value, attr) == NULL)
4314:        if (xmlAddID(ctxt, doc, value, (xmlAttrPtr) ns) ==
[network:~/libxml2-2.6.4] marlier#

Any ideas?

It appears your problem is related to "include libraries".  The
definition of the xmlID structure is given in libxml/tree.h.  The
include file which comes with libxml2-2.6.4 (in the subdirectory
include/libxml/tree.h) defines that structure to include the element
'doc', but that was a fairly recent change.  Older versions of the
file don't have it.

The fact that your compiler is issuing this error indicates that,
for some reason, it is using the older version rather than the one
within the distribution.  Without looking carefully at your
configuration [which I'm not particularly anxious to do ;-)], I
can't give you much more information.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]