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

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

Package: late
Version: 0.1.0-9
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 from unstable.

> Automatic build of late_0.1.0-9 on coconut0 by sbuild/ia64 0.49
> if ia64-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"late\" -DVERSION=\"0.1.0\" -DX_DISPLAY_MISSING=1 -DHAVE_LIBSDL_IMAGE=1 -DHAVE_LIBSTDC__=1  -I. -I.  -Wall -DDATADIR=\"/usr/share/games/late\" -DLOCALSTATEDIR=\"/usr/var\"   -Wall -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -MT init.o -MD -MP -MF ".deps/init.Tpo" \
> 	  -c -o init.o `test -f 'init.cpp' || echo './'`init.cpp; \
> 	then mv -f ".deps/init.Tpo" ".deps/init.Po"; \
> 	else rm -f ".deps/init.Tpo"; exit 1; \
> 	fi
> init.cpp: In function 'int main(int, char**)':
> init.cpp:196: error: 'exit' was not declared in this scope

--- src/init.cpp~	2007-04-02 10:22:19.000000000 +0000
+++ src/init.cpp	2007-04-02 10:22:27.000000000 +0000
@@ -24,6 +24,7 @@
 #include "graphics.h"
 #include "arch.h"
 #include "scorescreen.h"
+#include <cstdlib>
 #include <fstream>
 #include <iostream>
 using namespace std; 

Martin Michlmayr

Reply to: