[Pkg-scicomp-devel] Bug#420922: FTBFS with GCC 4.3: missing #includes

Martin Michlmayr tbm at cyrius.com
Wed Apr 25 12:03:04 UTC 2007


Package: freefem3d
Version: 1.0pre9-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. (Currently not available for i386, but for amd64, powerpc
and ia64.  I hope to have i386 binaries in the archive in the near
future.)

> Automatic build of freefem3d_1.0pre9-1 on coconut0 by sbuild/ia64 0.49
...
> ../geometry/Scene.hpp:85: warning: type qualifiers ignored on function return type
> parse.pov.yy: In function 'int povparse()':
> parse.pov.yy:198: error: 'exit' is not a member of 'std'
> parse.pov.yy:248: error: 'exit' is not a member of 'std'
> y.tab.c:2708: warning: deprecated conversion from string constant to 'char*'
> y.tab.c:2854: warning: deprecated conversion from string constant to 'char*'
> make[4]: *** [parse.pov.o] Error 1

--- utils/StaticCenter.cpp~	2007-04-25 11:55:12.000000000 +0000
+++ utils/StaticCenter.cpp	2007-04-25 11:55:19.000000000 +0000
@@ -18,6 +18,7 @@
 //  $Id: StaticCenter.cpp,v 1.7 2006/05/20 15:23:48 delpinux Exp $
 
 #include <StaticCenter.hpp>
+#include <cstdlib>
 #include <iostream>
 
 #include <StreamCenter.hpp>
--- language/parse.pov.yy~	2007-04-25 11:07:34.000000000 +0000
+++ language/parse.pov.yy	2007-04-25 11:07:46.000000000 +0000
@@ -24,6 +24,7 @@
 
 #define YYDEBUG 1
 
+#include <cstdlib>
 #include <sstream>
 
 #include <iostream>
--- language/FFLexer.cpp~	2007-04-25 11:09:18.000000000 +0000
+++ language/FFLexer.cpp	2007-04-25 11:09:29.000000000 +0000
@@ -69,6 +69,7 @@
 
 #include <parse.ff.h>
 
+#include <cstdlib>
 #include <cctype>
 
 #include <FFLexer.hpp>
--- language/PDEOperatorExpression.hpp~	2007-04-25 11:09:46.000000000 +0000
+++ language/PDEOperatorExpression.hpp	2007-04-25 11:11:28.000000000 +0000
@@ -32,6 +32,8 @@
 
 #include <ErrorHandler.hpp>
 
+#include <limits>
+
 class PDEOperator;
 
 class PDEOperatorExpression
--- solver/SurfElem.hpp~	2007-04-25 11:13:07.000000000 +0000
+++ solver/SurfElem.hpp	2007-04-25 11:13:19.000000000 +0000
@@ -24,6 +24,8 @@
 
 #include <Cell.hpp>
 
+#include <limits>
+
 /**
  * @file   SurfElem.hpp
  * @author Stephane Del Pino
--- solver/ConnectivityBuilder.hpp~	2007-04-25 11:33:17.000000000 +0000
+++ solver/ConnectivityBuilder.hpp	2007-04-25 11:33:51.000000000 +0000
@@ -21,6 +21,7 @@
 #define CONNECTIVITY_BUILDER_HPP
 
 #include <set>
+#include <limits>
 #include <list>
 #include <map>
 
--- solver/ScalarFunctionMaxComputer.cpp~	2007-04-25 11:39:37.000000000 +0000
+++ solver/ScalarFunctionMaxComputer.cpp	2007-04-25 11:39:45.000000000 +0000
@@ -22,6 +22,8 @@
 #include <Mesh.hpp>
 #include <ScalarFunctionBase.hpp>
 
+#include <limits>
+
 ScalarFunctionMaxComputer::
 ScalarFunctionMaxComputer(ConstReferenceCounting<Mesh> mesh,
 			  ConstReferenceCounting<ScalarFunctionBase> function)
--- solver/ScalarFunctionMinComputer.cpp~	2007-04-25 11:40:50.000000000 +0000
+++ solver/ScalarFunctionMinComputer.cpp	2007-04-25 11:41:21.000000000 +0000
@@ -22,6 +22,8 @@
 #include <Mesh.hpp>
 #include <ScalarFunctionBase.hpp>
 
+#include <limits>
+
 ScalarFunctionMinComputer::
 ScalarFunctionMinComputer(ConstReferenceCounting<Mesh> mesh,
 			  ConstReferenceCounting<ScalarFunctionBase> function)
--- solver/SurfaceMeshGenerator.cpp~	2007-04-25 11:47:15.000000000 +0000
+++ solver/SurfaceMeshGenerator.cpp	2007-04-25 11:47:42.000000000 +0000
@@ -55,6 +55,7 @@
 #include <iostream>
 #include <fstream>
 #include <stack>
+#include <algorithm>
 
 
 inline double SDet(const Vertex & V1, const Vertex & V2, const Vertex & V3) {
--- solver/triangulation.hpp~	2007-04-25 11:49:07.000000000 +0000
+++ solver/triangulation.hpp	2007-04-25 11:49:37.000000000 +0000
@@ -20,6 +20,7 @@
 #ifndef TRIANGULATION_HPP
 #define TRIANGULATION_HPP
 
+#include <cstdlib>
 #include <ostream>
 #include <vector>
 #include <list>

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




More information about the Pkg-scicomp-devel mailing list