After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 128684 - parser.h typedef problem when building libgdome2
parser.h typedef problem when building libgdome2
Status: VERIFIED DUPLICATE of bug 128321
Product: libxml2
Classification: Platform
Component: general
2.6.2
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2003-12-06 18:19 UTC by Robby Dermody
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Robby Dermody 2003-12-06 18:19:42 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
Comment 1 John Fleck 2003-12-06 23:08:20 UTC
Thanks for the report. Daniel's already fixed this in cvs.

*** This bug has been marked as a duplicate of 128321 ***
Comment 2 Daniel Veillard 2004-01-26 13:31:10 UTC
This should be closed in release of libxml2-2.6.5,
                                                                     
          
Daniel