[Pkg-openldap-devel] Bug#505421: FTBFS with GCC 4.4: stricter preprocessor checks

Martin Michlmayr tbm at cyrius.com
Wed Nov 12 08:08:27 UTC 2008


Package: openldap
Version: 2.4.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.

You can reproduce this problem with gcc-snapshot from unstable.

> Automatic build of openldap_2.4.11-1 on em64t by sbuild/amd64 0.53
...
> make[3]: Entering directory `/build/tbm/openldap-2.4.11/debian/build/libraries/libldap'
> /build/tbm/openldap-2.4.11/build/mkdep -l -d "/build/tbm/openldap-2.4.11/libraries/libldap" -c "cc" -m "-M" -I../../include        -I/build/tbm/openldap-2.4.11/include      bind.c open.c result.c error.c compare.c search.c controls.c messages.c references.c extended.c cyrus.c modify.c add.c modrdn.c delete.c abandon.c sasl.c sbind.c unbind.c cancel.c filter.c free.c sort.c passwd.c whoami.c getdn.c getentry.c getattr.c getvalues.c addentry.c request.c os-ip.c url.c pagectrl.c sortctrl.c vlvctrl.c init.c options.c print.c string.c util-int.c schema.c charray.c tls.c os-local.c dnssrv.c utf-8.c utf-8-conv.c turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c assertion.c 
> /build/tbm/openldap-2.4.11/libraries/libldap/os-ip.c:693:30: error: missing ')' after "defined"
> make[3]: Leaving directory `/build/tbm/openldap-2.4.11/debian/build/libraries/libldap'
>  
>   Entering subdirectory libldap_r
> make[3]: Entering directory `/build/tbm/openldap-2.4.11/debian/build/libraries/libldap_r'
> touch .links
> /build/tbm/openldap-2.4.11/build/mkdep -l -d "/build/tbm/openldap-2.4.11/libraries/libldap_r" -c "cc" -m "-M" -I../../include        -I/build/tbm/openldap-2.4.11/include  -DLDAP_R_COMPILE -I/build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap    threads.c rdwr.c rmutex.c tpool.c rq.c thr_posix.c thr_cthreads.c thr_thr.c thr_lwp.c thr_nt.c thr_pth.c thr_stub.c thr_debug.c apitest.c test.c bind.c open.c result.c error.c compare.c search.c controls.c messages.c references.c extended.c cyrus.c modify.c add.c modrdn.c delete.c abandon.c sasl.c sbind.c unbind.c cancel.c filter.c free.c sort.c passwd.c whoami.c getdn.c getentry.c getattr.c getvalues.c addentry.c request.c os-ip.c url.c pagectrl.c sortctrl.c vlvctrl.c init.c options.c print.c string.c util-int.c schema.c charray.c tls.c os-local.c dnssrv.c utf-8.c utf-8-conv.c turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c assertion.c
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/threads.c:25:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from /build/tbm/openldap-2.4.11/libraries/libldap_r/rdwr.c:42:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from /build/tbm/openldap-2.4.11/libraries/libldap_r/rmutex.c:31:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from /build/tbm/openldap-2.4.11/libraries/libldap_r/tpool.c:27:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from /build/tbm/openldap-2.4.11/libraries/libldap_r/rq.c:31:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/thr_posix.c:30:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from test.c:43:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from bind.c:30:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from open.c:35:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from result.c:65:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from error.c:26:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from compare.c:27:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from search.c:29:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from controls.c:41:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from messages.c:27:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from references.c:27:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from extended.c:25:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from cyrus.c:32:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from modify.c:27:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from add.c:28:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from modrdn.c:39:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from delete.c:27:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from abandon.c:30:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from sasl.c:45:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from sbind.c:46:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from unbind.c:28:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from cancel.c:33:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from filter.c:30:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from free.c:33:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from sort.c:37:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from passwd.c:27:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from whoami.c:27:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from getdn.c:28:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from getentry.c:28:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from getattr.c:28:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from getvalues.c:30:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from addentry.c:30:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from request.c:53:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from os-ip.c:43:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> os-ip.c:693:30: error: missing ')' after "defined"
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from url.c:46:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from pagectrl.c:23:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from sortctrl.c:38:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from vlvctrl.c:38:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from init.c:30:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from options.c:26:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from print.c:25:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from string.c:28:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from util-int.c:37:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from schema.c:29:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from charray.c:24:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from tls.c:36:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from os-local.c:54:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from dnssrv.c:31:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from utf-8.c:38:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from utf-8-conv.c:51:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from turn.c:33:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from ppolicy.c:30:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from dds.c:27:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from txn.c:33:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from ldap_sync.c:29:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from stctrl.c:28:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from ntlm.c:19:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> In file included from /build/tbm/openldap-2.4.11/libraries/libldap_r/../libldap/ldap-int.h:30,
>                  from assertion.c:23:
> /build/tbm/openldap-2.4.11/include/ldap_pvt_thread.h:66:7: error: missing binary operator before token "("
> make[3]: Leaving directory `/build/tbm/openldap-2.4.11/debian/build/libraries/libldap_r'

The second part of the patch is obvious; I'm not so sure about the
first.

--- include/ldap_pvt_thread.h~	2008-11-12 07:37:16.000000000 +0000
+++ include/ldap_pvt_thread.h	2008-11-12 08:01:45.000000000 +0000
@@ -59,12 +59,12 @@
 
 #ifndef LDAP_PVT_THREAD_H_DONE
 #define	LDAP_PVT_THREAD_SET_STACK_SIZE
-#ifndef LDAP_PVT_THREAD_STACK_SIZE
-	/* LARGE stack. Will be twice as large on 64 bit machine. */
-#define LDAP_PVT_THREAD_STACK_SIZE	( 1 * 1024 * 1024 * sizeof(void *) )
 /* May be explicitly defined to zero to disable it */
-#elif LDAP_PVT_THREAD_STACK_SIZE == 0
+#if LDAP_PVT_THREAD_STACK_SIZE == 0
 #undef LDAP_PVT_THREAD_SET_STACK_SIZE
+#elif !defined(LDAP_PVT_THREAD_STACK_SIZE)
+	/* LARGE stack. Will be twice as large on 64 bit machine. */
+#define LDAP_PVT_THREAD_STACK_SIZE	( 1 * 1024 * 1024 * sizeof(void *) )
 #endif
 #endif /* !LDAP_PVT_THREAD_H_DONE */
 
--- libraries/libldap/os-ip.c~	2008-11-12 07:33:10.000000000 +0000
+++ libraries/libldap/os-ip.c	2008-11-12 07:33:31.000000000 +0000
@@ -690,7 +690,7 @@
 		char *herr;
 #ifdef NI_MAXHOST
 		char hbuf[NI_MAXHOST];
-#elif defined( MAXHOSTNAMELEN
+#elif defined( MAXHOSTNAMELEN )
 		char hbuf[MAXHOSTNAMELEN];
 #else
 		char hbuf[256];

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





More information about the Pkg-openldap-devel mailing list