[Debian-med-packaging] Bug#417729: FTBFS with GCC 4.3: missing #includes

Martin Michlmayr tbm at cyrius.com
Wed Apr 4 12:40:18 UTC 2007


Package: treeviewx
Version: 0.5.1-3
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. (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 treeviewx_0.5.1-3 on em64t by sbuild/amd64 0.53
...
> if x86_64-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"tv\" -DVERSION=\"0.5.1\" -DHAVE_LIBWX_GTK2U_SVG_2_6=1  -I. -I. -Igport     -g -O2 -Wno-deprecated -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA   -DUSE_WXWINDOWS -DUSE_SVG -MT TreeLib.o -MD -MP -MF ".deps/TreeLib.Tpo" -c -o TreeLib.o TreeLib.cpp; \
> 	then mv -f ".deps/TreeLib.Tpo" ".deps/TreeLib.Po"; else rm -f ".deps/TreeLib.Tpo"; exit 1; fi
> TreeLib.cpp: In member function 'virtual int Tree::Parse(const char*)':
> TreeLib.cpp:462: error: 'atof' was not declared in this scope
> TreeLib.cpp:561: error: 'atof' was not declared in this scope
> make[2]: *** [TreeLib.o] Error 1

--- TreeLib/TreeLib.cpp~	2007-04-04 12:30:13.000000000 +0000
+++ TreeLib/TreeLib.cpp	2007-04-04 12:30:19.000000000 +0000
@@ -23,6 +23,7 @@
 #include "TreeLib.h"
 #include "Parse.h"
 
+#include <cstdlib>
 #include <vector>
 
 
--- TreeLib/treereader.cpp~	2007-04-04 12:33:15.000000000 +0000
+++ TreeLib/treereader.cpp	2007-04-04 12:33:27.000000000 +0000
@@ -21,6 +21,7 @@
  // $Id: treereader.cpp,v 1.5 2003/09/10 12:58:16 rdmp1c Exp $
 
 #include "treereader.h"
+#include <cstdlib>
 
 #if __MWERKS__
 	#include <string.h>

-- 
Martin Michlmayr
http://www.cyrius.com/




More information about the Debian-med-packaging mailing list