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 510053 - FTBFS with GCC 4.3: missing #includes
FTBFS with GCC 4.3: missing #includes
Status: RESOLVED FIXED
Product: libxml++
Classification: Bindings
Component: Build
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: Christophe de Vienne
Christophe de Vienne
Depends on:
Blocks:
 
 
Reported: 2008-01-17 02:46 UTC by Deng Xiyue
Modified: 2008-01-17 09:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
10_gcc4.3_include_fix.patch (528 bytes, patch)
2008-01-17 02:48 UTC, Deng Xiyue
none Details | Review

Description Deng Xiyue 2008-01-17 02:46:02 UTC
(Originally submitted by Martin Michlmayr <tbm@cyrius.com> at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=417367)

Package: libxml++2.6
Version: 2.14.0-0.1
Usertags: ftbfs-gcc-4.3
Tags: patch

Your package fails to build with GCC 4.3.  Version 4.3 has not been
released yet but I'm building with a snapshot in order to find errors
and give people an advance warning.  In GCC 4.3, the C++ header
dependencies have been cleaned up.  The advantage of this is that
programs will compile faster.  The downside is that you actually
need to directly #include everything you use (but you really should
do this anyway, otherwise your program won't work with any compiler
other than GCC).  Some background of this can be found at
http://gcc.gnu.org/PR28080

You can reproduce this problem with gcc-snapshot (20070326-1 or higher)
from unstable.

> Automatic build of libxml++2.6_2.14.0-0.1 on coconut0 by sbuild/ia64 0.49
...
>  g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libxml++\" -DVERSION=\"2.14.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_STRING=1 -DHAVE_LIST=1 -DHAVE_MAP=1 -I. -I. -I../.. -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c parser.cc  -fPIC -DPIC -o .libs/parser.o
> parser.cc: In member function 'virtual void xmlpp::Parser::check_for_exception()':
> parser.cc:197: error: 'auto_ptr' is not a member of 'std'
> parser.cc:197: error: expected primary-expression before '>' token
> parser.cc:197: error: 'tmp' was not declared in this scope
> make[3]: *** [parser.lo] Error 1

--- libxml++/parsers/parser.cc~	2007-04-02 13:06:44.000000000 +0000
+++ libxml++/parsers/parser.cc	2007-04-02 13:06:59.000000000 +0000
@@ -9,6 +9,7 @@
 #include <libxml/parser.h>
 
 #include <cstdarg> //For va_list.
+#include <memory> //For auto_ptr.
 
 namespace xmlpp {
 
--- libxml++/parsers/textreader.h~	2007-04-02 13:08:26.000000000 +0000
+++ libxml++/parsers/textreader.h	2007-04-02 13:08:33.000000000 +0000
@@ -12,6 +12,8 @@
 
 #include <glibmm/ustring.h>
 
+#include <memory>
+
 extern "C"
 {
   struct _xmlTextReader;

-- 
Martin Michlmayr
http://www.cyrius.com/
Comment 1 Deng Xiyue 2008-01-17 02:48:11 UTC
Created attachment 103033 [details] [review]
10_gcc4.3_include_fix.patch
Comment 2 Murray Cumming 2008-01-17 09:25:25 UTC
Committed. Thanks. Please patch the ChangeLog in future.