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 128321 - Is there a hash.h/parser.h chicken-egg problem?
Is there a hash.h/parser.h chicken-egg problem?
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.2
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
: 128684 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-12-01 22:17 UTC by Mike Castle
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike Castle 2003-12-01 22:17:25 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.
Comment 1 John Fleck 2003-12-01 22:53:33 UTC
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>
Comment 2 John Fleck 2003-12-06 23:08:19 UTC
*** Bug 128684 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Veillard 2004-01-26 13:28:14 UTC
This should be closed in release of libxml2-2.6.5,
                                                                     
          
Daniel