[DebianGIS-dev] Bug#526204: FTBFS with GCC 4.4: missing #include

Martin Michlmayr tbm at cyrius.com
Wed Apr 29 20:54:23 UTC 2009


Package: grass
Version: 6.4.0~rc4-1
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-4.4
Tags: patch

Your package fails to build with GCC 4.4, which has 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 or
gcc-4.4 from experimental.

> Automatic build of grass_6.4.0~rc4-1 on em64t by sbuild/amd64 0.53
...
> c++ -I/build/tbm/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/include  -g -O2      -DPACKAGE=\""grassmods"\"  -I/build/tbm/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/include -o OBJ.x86_64-pc-linux-gnu/Output.o -c Output.cpp
> In file included from Output.cpp:1:
> Output.h: In static member function 'static void Output::Begin()':
> Output.h:17: error: 'stderr' was not declared in this scope
> Output.h:17: error: 'fprintf' was not declared in this scope
> Output.h: In static member function 'static void Output::Print(std::string)':
> Output.h:24: error: 'stderr' was not declared in this scope
> Output.h:24: error: 'fprintf' was not declared in this scope
> Output.h: In static member function 'static void Output::Repeat(int, char)':
> Output.h:31: error: 'stderr' was not declared in this scope
> Output.h:31: error: 'fprintf' was not declared in this scope
> Output.h: In static member function 'static void Output::End()':
> Output.h:40: error: 'stderr' was not declared in this scope
> Output.h:40: error: 'fprintf' was not declared in this scope
> Output.h: In static member function 'static void Output::Position(unsigned int)':
> Output.h:48: error: 'stderr' was not declared in this scope
> Output.h:48: error: 'fprintf' was not declared in this scope
> make[3]: *** [OBJ.x86_64-pc-linux-gnu/Output.o] Error 1
> make[3]: Leaving directory `/build/tbm/grass-6.4.0~rc4/imagery/i.atcorr'

--- imagery/i.atcorr/Output.h~	2009-04-29 20:49:42.000000000 +0000
+++ imagery/i.atcorr/Output.h	2009-04-29 20:49:50.000000000 +0000
@@ -1,6 +1,7 @@
 #ifndef MY_OUTPUT_H
 #define MY_OUTPUT_H
 
+#include <cstdio>
 #include <iostream>
 #include <sstream>
 #include <string>

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





More information about the Pkg-grass-devel mailing list