4 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Debian Bug #45609...
FromSent OnAttachments
Stefan Hornburg (Racke)Dec 13, 2007 2:11 pm 
Sam VarshavchikDec 13, 2007 4:49 pm 
Stefan Hornburg (Racke)Dec 17, 2007 3:25 am.patch
Sam VarshavchikDec 17, 2007 4:05 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Debian Bug #456096: Build failure with GCC snapshot (upcoming 4.3)Actions...
From:Stefan Hornburg (Racke) (rac@linuxia.de)
Date:Dec 17, 2007 3:25:23 am
List:net.sourceforge.lists.courier-users
Attachments:

Sam Varshavchik wrote:

Stefan Hornburg (Racke) writes:

The following problem was reported to the Debian BTS (http://bugs.debian.org/456096):

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). There's some more information about this at http://www.cyrius.com/journal/2007/05/10#gcc-4.3-include

You can reproduce this problem with gcc-snapshot from unstable. Note that Red Hat, Novell and Ubuntu have done some work getting packages to build with GCC 4.3 so there might be patches floating around somewhere. I suggest you talk to your upstream.

This specific compiler error should merely need a #include <string.h> in the file. This specific case is trivial, but I probably won't be using 4.3 for a little while, and have no way of knowing if something else needs to be fixed, so the original submitter should report anything else that falls out.

I managed to get a bunch of files fixed (see attached patch), but now the build bails out with the following error:

g++ -DHAVE_CONFIG_H -I. -Wall -I./.. -I.. -I./../afx -I./../rfc822 -I./libs
-g -O2 -MT webmlmdcmlm.o -MD -MP -MF .deps/webmlmdcmlm.Tpo -c -o webmlmdcmlm.o
webmlmdcmlm.C In file included from webmlmdcmlm.C:8: webmlmd.H: In function 'std::string webmlmd::basename(std::string)': webmlmd.H:37: error: 'find_end' is not a member of 'std' webmlmdcmlm.C: In member function 'bool webmlmd::cmlm::start(std::string,
std::string, std::string, const std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > >&)': webmlmdcmlm.C:137: warning: deprecated conversion from string constant to
'char*'

Do you have an idea how to fix this ?

Regards Racke

-- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team

--- courier-0.58.0.orig/courier/libs/comaliases2.C 2007-06-28 04:24:09.000000000
+0200 +++ courier-0.58.0/courier/libs/comaliases2.C 2007-12-14 12:10:02.330369590
+0100 @@ -5,6 +5,7 @@

#include "aliases.h" #include "courier.h" +#include <string.h>

// // MAXRECSIZE is the median GDBM record size makealiases creates. The actual --- courier-0.58.0.orig/courier/libs/comaliases4.C 2007-06-28 04:24:09.000000000
+0200 +++ courier-0.58.0/courier/libs/comaliases4.C 2007-12-14 12:32:29.300226992
+0100 @@ -10,6 +10,7 @@ #include "rw.h" #include <stdio.h> #include <errno.h> +#include <string.h>

#if HAVE_LDAP #include "ldapaliasdrc.h" --- courier-0.58.0.orig/courier/libs/testaliases.C 2007-07-28 14:39:12.000000000
+0200 +++ courier-0.58.0/courier/libs/testaliases.C 2007-12-14 12:58:26.377029905
+0100 @@ -1,5 +1,6 @@ #include "aliases.h"

+#include <string.h> #include <unistd.h> #include <iostream> #include <set> --- courier-0.58.0.orig/courier/cmlm.C 2007-07-30 02:25:58.000000000 +0200 +++ courier-0.58.0/courier/cmlm.C 2007-12-14 13:23:56.868455427 +0100 @@ -27,6 +27,7 @@ #include <unistd.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <errno.h> #include <ctype.h> #include <time.h> --- courier-0.58.0.orig/courier/cmlm2.C 2007-08-30 03:38:49.000000000 +0200 +++ courier-0.58.0/courier/cmlm2.C 2007-12-14 13:49:07.134841326 +0100 @@ -11,6 +11,7 @@ #include "unicode/unicode.h" #include <fcntl.h> #include <unistd.h> +#include <string.h> #include <langinfo.h> #include <fstream>

--- courier-0.58.0.orig/courier/cmlm3.C 2007-06-28 04:27:24.000000000 +0200 +++ courier-0.58.0/courier/cmlm3.C 2007-12-14 14:10:28.014469990 +0100 @@ -14,6 +14,7 @@

#include <ctype.h> #include <time.h> +#include <string.h> #include <iostream> #include <fstream> #include <list> --- courier-0.58.0.orig/courier/cmlmarchive.C 2007-03-01 05:32:16.000000000
+0100 +++ courier-0.58.0/courier/cmlmarchive.C 2007-12-14 14:32:01.792381627 +0100 @@ -9,6 +9,7 @@ #include "numlib/numlib.h" #include <sys/types.h> #include <sys/stat.h> +#include <string.h> #include <fcntl.h> #include <errno.h> #include <sysexits.h> --- courier-0.58.0.orig/courier/cmlmmoderate.C 2007-06-28 04:27:24.000000000
+0200 +++ courier-0.58.0/courier/cmlmmoderate.C 2007-12-17 10:18:42.953972036 +0100 @@ -12,6 +12,7 @@ #include <sys/stat.h> #include <signal.h> #include <sysexits.h> +#include <string.h>

static const char rcsid[]="$Id: gcc34.patch,v 1.7 2007/12/17 11:20:56 racke Exp
$";

--- courier-0.58.0.orig/courier/cmlmsublist.C 2007-03-01 05:32:16.000000000
+0100 +++ courier-0.58.0/courier/cmlmsublist.C 2007-12-17 10:45:10.645865660 +0100 @@ -5,6 +5,7 @@

#include "config.h" #include "cmlmsublist.h" +#include <string.h>

static const char rcsid[]="$Id: gcc34.patch,v 1.7 2007/12/17 11:20:56 racke Exp
$";

--- courier-0.58.0.orig/courier/cmlmsubunsubmsg.C 2007-06-28 04:27:24.000000000
+0200 +++ courier-0.58.0/courier/cmlmsubunsubmsg.C 2007-12-17 11:11:13.176080359 +0100 @@ -16,6 +16,7 @@ #include <time.h> #include <errno.h> #include <sysexits.h> +#include <string.h>

static const char rcsid[]="$Id: gcc34.patch,v 1.7 2007/12/17 11:20:56 racke Exp
$"; // --- courier-0.58.0.orig/courier/webmlmdcmlm.C 2007-05-20 02:04:55.000000000
+0200 +++ courier-0.58.0/courier/webmlmdcmlm.C 2007-12-17 11:42:57.395281219 +0100 @@ -10,6 +10,7 @@ #include <sstream> #include <errno.h> #include <stdlib.h> +#include <string.h> #if HAVE_UNISTD_H #include <unistd.h> #endif