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

Martin Michlmayr tbm at cyrius.com
Wed Nov 12 07:41:16 UTC 2008


Package: xmoto
Version: 0.4.2-3
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 xmoto_0.4.2-3 on em64t by sbuild/amd64 0.53
...
> if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"xmoto\" -DVERSION=\"0.4.2\" -D_GNU_SOURCE=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 -DXMOTO_LITTLE_ENDIAN=1 -DHAVE_SQLITE3_H=1 -DHAVE_LIBSQLITE3=1 -DHAVE_LIBZ=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBBZ2=1 -DHAVE_LIBGLU=1 -DHAVE_LIBSDL_MIXER=1 -DHAVE_LIBSDL_TTF=1 -DHAVE_PTHREAD=1 -DHAVE_LUA5_1_LUA_H=1 -DHAVE_LIBCURL=1 -DHAVE_VISIBILITY=1 -DHAVE_STDINT_H_WITH_UINTMAX=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DINTDIV0_RAISES_SIGFP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L__SNWPRINTF=0 -DHAVE_DECL_GETC_UNLOCKED=1 -DHAVE_LANGINFO_CODESET=1 -DHAVE_LC_MESSAGES=1 -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -I. -I.    -DNOMMGR -Wall -DGAMEDATADIR=\"/usr/share/games/xmoto\" -DLOCALESDIR=\"/usr/share/games/locale\" -DASIAN_TTF_FILE=\"/usr/share/fonts/truetype/arphic/bkai00mp.ttf\" -DALLOW_ZOOMING=0  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUSE_OPENGL=1 -DUSE_SDLGFX=0 -D'SVN_REV=""' -Wall -g -O2 -Wl,-z,defs -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -MT XMArgs.o -MD -MP -MF ".deps/XMArgs.Tpo" -c -o XMArgs.o XMArgs.cpp; \
> 	then mv -f ".deps/XMArgs.Tpo" ".deps/XMArgs.Po"; else rm -f ".deps/XMArgs.Tpo"; exit 1; fi
> XMArgs.cpp: In member function 'void XMArguments::parse(int, char**)':
> XMArgs.cpp:117: error: 'sscanf' was not declared in this scope
> XMArgs.cpp: In member function 'void XMArguments::help(const std::string&)':
> XMArgs.cpp:536: error: 'printf' was not declared in this scope
> make[2]: *** [XMArgs.o] Error 1
> make[2]: Leaving directory `/build/tbm/xmoto-0.4.2/src'

--- src/helpers/Text.cpp~	2008-11-12 07:23:06.000000000 +0000
+++ src/helpers/Text.cpp	2008-11-12 07:23:12.000000000 +0000
@@ -20,6 +20,8 @@
 
 #include "Text.h"
 
+#include <cstdio>
+
 std::string txtToLower(const std::string& i_str) {
     std::string v_res;
 
--- src/helpers/Log.cpp~	2008-11-12 07:26:06.000000000 +0000
+++ src/helpers/Log.cpp	2008-11-12 07:26:14.000000000 +0000
@@ -22,6 +22,7 @@
 #include "VExcept.h"
 #include "../VFileIO.h"
 #include "assert.h"
+#include <cstdio>
 #include <stdarg.h>
 
 bool  Logger::m_isInitialized = false;
--- src/XMArgs.cpp~	2008-11-12 07:21:08.000000000 +0000
+++ src/XMArgs.cpp	2008-11-12 07:21:16.000000000 +0000
@@ -23,6 +23,7 @@
 #include "XMBuild.h"
 #include "VFileIO.h"
 #include <sstream>
+#include <cstdio>
 #include <stdlib.h>
 
 XMArguments::XMArguments() {

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





More information about the Pkg-games-devel mailing list