[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#417784: FTBFS with GCC 4.3: missing #includes

Package: xgsmlib
Version: 0.2-6
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

You can reproduce this problem with gcc-snapshot (20070326-1 or higher)
from unstable. (Currently not available for i386, but for amd64, powerpc
and ia64.  I hope to have i386 binaries in the archive in ~3 weeks.)

> Automatic build of xgsmlib_0.2-6 on coconut0 by sbuild/ia64 0.49
> 	ia64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -I/usr/include/gtk-1.2 -I/usr/lib/gtkmm/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/lib/sigc++-1.0/include -I/usr/include/sigc++-1.0 -D_REENTRANT   -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include  -g -O2 -c -o xgsm_util.o `test -f 'xgsm_util.cc' || echo './'`xgsm_util.cc
> In file included from /usr/lib/gcc-snapshot/lib/gcc/ia64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/backward/strstream:51,
>                  from xgsm_util.cc:22:
> /usr/lib/gcc-snapshot/lib/gcc/ia64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
> xgsm_util.cc: In function 'std::string Xgsm::homeDir()':
> xgsm_util.cc:63: error: 'getenv' was not declared in this scope
> make[3]: *** [xgsm_util.o] Error 1

--- src/xgsm_util.cc~	2007-04-04 14:47:50.000000000 +0000
+++ src/xgsm_util.cc	2007-04-04 14:47:58.000000000 +0000
@@ -20,6 +20,7 @@
 #include <pwd.h>
 #include <unistd.h>
 #include <strstream>
+#include <cstdlib>
 #include <iomanip>
 using namespace std;

Martin Michlmayr

Reply to: