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

Martin Michlmayr tbm at cyrius.com
Sun Nov 9 08:51:27 UTC 2008


Package: moagg
Version: 0.18-6
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 moagg_0.18-6 on em64t by sbuild/amd64 0.53
...
> x86_64-linux-gnu-g++ -O2 -Wall -ansi -pedantic -fstrict-aliasing -DNDEBUG -I. -IlibMoaggCore/include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -MD -MP -c libMoaggCore/src/System.cpp -o libMoaggCore/src/System.o
> libMoaggCore/src/System.cpp: In constructor 'File::PImpl::PImpl(const char*, const char*)':
> libMoaggCore/src/System.cpp:125: error: 'fopen' was not declared in this scope
> libMoaggCore/src/System.cpp: In destructor 'File::PImpl::~PImpl()':
> libMoaggCore/src/System.cpp:137: error: 'fclose' was not declared in this scope
> libMoaggCore/src/System.cpp: In member function 'bool File::PImpl::isEOF() const':
> libMoaggCore/src/System.cpp:150: error: 'feof' was not declared in this scope
> libMoaggCore/src/System.cpp: In member function 'void File::PImpl::seek(long int)':
> libMoaggCore/src/System.cpp:156: error: 'fseek' was not declared in this scope
> libMoaggCore/src/System.cpp: In member function 'long int File::PImpl::tell() const':
> libMoaggCore/src/System.cpp:166: error: 'ftell' was not declared in this scope
> libMoaggCore/src/System.cpp: In member function 'size_t File::PImpl::read(void*, size_t)':
> libMoaggCore/src/System.cpp:178: error: 'fread' was not declared in this scope
> libMoaggCore/src/System.cpp:181: error: 'ferror' was not declared in this scope
> libMoaggCore/src/System.cpp:184: error: 'clearerr' was not declared in this scope
> libMoaggCore/src/System.cpp: In member function 'size_t File::PImpl::write(const void*, size_t)':
> libMoaggCore/src/System.cpp:194: error: 'fwrite' was not declared in this scope
> libMoaggCore/src/System.cpp:197: error: 'ferror' was not declared in this scope
> libMoaggCore/src/System.cpp:200: error: 'clearerr' was not declared in this scope
> libMoaggCore/src/System.cpp: In member function 'int File::PImpl::puts(const char*)':
> libMoaggCore/src/System.cpp:210: error: 'fputs' was not declared in this scope
> libMoaggCore/src/System.cpp:211: error: 'EOF' was not declared in this scope
> libMoaggCore/src/System.cpp:213: error: 'ferror' was not declared in this scope
> libMoaggCore/src/System.cpp:216: error: 'clearerr' was not declared in this scope
> libMoaggCore/src/System.cpp: In member function 'void File::PImpl::readline(char*, size_t)':
> libMoaggCore/src/System.cpp:226: error: 'fgets' was not declared in this scope
> make[1]: *** [libMoaggCore/src/System.o] Error 1
> make[1]: Leaving directory `/build/tbm/moagg-0.18'

--- libMoaggCore/src/System.cpp~	2008-11-09 08:38:13.000000000 +0000
+++ libMoaggCore/src/System.cpp	2008-11-09 08:38:21.000000000 +0000
@@ -4,6 +4,7 @@
 #include <cerrno>
 #include <sstream>
 #include <list>
+#include <cstdio>
 #include <cstring>
 
 #include "Tools.h"
--- libMoaggGui/include/GuiException.h~	2008-11-09 08:41:03.000000000 +0000
+++ libMoaggGui/include/GuiException.h	2008-11-09 08:41:10.000000000 +0000
@@ -3,6 +3,8 @@
 
 #include "Exception.h"
 
+#include <cstdio>
+
 class GuiException : public Exception
 {
   public:
--- tools/modifymap.cpp~	2008-11-09 08:43:42.000000000 +0000
+++ tools/modifymap.cpp	2008-11-09 08:43:47.000000000 +0000
@@ -2,6 +2,7 @@
 #include <iostream>
 #include <memory>
 #include <list>
+#include <cstdio>
 #include <cstdlib>
 
 #include "Matrix.h"
--- tools/convertmap.cpp~	2008-11-09 08:44:24.000000000 +0000
+++ tools/convertmap.cpp	2008-11-09 08:44:29.000000000 +0000
@@ -3,6 +3,7 @@
 #include <memory>
 #include <list>
 #include <cassert>
+#include <cstdio>
 #include <cstdlib>
 
 #include "Matrix.h"

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





More information about the Pkg-games-devel mailing list