[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



Package: mklibs
Version: 0.1.26
User: debian-gcc@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 mklibs_0.1.26 on em64t by sbuild/amd64 0.53
...
> mv -f .deps/elf.Tpo .deps/elf.Po
> x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../../src/mklibs-readelf     -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o ../../../src/mklibs-readelf/main.cpp
> ../../../src/mklibs-readelf/main.cpp: In function 'void usage(int)':
> ../../../src/mklibs-readelf/main.cpp:137: error: 'stderr' was not declared in this scope
> ../../../src/mklibs-readelf/main.cpp:137: error: 'fprintf' was not declared in this scope
> ../../../src/mklibs-readelf/main.cpp:140: error: 'stdout' was not declared in this scope
> ../../../src/mklibs-readelf/main.cpp:144: error: 'fprintf' was not declared in this scope
> ../../../src/mklibs-readelf/main.cpp:147: error: 'fputs' was not declared in this scope
> ../../../src/mklibs-readelf/main.cpp: In function 'int main(int, char**)':
> ../../../src/mklibs-readelf/main.cpp:199: error: 'stdout' was not declared in this scope
> ../../../src/mklibs-readelf/main.cpp:199: error: 'fputs' was not declared in this scope
> make[4]: *** [main.o] Error 1
> make[4]: Leaving directory `/build/tbm/mklibs-0.1.26/build-deb/src/mklibs-readelf'

--- src/mklibs-readelf/main.cpp~	2008-11-08 17:05:26.000000000 +0000
+++ src/mklibs-readelf/main.cpp	2008-11-08 17:05:31.000000000 +0000
@@ -1,5 +1,6 @@
 #include <config.h>
 
+#include <cstdio>
 #include <cstdlib>
 #include <iostream>
 #include <vector>

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



Reply to: