GNOME Bugzilla – Bug 128321
Is there a hash.h/parser.h chicken-egg problem?
Last modified: 2009-08-15 18:40:50 UTC
I'm trying to build the latest XML-GDOME (0.84) against the latest libxml2 and having issues. gcc -c -I/usr/include -I/usr/include/libgdome -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/libxml2 -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -DVERSION=\"0.84\" -DXS_VERSION=\"0.84\" -fpic "-I/usr/lib/perl5/5.8.2/i386-linux-thread-multi/CORE" GDOME.c In file included from /usr/include/libxml2/libxml/hash.h:22, from GDOME.xs:10: /usr/include/libxml2/libxml/parser.h:265: parse error before `xmlHashTablePtr' /usr/include/libxml2/libxml/parser.h:265: warning: no semicolon at end of struct or union /usr/include/libxml2/libxml/parser.h:266: warning: data definition has no type or storage class /usr/include/libxml2/libxml/parser.h:283: parse error before `}' make: *** [GDOME.o] Error 1 In looking at hash.h and parser.h, I see the following: hash.h: #include <libxml/parser.h> ... typedef xmlHashTable *xmlHashTablePtr; parser.h: #include <libxml/hash.h> ... xmlHashTablePtr attsDefault; /* defaulted attributes if any */ So, if someone does #include <libxml/hash.h>, parser.h's attsDefault will be hit before the typedef. So it doesn't seem to do a lot of good to have hash.h include parser, does it? Now, granted, I'm not sure that XML-GDOME was smart in includeing libxml/hash.h, and commenting it out altogether works. But still, I do wonder about hash.h.
Daniel, always one step ahead of the rest of us, has already fixed this in cvs: Thu Nov 20 12:54:30 CET 2003 Daniel Veillard <daniel@veillard.com> [snip * include/libxml/hash.h: fixed an inclusion problem when <libxml/hash.h> wasn't preceeded by <xml/parser.h>
*** Bug 128684 has been marked as a duplicate of this bug. ***
This should be closed in release of libxml2-2.6.5, Daniel