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

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



Package: soci
Version: 3.0.0+cvs20081223-2
User: debian-gcc@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 soci_3.0.0+cvs20081223-2 on em64t by sbuild/amd64 0.53
...
>  x86_64-linux-gnu-g++ -DPACKAGE_NAME=\"SOCI\" -DPACKAGE_TARNAME=\"soci\" -DPACKAGE_VERSION=\"3.0.0\" "-DPACKAGE_STRING=\"SOCI 3.0.0\"" -DPACKAGE_BUGREPORT=\"http://sourceforge.net/projects/soci\"; -DPACKAGE=\"soci\" -DVERSION=\"3.0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_BOOST=1 "-DHAVE_BOOST_DATE_TIME=/**/" -DHAVE_MYSQL=1 -DHAVE_POSTGRESQL=1 -DHAVE_SQLITE3=1 -I. -I. -UNDEBUG -U_DEBUG -fPIC -I/usr/include -O2 -g -O2 -Wall -pedantic -Wno-long-long -MT soci-simple.lo -MD -MP -MF .deps/soci-simple.Tpo -c soci-simple.cpp  -fPIC -DPIC -o .libs/soci-simple.o
> soci-simple.cpp: In function 'const char*<unnamed>::format_date(<unnamed>::statement_wrapper&, const tm&)':
> soci-simple.cpp:476: error: 'sprintf' was not declared in this scope
> soci-simple.cpp: In function 'bool<unnamed>::string_to_date(const char*, tm&, <unnamed>::statement_wrapper&)':
> soci-simple.cpp:492: error: 'sscanf' was not declared in this scope
> soci-simple.cpp: In function 'const char* soci_get_use_date(void*, const char*)':
> soci-simple.cpp:1514: error: 'sprintf' was not declared in this scope
> make[4]: *** [soci-simple.lo] Error 1

--- src/core/soci-simple.cpp~	2009-04-26 18:33:38.000000000 +0000
+++ src/core/soci-simple.cpp	2009-04-26 18:34:41.000000000 +0000
@@ -10,6 +10,8 @@
 #include "soci-simple.h"
 #include "soci.h"
 
+#include <cstdio>
+
 using namespace soci;
 
 

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



Reply to: