[Pkg-kde-extras] Bug#505624: FTBFS with GCC 4.4: missing #include

Martin Michlmayr tbm at cyrius.com
Thu Nov 13 21:45:07 UTC 2008


Package: strigi
Version: 0.5.11-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 strigi_0.5.11-1 on em64t by sbuild/amd64 0.53
...
> cd /build/tbm/strigi-0.5.11/obj-x86_64-linux-gnu/src/streamanalyzer && /usr/lib/gcc-snapshot/bin/g++   -DHAVE_CONFIG_H -DMAKE_STREAMANALYZER_LIB -g -O2 -g -Wall -O2 -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-check-new -fno-common -fexceptions -Wno-unused-parameter -fvisibility=hidden -fvisibility-inlines-hidden -O2 -g -fPIC -I/build/tbm/strigi-0.5.11/obj-x86_64-linux-gnu/src/streamanalyzer -I/build/tbm/strigi-0.5.11/src/streamanalyzer -I/build/tbm/strigi-0.5.11 -I/build/tbm/strigi-0.5.11/obj-x86_64-linux-gnu -I/build/tbm/strigi-0.5.11/src/streamanalyzer/. -I/build/tbm/strigi-0.5.11/src/streamanalyzer/../streams -I/build/tbm/strigi-0.5.11/src/streamanalyzer/../streams/pdf -I/build/tbm/strigi-0.5.11/src/streamanalyzer/endanalyzers -I/usr/include/libxml2 -I/build/tbm/strigi-0.5.11/obj-x86_64-linux-gnu/src/streams -I/build/tbm/strigi-0.5.11/src/streams/strigi   -fPIC -o CMakeFiles/streamanalyzer.dir/indexpluginloader.o -c /build/tbm/strigi-0.5.11/src/streamanalyzer/indexpluginloader.cpp
> /build/tbm/strigi-0.5.11/src/streamanalyzer/indexpluginloader.cpp: In member function 'void<unnamed>::ModuleList::loadModule(const std::string&, const std::string&)':
> /build/tbm/strigi-0.5.11/src/streamanalyzer/indexpluginloader.cpp:151: error: 'stderr' was not declared in this scope
> /build/tbm/strigi-0.5.11/src/streamanalyzer/indexpluginloader.cpp:151: error: 'fprintf' was not declared in this scope
> /build/tbm/strigi-0.5.11/src/streamanalyzer/indexpluginloader.cpp:162: error: 'stderr' was not declared in this scope
> /build/tbm/strigi-0.5.11/src/streamanalyzer/indexpluginloader.cpp:162: error: 'fprintf' was not declared in this scope
> make[3]: *** [src/streamanalyzer/CMakeFiles/streamanalyzer.dir/indexpluginloader.o] Error 1
> make[3]: Leaving directory `/build/tbm/strigi-0.5.11/obj-x86_64-linux-gnu'
> make[2]: *** [src/streamanalyzer/CMakeFiles/streamanalyzer.dir/all] Error 2

--- src/daemon/dbus/dbuscpp/dbusmessagereader.h~	2008-11-13 21:29:47.000000000 +0000
+++ src/daemon/dbus/dbuscpp/dbusmessagereader.h	2008-11-13 21:34:40.000000000 +0000
@@ -27,6 +27,10 @@
 #include <map>
 #include <string>
 #include <vector>
+#include <strigi/strigiconfig.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
 
 class DBusMessageReader {
 private:
--- src/daemon/dbus/dbuscpp/dbusmessagewriter.h~	2008-11-13 21:33:42.000000000 +0000
+++ src/daemon/dbus/dbuscpp/dbusmessagewriter.h	2008-11-13 21:33:56.000000000 +0000
@@ -24,6 +24,7 @@
 #include <set>
 #include <map>
 #include <vector>
+#include <strigi/strigiconfig.h>
 #ifdef HAVE_STDINT_H
 #include <stdint.h>
 #endif
--- src/luceneindexer/luceneindexer.cpp~	2008-11-13 21:27:36.000000000 +0000
+++ src/luceneindexer/luceneindexer.cpp	2008-11-13 21:27:42.000000000 +0000
@@ -21,6 +21,7 @@
 #include "diranalyzer.h"
 #include "indexpluginloader.h"
 #include "analyzerconfiguration.h"
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
 #include <iostream>
--- src/streamanalyzer/indexpluginloader.cpp~	2008-11-13 21:20:05.000000000 +0000
+++ src/streamanalyzer/indexpluginloader.cpp	2008-11-13 21:20:10.000000000 +0000
@@ -20,6 +20,7 @@
 #include "indexpluginloader.h"
 #include "indexmanager.h"
 #include <iostream>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stgdirent.h>


The #include <strigi/strigiconfig.h> in
src/daemon/dbus/dbuscpp/dbusmessagewriter.h is needed because
otherwise HAVE_STDINT_H is not defined, the header won't be included
and it won't know uint32_t.   Similar for
src/daemon/dbus/dbuscpp/dbusmessagereader.h
-- 
Martin Michlmayr
http://www.cyrius.com/





More information about the pkg-kde-extras mailing list