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

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



Package: u++
Version: 5.3.0-1.1
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 u++_5.3.0-1.1 on em64t by sbuild/amd64 0.53
...
> g++ -I. -D__pc__ -D__linux__ -D__x86_64__ -DPACKAGE=\"/build/tbm/u++-5.3.0\" -DVERSION=\"5.3.0\" -DTVENDOR=\"pc\" -DTCPU=\"x86_64\" -DTOS=\"linux\" -DINSTALLBINDIR=\"/usr/bin\" -DINSTALLLIBDIR=\"/usr/lib/u++\" -DINSTALLINCDIR=\"/usr/include/u++\" -DTMPDIR=\"/tmp\" -DMULTI=\"TRUE\" -DCCAPP=\"g++\" -D__U_MAXENTRYBITS__=128 -DTLS -O2  -MD /build/tbm/u++-5.3.0/src/translator/gen.cc -c -o /build/tbm/u++-5.3.0/src/translator/obj-linux-x86_64/gen.o
> /build/tbm/u++-5.3.0/src/translator/gen.cc: In function 'void gen_mask(token_t*, unsigned int)':
> /build/tbm/u++-5.3.0/src/translator/gen.cc:134: error: 'sprintf' was not declared in this scope
> /build/tbm/u++-5.3.0/src/translator/gen.cc:140: error: 'sprintf' was not declared in this scope
> /build/tbm/u++-5.3.0/src/translator/gen.cc: In function 'void gen_entry(token_t*, unsigned int)':
> /build/tbm/u++-5.3.0/src/translator/gen.cc:149: error: 'sprintf' was not declared in this scope
> /build/tbm/u++-5.3.0/src/translator/gen.cc:155: error: 'sprintf' was not declared in this scope
> make[2]: *** [/build/tbm/u++-5.3.0/src/translator/obj-linux-x86_64/gen.o] Error 1
> make[2]: Leaving directory `/build/tbm/u++-5.3.0/src/translator'
> + cd /build/tbm/u++-5.3.0/src/collection

--- src/translator/gen.cc~	2008-11-08 16:33:44.000000000 +0000
+++ src/translator/gen.cc	2008-11-08 16:33:51.000000000 +0000
@@ -33,6 +33,7 @@
 #include "input.h"
 #include "gen.h"
 
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
 
--- src/translator/input.cc~	2008-11-08 16:34:07.000000000 +0000
+++ src/translator/input.cc	2008-11-08 16:34:16.000000000 +0000
@@ -29,6 +29,7 @@
 #include "token.h"
 #include "input.h"
 
+#include <cstdio>
 #include <cstdlib>
 #include <iostream>
 
--- src/translator/output.cc~	2008-11-08 16:34:31.000000000 +0000
+++ src/translator/output.cc	2008-11-08 16:34:40.000000000 +0000
@@ -32,6 +32,7 @@
 #include "input.h"
 #include "output.h"
 
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
 
--- src/translator/parse.cc~	2008-11-08 16:35:10.000000000 +0000
+++ src/translator/parse.cc	2008-11-08 16:35:16.000000000 +0000
@@ -39,6 +39,7 @@
 #include "parse.h"
 #include "gen.h"
 
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
 #include <set>

P.S. I wasn't able to build this package 'til the end, so it's
possible there are other issues not fixed by this patch.
-- 
Martin Michlmayr
http://www.cyrius.com/



Reply to: