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

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

Package: achilles
Version: 2-7
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

> Automatic build of achilles_2-7 on coconut0 by sbuild/ia64 0.49
> c++ -DHAVE_CONFIG_H -I. -I. -I.     -Wall -g -O2 -c gene.cc
> gene.cc: In constructor 'GeneClass::GeneClass()':
> gene.cc:31: error: 'rand' was not declared in this scope
> gene.cc: In constructor 'GeneClass::GeneClass(GeneClass&, GeneClass&)':
> gene.cc:38: error: 'rand' was not declared in this scope
> gene.cc:38: error: 'RAND_MAX' was not declared in this scope
> make[1]: *** [gene.o] Error 1
> make[1]: Leaving directory `/build/tbm/achilles-2'
> make: *** [build-stamp] Error 2

--- gene.cc~	2007-04-01 13:58:24.000000000 +0000
+++ gene.cc	2007-04-01 13:58:35.000000000 +0000
@@ -24,6 +24,7 @@
 GeneClass::GeneClass() { // randomly generate one
   int i;

Martin Michlmayr

Reply to: