GNOME Bugzilla – Bug 128684
parser.h typedef problem when building libgdome2
Last modified: 2009-08-15 18:40:50 UTC
Using gcc 2.95.4, not using gnome. I get the following build error when trying to build libgdome2 (a DOM parsing library which depends on libxml2) under Cygwin: In file included from /home/libeng_deps/noarch/libxml2- 2.6.2/include/libxml2/lib xml/hash.h:25, from gdome.c:26: /home/libeng_deps/noarch/libxml2- 2.6.2/include/libxml2/libxml/parser.h:265: error: syntax error before "xmlHashTablePtr" /home/libeng_deps/noarch/libxml2- 2.6.2/include/libxml2/libxml/parser.h:265: warning: no semicolon at end of struct or union /home/libeng_deps/noarch/libxml2- 2.6.2/include/libxml2/libxml/parser.h:266: warning: type defaults to `int' in declaration of `attsSpecial' /home/libeng_deps/noarch/libxml2- 2.6.2/include/libxml2/libxml/parser.h:266: warning: data definition has no type or storage class /home/libeng_deps/noarch/libxml2- 2.6.2/include/libxml2/libxml/parser.h:283: error: syntax error before '}' token make[3]: *** [gdome.lo] Error 1 Editing parser.h and putting: /* * The hash table. */ typedef struct _xmlHashTable xmlHashTable; typedef xmlHashTable *xmlHashTablePtr; a few lines up, before: #include <libxml/parser.h> Fixes the problem, because it seems that parser.h is looking for the xmlHashTable type which doesn't exist yet. I don't know the libxml source, but I am not sure if this is a problem on other platforms. Seems like the fix is easy enough. (Possibly stick those typedefs in parser.h, or use the struct _xmlHashTable struct def in parser.h, not the xmlHashTable one.) All in all, THANK YOU FOR BUILDING SUCH A PORTABLE, WELL-MADE LIBRARY!! I am having nightmares getting other ones to build under Win32 and cygwin, but yours always builds flawlessly! You may mail me if you need any more info about this bug, but it seems trivial enough. Robby
Thanks for the report. Daniel's already fixed this in cvs. *** This bug has been marked as a duplicate of 128321 ***
This should be closed in release of libxml2-2.6.5, Daniel