This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB build problem (XML parser)
On Fri, 2007-01-05 at 12:57 -0500, Daniel Jacobowitz wrote:
> On Fri, Jan 05, 2007 at 05:53:42PM +0000, Richard Earnshaw wrote:
> > My system has expat 1.95.5 installed on it. Unfortunately, this version
> > seems to lack XML_StopParser(), so a build of the current sources dies
> > with the following:
> >
> > cc1: warnings being treated as errors
> > /home/rearnsha/gnusrc/gcc-cross/trunk/gdb/xml-support.c: In function
> > `gdb_xml_start_element_wrapper':
> > /home/rearnsha/gnusrc/gcc-cross/trunk/gdb/xml-support.c:289: warning:
> > implicit declaration of function `XML_StopParser'
>
> D'oh! I guess there are two options: update the configure check to
> test for XML_StopParser, or avoid using it. I've got no opinion
> which is better.
>
While I'd quite like to have the XML support code, I don't need it for
my current testing. I've not studied expat enough to be sure how to
re-write the source code, so here's a patch that changes configure to
test for what we currently need. This patch is redundant if the sources
are fixed.
I don't currently have autoconf-2.59 on my machine, so I've tested this
by cut-n-paste. It might be wise for someone with the right autoconf
version to verify this patch and then apply it if appropriate.
2007-01-08 Richard Earnshaw <rearnsha@arm.com>
* configure (expat): Test for XML_StopParser.
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.38
diff -u -r1.38 configure.ac
--- configure.ac 4 Jan 2007 19:42:10 -0000 1.38
+++ configure.ac 8 Jan 2007 16:08:20 -0000
@@ -322,7 +322,7 @@
fi
AC_LIB_HAVE_LINKFLAGS([expat], [], [#include "expat.h"],
- [XML_Parser p = XML_ParserCreate (0);])
+ [enum XML_Status s = XML_StopParser (0,0);])
if test "$HAVE_LIBEXPAT" != yes; then
AC_MSG_WARN([expat is missing or unusable; some features may be disabled.])
fi