Martin Michlmayr wrote:
> Package: courier
> Version: 0.58.0-1
> Usertags: ftbfs-gcc-4.3
> 
> 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.
> 
>> Automatic build of courier_0.58.0-1 on em64t by sbuild/amd64 0.53
> ...
>> /bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.     
>> -I.. -I./.. -I../.. -I./../.. -I./../../rfc822 -Wall -g -O2 -MT 
>> comaliases2.lo -MD -MP -MF .deps/comaliases2.Tpo -c -o comaliases2.lo 
>> comaliases2.C
>>  g++ -DHAVE_CONFIG_H -I. -I.. -I./.. -I../.. -I./../.. -I./../../rfc822 
>> -Wall -g -O2 -MT comaliases2.lo -MD -MP -MF .deps/comaliases2.Tpo -c 
>> comaliases2.C  -fPIC -DPIC -o .libs/comaliases2.o
>> comaliases2.C: In member function 'int AliasRecord::search(const char*)':
>> comaliases2.C:23: error: 'strlen' was not declared in this scope
>> comaliases2.C:28: error: 'strncmp' was not declared in this scope
>> comaliases2.C: In member function 'void AliasRecord::Delete(const char*)':
>> comaliases2.C:109: error: 'strlen' was not declared in this scope
>> make[5]: *** [comaliases2.lo] Error 1
>> make[5]: Leaving directory `/build/tbm/courier-0.58.0/courier/libs'
> 

The attached patch fixes the compilation. However, package building throws the
following exception :-(:

dh_shlibdeps: Compatibility levels before 4 are deprecated.
dpkg-shlibdeps: warning: debian/courier-base/usr/sbin/couriertcpd shouldn't be 
linked with libcrypt.so.1 (it uses none of its symbols).
dpkg-shlibdeps: warning: 
debian/courier-base/usr/lib/courier/courier/makedatprog shouldn't be linked 
with libcrypt.so.1 (it uses none of its symbols).
dpkg-shlibdeps: failure: no dependency information found for 
/usr/lib/gcc-snapshot/lib/libstdc++.so.6 (used by 
debian/courier-base/usr/bin/maildiracl).
dh_shlibdeps: command returned error code 512
make: *** [binary-arch] Error 1
dpkg-buildpackage: failure: debian/rules binary gave error exit status 2

Please advise.

        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.10 2007/12/18 00:11:43 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.10 2007/12/18 00:11:43 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.10 2007/12/18 00:11:43 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 13:10:47.132179212 +0100
@@ -8,8 +8,9 @@
 #include	"webmlmd.H"
 #include	"webmlmdcmlm.H"
 #include	<sstream>
 #include	<errno.h>
 #include	<stdlib.h>
+#include	<string.h>
 #if	HAVE_UNISTD_H
 #include	<unistd.h>
 #endif
--- courier-0.58.0.orig/courier/webmlmd.H	2007-06-16 04:21:24.000000000 +0200
+++ courier-0.58.0/courier/webmlmd.H	2007-12-17 14:36:21.247710438 +0100
@@ -11,6 +11,7 @@
 #include <list>
 #include <string>
 #include <map>
+#include <algorithm>
 
 namespace webmlmd {
 	std::string list_name();
--- courier-0.58.0.orig/courier/cddrvinfo.C	2007-07-30 00:54:28.000000000 +0200
+++ courier-0.58.0/courier/cddrvinfo.C	2007-12-17 15:00:03.277805512 +0100
@@ -17,6 +17,7 @@
 #include	"rw.h"
 #include	"maxlongsize.h"
 #include	<stdlib.h>
+#include	<string.h>
 #if	HAVE_UNISTD_H
 #include	<unistd.h>
 #endif
--- courier-0.58.0.orig/courier/cdmsgq.C	2007-08-04 15:34:26.000000000 +0200
+++ courier-0.58.0/courier/cdmsgq.C	2007-12-17 15:33:29.695929291 +0100
@@ -24,6 +24,7 @@
 #include	<ctype.h>
 #include	<errno.h>
 #include	<stdlib.h>
+#include	<string.h>
 #if HAVE_UNISTD_H
 #include	<unistd.h>
 #endif
--- courier-0.58.0.orig/courier/cdmsgq3.C	2007-07-30 01:04:25.000000000 +0200
+++ courier-0.58.0/courier/cdmsgq3.C	2007-12-17 16:20:34.833179903 +0100
@@ -24,6 +24,7 @@
 #include	<sys/stat.h>
 #endif
 #include	<stdlib.h>
+#include	<string.h>
 #include	<errno.h>
 #include	<sys/uio.h>
 #include	<time.h>
--- courier-0.58.0.orig/courier/courierd.C	2007-07-30 01:04:54.000000000 +0200
+++ courier-0.58.0/courier/courierd.C	2007-12-17 21:24:40.956017652 +0100
@@ -45,6 +45,7 @@
 #endif
 #endif
 #include	<stdio.h>
+#include	<string.h>
 #include	<errno.h>
 #include	<signal.h>
 
--- courier-0.58.0.orig/courier/aliascombine.C	2007-07-30 02:25:57.000000000 +0200
+++ courier-0.58.0/courier/aliascombine.C	2007-12-17 23:02:41.550442413 +0100
@@ -16,6 +16,7 @@
 #include	<unistd.h>
 #endif
 #include	<string>
+#include	<algorithm>
 #include	<sstream>
 #include	<iostream>
 #include	"dbobj.h"
--- courier-0.58.0.orig/courier/submit2.C	2007-10-15 03:34:11.000000000 +0200
+++ courier-0.58.0/courier/submit2.C	2007-12-17 23:27:48.276678273 +0100
@@ -23,6 +23,7 @@
 #include	<string.h>
 #include	<fcntl.h>
 #include	<errno.h>
+#include	<algorithm>
 #include	<iostream>
 #include	<iomanip>
 #if HAVE_SYS_TYPES_H
--- courier-0.58.0.orig/courier/cdfilters.C	2007-08-05 02:05:42.000000000 +0200
+++ courier-0.58.0/courier/cdfilters.C	2007-12-17 23:56:30.278091372 +0100
@@ -16,6 +16,7 @@
 #include	<errno.h>
 #include	<ctype.h>
 
+#include	<algorithm>
 #include	<iostream>
 #include	<vector>
 
--- courier-0.58.0.orig/courier/aliaslookup.C	2006-03-26 17:11:15.000000000 +0200
+++ courier-0.58.0/courier/aliaslookup.C	2007-12-18 00:39:03.066484399 +0100
@@ -6,6 +6,7 @@
 #include	"courier.h"
 #include	"aliases.h"
 
+#include	<string.h>
 #include	<iostream>
 
 class MyAliasHandler : public AliasHandler {

Reply via email to