Project

General

Profile

Bug #591

FTBFS with GCC 4.4: missing #include

Added by Mark Purcell almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Category:
build
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

From: Martin Michlmayr <>
To:
Subject: FTBFS with GCC 4.4: missing #include
Date: Sat, 8 Nov 2008 18:08:48 +0100

Package: exiv2
Version: 0.17.1-1
User:
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 exiv2_0.17.1-1 on em64t by sbuild/amd64 0.53

...

mkdir .libs
g++ -g -O2 -g -Wall -O2 -Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -Woverloaded-virtual -W -I. -DEXV_LOCALEDIR=\"/usr/share/locale\" -I../include -funsigned-char -DNDEBUG=1 -c XMPMeta.cpp -fPIC -DPIC -o .libs/XMPMeta.o
XMPMeta.cpp: In function 'XMP_Status DumpNodeOptions(XMP_OptionBits, XMP_Status ()(void, const char*, XMP_StringLen), void*)':
XMPMeta.cpp:177: error: 'snprintf' was not declared in this scope
XMPMeta.cpp: In function 'XMP_Status DumpPropertyTree(const XMP_Node*, int, size_t, XMP_Status ()(void, const char*, XMP_StringLen), void*)':
XMPMeta.cpp:217: error: 'snprintf' was not declared in this scope
XMPMeta.cpp: In static member function 'static bool XMPMeta::Initialize()':
XMPMeta.cpp:576: warning: unused variable 'flag'
XMPMeta.cpp: In static member function 'static bool XMPMeta::RegisterNamespace(const char*, const char*, const char**, XMP_StringLen*)':
XMPMeta.cpp:900: error: 'snprintf' was not declared in this scope
make2: *** [XMPMeta.o] Error 1
make2: Leaving directory `/build/tbm/exiv2-0.17.1/xmpsdk/src'

--- xmpsdk/src/XMPMeta.cpp~ 2008-11-08 16:38:20.000000000 0000
++ xmpsdk/src/XMPMeta.cpp 2008-11-08 16:38:35.000000000 +0000
@ -20,6 +20,8 @
#include "UnicodeInlines.incl_cpp"
#include "UnicodeConversions.hpp"

#include <cstdio>

#if XMP_DebugBuild
#include <iostream>
#endif
--- src/value.cpp~ 2008-11-08 17:01:40.000000000 0000
++ src/value.cpp 2008-11-08 17:01:55.000000000 0000
@ -43,6 +43,7 @
#include <cassert>
#include <cstring>
#include <ctime>
#include <cstdio>
#include <cstdlib>
#include <ctype.h>

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

Additional information:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505023

History

#2

Updated by Andreas Huggel almost 13 years ago

  • % Done changed from 0 to 100
#3

Updated by Andreas Huggel almost 13 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF