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

Martin Michlmayr tbm at cyrius.com
Wed Apr 4 10:28:45 UTC 2007


Package: scorched3d
Version: 40.1d.dfsg-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 ~3 weeks.)

> Automatic build of scorched3d_40.1d.dfsg-1 on coconut0 by sbuild/ia64 0.49
...
> 	ia64-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"scorched3d\" -DVERSION=\"40\" -DHAVE_OGG=1 -DHAVE_VSNPRINTF=1 -DHAVE_SNPRINTF=1 -DHAVE_VASPRINTF=1 -DHAVE_ASPRINTF=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1  -I. -I. -I../porting -I..   -I/usr/X11R6/include -I/usr/X11R6 -I/usr/local/include -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  -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT    -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 -I/usr/include -I/usr/include -I/usr/include/freetype2 -DS3D_DOCDIR=\"/usr/share/doc/scorched3d\" -DS3D_DATADIR=\"/usr/share/games/scorched3d\" -DS3D_BINDIR=\"/usr/games\" -DdDOUBLE -c -o main.o `test -f 'main.cpp' || echo './'`main.cpp
> main.cpp: In function 'void _no_storage()':
> main.cpp:105: error: 'exit' is not a member of 'std'
> make[3]: *** [main.o] Error 1

--- src/boids/BoidWorld.h~	2007-04-04 10:13:00.000000000 +0000
+++ src/boids/BoidWorld.h	2007-04-04 10:13:27.000000000 +0000
@@ -23,6 +23,7 @@
 
 #include <vector>
 #include <list>
+#include <string>
 #include <common/Vector.h>
 
 class SoundBuffer;
--- src/scorched/main.cpp~	2007-04-04 10:09:06.000000000 +0000
+++ src/scorched/main.cpp	2007-04-04 10:09:26.000000000 +0000
@@ -34,6 +34,7 @@
 #include <common/Defines.h>
 #include <common/OptionsTransient.h>
 #include <scorched/MainDialog.h>
+#include <cstdlib>
 #include <locale.h>
 #include <math.h>
 #include <signal.h>
--- src/tankai/TankAIComputerTarget.cpp~	2007-04-04 10:18:40.000000000 +0000
+++ src/tankai/TankAIComputerTarget.cpp	2007-04-04 10:18:49.000000000 +0000
@@ -23,6 +23,7 @@
 #include <tank/TankContainer.h>
 #include <server/ScorchedServer.h>
 #include <common/DefinesMath.h>
+#include <climits>
 
 TankAIComputerTarget::TankAIComputerTarget()
 {

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




More information about the Pkg-games-devel mailing list