Bug#417706: FTBFS with GCC 4.3: missing #includes

2007-10-23 Thread Nicolas Duboc
tags 417706 + pending
thanks

On Tue, Jul 10, 2007 at 10:10:00AM +0200, Nicolas Duboc wrote:
 On Wed, Apr 04, 2007 at 01:32:23PM +0200, Martin Michlmayr wrote:
  Your package fails to build with GCC 4.3.  Version 4.3 has not been
  released yet but I'm building with a snapshot in order to find errors
  and give people an advance warning.
 
   Martin,
 
  I have just forwarded this bug to the upstream developer.
 
  I will wait to see if he releases soon a new version of spamprobe
 including this fix. If he doesn't before GCC 4.3 hits unstable, I will
 include this patch in my Debian package.

  I have just fixed this issue in my source repository of spamprobe
package. The upstream author seems to have been missing in action for
some months.

  I actually applied the patch attached here instead of your patch. It
didn't fixed all problems in version 1.4d.

  Thanks,

-- 
Nicolas Duboc [EMAIL PROTECTED]
diff -ur -x '*~' spamprobe-1.4d.orig/src/database/DatabaseConfig.cc spamprobe-1.4d-dev/src/database/DatabaseConfig.cc
--- spamprobe-1.4d.orig/src/database/DatabaseConfig.cc	2006-11-17 08:24:48.0 +0100
+++ spamprobe-1.4d-dev/src/database/DatabaseConfig.cc	2007-07-09 17:58:18.0 +0200
@@ -29,6 +29,7 @@
 //
 
 #include stdexcept
+#include cstdlib
 #include File.h
 #include WordData.h
 #include FrequencyDBImpl.h
diff -ur -x '*~' spamprobe-1.4d.orig/src/hdl/HdlTokenizer.cc spamprobe-1.4d-dev/src/hdl/HdlTokenizer.cc
--- spamprobe-1.4d.orig/src/hdl/HdlTokenizer.cc	2006-11-17 08:24:48.0 +0100
+++ spamprobe-1.4d-dev/src/hdl/HdlTokenizer.cc	2007-07-09 18:12:33.0 +0200
@@ -28,6 +28,7 @@
 //http://www.cooldevtools.com/qpl.html
 //
 
+#include cstdlib
 #include AbstractCharReader.h
 #include HdlError.h
 #include HdlToken.h
diff -ur -x '*~' spamprobe-1.4d.orig/src/includes/MultiLineSubString.h spamprobe-1.4d-dev/src/includes/MultiLineSubString.h
--- spamprobe-1.4d.orig/src/includes/MultiLineSubString.h	2006-11-17 08:24:48.0 +0100
+++ spamprobe-1.4d-dev/src/includes/MultiLineSubString.h	2007-07-09 18:01:10.0 +0200
@@ -31,6 +31,7 @@
 #ifndef _MultiLineSubString_h
 #define _MultiLineSubString_h
 
+#include climits
 #include AbstractMultiLineString.h
 
 class MultiLineSubString : public AbstractMultiLineString
diff -ur -x '*~' spamprobe-1.4d.orig/src/includes/util.h spamprobe-1.4d-dev/src/includes/util.h
--- spamprobe-1.4d.orig/src/includes/util.h	2006-11-17 08:24:49.0 +0100
+++ spamprobe-1.4d-dev/src/includes/util.h	2007-07-09 17:57:21.0 +0200
@@ -42,6 +42,7 @@
 #include cassert
 #include iostream
 #include cstdio
+#include cstring
 #include Ptr.h
 #include Ref.h
 
diff -ur -x '*~' spamprobe-1.4d.orig/src/parser/AutoTrainMailMessageReader.cc spamprobe-1.4d-dev/src/parser/AutoTrainMailMessageReader.cc
--- spamprobe-1.4d.orig/src/parser/AutoTrainMailMessageReader.cc	2006-11-17 08:24:49.0 +0100
+++ spamprobe-1.4d-dev/src/parser/AutoTrainMailMessageReader.cc	2007-07-09 17:59:39.0 +0200
@@ -28,6 +28,7 @@
 //http://www.cooldevtools.com/qpl.html
 //
 
+#include cstdlib
 #include MailMessage.h
 #include AutoTrainMailMessageReader.h
 
diff -ur -x '*~' spamprobe-1.4d.orig/src/parser/HtmlTokenizer.cc spamprobe-1.4d-dev/src/parser/HtmlTokenizer.cc
--- spamprobe-1.4d.orig/src/parser/HtmlTokenizer.cc	2006-11-17 08:24:49.0 +0100
+++ spamprobe-1.4d-dev/src/parser/HtmlTokenizer.cc	2007-07-09 18:02:31.0 +0200
@@ -28,6 +28,7 @@
 //http://www.cooldevtools.com/qpl.html
 //
 
+#include cstdlib
 #include AbstractTokenReceiver.h
 #include StringReader.h
 #include RegularExpression.h
diff -ur -x '*~' spamprobe-1.4d.orig/src/parser/MailMessageReader.cc spamprobe-1.4d-dev/src/parser/MailMessageReader.cc
--- spamprobe-1.4d.orig/src/parser/MailMessageReader.cc	2006-11-17 08:24:49.0 +0100
+++ spamprobe-1.4d-dev/src/parser/MailMessageReader.cc	2007-07-09 18:03:06.0 +0200
@@ -28,6 +28,7 @@
 //http://www.cooldevtools.com/qpl.html
 //
 
+#include cstdlib
 #include RegularExpression.h
 #include MailMessage.h
 #include MailMessageList.h
diff -ur -x '*~' spamprobe-1.4d.orig/src/parser/MbxMailMessageReader.cc spamprobe-1.4d-dev/src/parser/MbxMailMessageReader.cc
--- spamprobe-1.4d.orig/src/parser/MbxMailMessageReader.cc	2006-11-17 08:24:49.0 +0100
+++ spamprobe-1.4d-dev/src/parser/MbxMailMessageReader.cc	2007-07-09 18:03:41.0 +0200
@@ -28,6 +28,7 @@
 //http://www.cooldevtools.com/qpl.html
 //
 
+#include cstdlib
 #include stdexcept
 #include MailMessage.h
 #include MailMessageList.h
diff -ur -x '*~' spamprobe-1.4d.orig/src/spamprobe/Command_cleanup.cc spamprobe-1.4d-dev/src/spamprobe/Command_cleanup.cc
--- spamprobe-1.4d.orig/src/spamprobe/Command_cleanup.cc	2006-11-17 08:24:49.0 +0100
+++ spamprobe-1.4d-dev/src/spamprobe/Command_cleanup.cc	2007-07-09 18:13:16.0 +0200
@@ -28,6 +28,7 @@
 //http://www.cooldevtools.com/qpl.html
 //
 
+#include cstdlib
 #include CleanupManager.h
 #include SpamFilter.h
 

Bug#417706: FTBFS with GCC 4.3: missing #includes

2007-07-10 Thread Nicolas Duboc
forwarded 417706 [EMAIL PROTECTED]
thanks


On Wed, Apr 04, 2007 at 01:32:23PM +0200, Martin Michlmayr wrote:
 Package: spamprobe
 Version: 1.4b-2
 Usertags: ftbfs-gcc-4.3
 Tags: patch
 
 Your package fails to build with GCC 4.3.  Version 4.3 has not been
 released yet but I'm building with a snapshot in order to find errors
 and give people an advance warning.

  Martin,

 I have just forwarded this bug to the upstream developer.

 I will wait to see if he releases soon a new version of spamprobe
including this fix. If he doesn't before GCC 4.3 hits unstable, I will
include this patch in my Debian package.

 Thanks for your work,

-- 
Nicolas Duboc [EMAIL PROTECTED]


pgp0OUhJiFN6a.pgp
Description: PGP signature


Bug#417706: FTBFS with GCC 4.3: missing #includes

2007-04-04 Thread Martin Michlmayr
Package: spamprobe
Version: 1.4b-2
Usertags: ftbfs-gcc-4.3
Tags: patch

Your package fails to build with GCC 4.3.  Version 4.3 has not been
released yet but I'm building with a snapshot in order to find errors
and give people an advance warning.  In GCC 4.3, the C++ header
dependencies have been cleaned up.  The advantage of this is that
programs will compile faster.  The downside is that you actually
need to directly #include everything you use (but you really should
do this anyway, otherwise your program won't work with any compiler
other than GCC).  Some background of this can be found at
http://gcc.gnu.org/PR28080

You can reproduce this problem with gcc-snapshot (20070326-1 or higher)
from unstable. (Currently not available for i386, but for amd64, powerpc
and ia64.  I hope to have i386 binaries in the archive in ~3 weeks.)

 Automatic build of spamprobe_1.4b-2 on coconut0 by sbuild/ia64 0.49
...
 if g++ -DPACKAGE_NAME=\\ -DPACKAGE_TARNAME=\\ -DPACKAGE_VERSION=\\ 
 -DPACKAGE_STRING=\\ -DPACKAGE_BUGREPORT=\\ -DPACKAGE=\spamprobe\ 
 -DVERSION=\1.4b\ -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_UNISTD_H=1 
 -DHAVE_DIRENT_H=1 -DHAVE_REGEX_H=1 -DUSE_8BIT=1 -DUSE_CDB=1 -DUSE_DB=1 
 -DUSE_MMAP=1 -DHAVE_UNGIF=1  -I. -I. -I../../src/includes  -DNDEBUG   -g -O2 
 -MT DatabaseConfig.o -MD -MP -MF .deps/DatabaseConfig.Tpo -c -o 
 DatabaseConfig.o DatabaseConfig.cc; \
   then mv -f .deps/DatabaseConfig.Tpo .deps/DatabaseConfig.Po; else 
 rm -f .deps/DatabaseConfig.Tpo; exit 1; fi
 DatabaseConfig.cc: In member function 'void 
 DatabaseConfig::parseCommandLineArg(std::string, std::string, int)':
 DatabaseConfig.cc:111: error: 'atoi' was not declared in this scope

--- database/DatabaseConfig.cc~ 2007-04-04 11:11:16.0 +
+++ database/DatabaseConfig.cc  2007-04-04 11:11:23.0 +
@@ -28,6 +28,7 @@
 //http://www.cooldevtools.com/qpl.html
 //
 
+#include cstdlib
 #include stdexcept
 #include File.h
 #include WordData.h
--- includes/MultiLineSubString.h~  2007-04-04 11:14:05.0 +
+++ includes/MultiLineSubString.h   2007-04-04 11:14:56.0 +
@@ -33,6 +33,8 @@
 
 #include AbstractMultiLineString.h
 
+#include climits
+
 class MultiLineSubString : public AbstractMultiLineString
 {
 public:
--- parser/AutoTrainMailMessageReader.cc~   2007-04-04 11:13:35.0 
+
+++ parser/AutoTrainMailMessageReader.cc2007-04-04 11:13:51.0 
+
@@ -31,6 +31,8 @@
 #include MailMessage.h
 #include AutoTrainMailMessageReader.h
 
+#include cstdlib
+
 AutoTrainMailMessageReader::AutoTrainMailMessageReader()
   : m_spamCount(0), m_totalCount(0), m_messageWasSpam(false)
 {
--- parser/HtmlTokenizer.cc~2007-04-04 11:15:24.0 +
+++ parser/HtmlTokenizer.cc 2007-04-04 11:15:31.0 +
@@ -33,6 +33,7 @@
 #include RegularExpression.h
 #include TempPtr.h
 #include HtmlTokenizer.h
+#include cstdlib
 
 static const char SEPARATOR = ' ';
 static const int MAX_ENTITY_LENGTH = 6;
--- parser/MailMessageReader.cc~2007-04-04 11:16:29.0 +
+++ parser/MailMessageReader.cc 2007-04-04 11:16:35.0 +
@@ -34,6 +34,7 @@
 #include LineReader.h
 #include MultiLineString.h
 #include MailMessageReader.h
+#include cstdlib
 
 // Defines how many chars to deduct from content-length so that we can
 // find a blank line before the message delimiter line that follows
--- parser/MbxMailMessageReader.cc~ 2007-04-04 11:16:55.0 +
+++ parser/MbxMailMessageReader.cc  2007-04-04 11:17:02.0 +
@@ -28,6 +28,7 @@
 //http://www.cooldevtools.com/qpl.html
 //
 
+#include cstdlib
 #include stdexcept
 #include MailMessage.h
 #include MailMessageList.h
--- hdl/HdlTokenizer.cc~2007-04-04 11:18:38.0 +
+++ hdl/HdlTokenizer.cc 2007-04-04 11:18:45.0 +
@@ -32,6 +32,7 @@
 #include HdlError.h
 #include HdlToken.h
 #include HdlTokenizer.h
+#include cstdlib
 
 static const string invalid_char_message(const string base_msg,
  char ch)
--- spamprobe/Command_cleanup.cc~   2007-04-04 11:19:33.0 +
+++ spamprobe/Command_cleanup.cc2007-04-04 11:19:39.0 +
@@ -35,6 +35,7 @@
 #include ConfigManager.h
 #include SpamFilter.h
 #include Command_cleanup.h
+#include cstdlib
 
 Command_cleanup::Command_cleanup()
 : AbstractCommand(cleanup,
--- spamprobe/Command_edit_term.cc~ 2007-04-04 11:20:10.0 +
+++ spamprobe/Command_edit_term.cc  2007-04-04 11:20:16.0 +
@@ -34,6 +34,7 @@
 #include ConfigManager.h
 #include SpamFilter.h
 #include Command_edit_term.h
+#include cstdlib
 
 Command_edit_term::Command_edit_term()
 : AbstractCommand(edit-term,
--- spamprobe/Command_exec.cc~  2007-04-04 11:21:56.0 +
+++ spamprobe/Command_exec.cc   2007-04-04