Bug#505080: FTBFS with GCC 4.4: missing #include

Martin Michlmayr tbm at cyrius.com
Sun Nov 9 08:36:10 UTC 2008


Package: boswars
Version: 2.5-1
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-4.4
Tags: patch

Your package fails to build with the upcoming GCC 4.4.  Version 4.4
has not been released yet but I'm building with a snapshot in order
to find errors and give people an advance warning.

GCC 4.4 cleaned up some more C++ headers.  You always have to #include
headers directly and cannot rely for things to be included indirectly.

You can reproduce this problem with gcc-snapshot from unstable.

> Automatic build of boswars_2.5-1 on em64t by sbuild/amd64 0.53
...
> g++ -o build/release/pathfinder/astar.o -c -DSTRATAGUS_LIB_PATH=\"/usr/share/games/boswars\" -O2 -pipe -fomit-frame-pointer -fexpensive-optimizations -ffast-math -DUSE_VORBIS -DUSE_THEORA -DUSE_OGG -DHAVE_STRCASESTR -DHAVE_STRNLEN -DHAVE_X -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include -I/usr/include/lua5.1 -I/usr/include -I/usr/include/SDL -Iengine/include -Iengine/guichan/include engine/pathfinder/astar.cpp
> engine/pathfinder/astar.cpp: In function 'int AStarAddNode(int, int, int, int)':
> engine/pathfinder/astar.cpp:415: error: 'stderr' was not declared in this scope
> engine/pathfinder/astar.cpp:416: error: 'fprintf' was not declared in this scope
> engine/pathfinder/astar.cpp: In function 'void SetAStarFixedUnitCrossingCost(int)':
> engine/pathfinder/astar.cpp:1071: error: 'stderr' was not declared in this scope
> engine/pathfinder/astar.cpp:1071: error: 'fprintf' was not declared in this scope
> engine/pathfinder/astar.cpp: In function 'void SetAStarMovingUnitCrossingCost(int)':
> engine/pathfinder/astar.cpp:1081: error: 'stderr' was not declared in this scope
> engine/pathfinder/astar.cpp:1081: error: 'fprintf' was not declared in this scope
> engine/pathfinder/astar.cpp: In function 'void SetAStarUnknownTerrainCost(int)':
> engine/pathfinder/astar.cpp:1091: error: 'stderr' was not declared in this scope
> engine/pathfinder/astar.cpp:1091: error: 'fprintf' was not declared in this scope
> scons: *** [build/release/pathfinder/astar.o] Error 1
> scons: building terminated because of errors.

--- engine/pathfinder/astar.cpp~	2008-11-09 08:26:11.000000000 +0000
+++ engine/pathfinder/astar.cpp	2008-11-09 08:26:17.000000000 +0000
@@ -36,6 +36,7 @@
 #include "stratagus.h"
 #include "pathfinder.h"
 
+#include <cstdio>
 #include <cstdlib>
 
 /*----------------------------------------------------------------------------
--- engine/stratagus/translate.cpp~	2008-11-09 08:28:09.000000000 +0000
+++ engine/stratagus/translate.cpp	2008-11-09 08:28:17.000000000 +0000
@@ -34,6 +34,7 @@
 
 #include "stratagus.h"
 
+#include <cstdio>
 #include <map>
 #include <string>
 

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





More information about the Pkg-games-devel mailing list