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

Martin Michlmayr tbm at cyrius.com
Sat Nov 8 08:31:22 UTC 2008


Package: libspiff
Version: 0.8.3-1
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 libspiff_0.8.3-1 on em64t by sbuild/amd64 0.53
...
>  g++ -DHAVE_CONFIG_H -I. -I.. -I./test/CppTest -I../include -I/usr/include -g -O2 -MT src/SpiffPropsWriter.lo -MD -MP -MF src/.deps/SpiffPropsWriter.Tpo -c ../src/SpiffPropsWriter.cpp  -fPIC -DPIC -o src/.libs/SpiffPropsWriter.o
> ../src/SpiffPropsWriter.cpp: In member function 'void Spiff::SpiffPropsWriter::writeDate()':
> ../src/SpiffPropsWriter.cpp:213: error: '::snprintf' has not been declared
> ../src/SpiffPropsWriter.cpp: In member function 'void Spiff::SpiffPropsWriter::writePlaylistOpen()':
> ../src/SpiffPropsWriter.cpp:278: error: '::snprintf' has not been declared
> make[1]: *** [src/SpiffPropsWriter.lo] Error 1
> make[1]: Leaving directory `/build/tbm/libspiff-0.8.3/obj-x86_64-linux-gnu'
> make: *** [build-stamp] Error 2
> dpkg-buildpackage: failure: debian/rules build gave error exit status 2

--- src/SpiffPropsWriter.cpp~	2008-11-08 08:24:53.000000000 +0000
+++ src/SpiffPropsWriter.cpp	2008-11-08 08:25:00.000000000 +0000
@@ -43,6 +43,7 @@
  * Implementation of SpiffPropsWriter.
  */
 
+#include <cstdio>
 #include <cstdlib>
 #include <spiff/SpiffPropsWriter.h>
 #include <spiff/SpiffProps.h>
--- src/SpiffWriter.cpp~	2008-11-08 08:25:24.000000000 +0000
+++ src/SpiffWriter.cpp	2008-11-08 08:25:46.000000000 +0000
@@ -43,6 +43,7 @@
  * Implementation of SpiffWriter.
  */
 
+#include <cstdio>
 #include <spiff/SpiffWriter.h>
 #include <spiff/SpiffXmlFormatter.h>
 #include <spiff/SpiffTrackWriter.h>
--- src/SpiffXmlFormatter.cpp~	2008-11-08 08:26:01.000000000 +0000
+++ src/SpiffXmlFormatter.cpp	2008-11-08 08:26:08.000000000 +0000
@@ -45,6 +45,7 @@
 
 #include <spiff/SpiffXmlFormatter.h>
 #include <spiff/SpiffToolbox.h>
+#include <cstdio>
 #include <sstream>
 using namespace std;
 using namespace Spiff::Toolbox;

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





More information about the pkg-xiph-maint mailing list