Resending from an address that will make it through to lists.

Philip M. Gollucci wrote:
Hi All,

as you can see the recent update of devel/apr from 1.2.12 to 1.3.2 breaks apr-util when building with LDAP on FreeBSD. The log is from a FreeBSD tinderbox, but can reproduced with the normal build steps.

The attached patch fixes it both in and out of tinderbox.
This particular diff is against branches/1.3.x but build/apu-conf.m4
is identical on trunk so it should apply there too.

I'll submit a FreeBSD PR to fix the port so it doesn't have to wait for 1.3.3 next.


Index: build/apu-conf.m4
===================================================================
--- build/apu-conf.m4   (revision 674869)
+++ build/apu-conf.m4   (working copy)
@@ -357,6 +357,12 @@
   ])
 
 if test "$apu_has_ldap_openldap" = "1"; then
+    CPPFLAGS=$save_cppflags
+    LDFLAGS=$save_ldflags
+    LIBS=$save_libs
+
+    CPPFLAGS="$CPPFLAGS $APRUTIL_INCLUDES"
+    LDFLAGS="$LDFLAGS $APRUTIL_LDFLAGS"
     AC_CACHE_CHECK([style of ldap_set_rebind_proc routine], 
ac_cv_ldap_set_rebind_proc_style,
     APR_TRY_COMPILE_NO_WARNING([
     #ifdef HAVE_LBER_H
@@ -374,6 +380,10 @@
     if test "$ac_cv_ldap_set_rebind_proc_style" = "three"; then
         AC_DEFINE(LDAP_SET_REBIND_PROC_THREE, 1, [Define if 
ldap_set_rebind_proc takes three arguments])
     fi
+
+    CPPFLAGS=$save_cppflags
+    LDFLAGS=$save_ldflags
+    LIBS=$save_libs
 fi
 
 AC_SUBST(ldap_h)
cd /work/a/ports/devel/apr/work/apr-util-1.3.2;  /usr/bin/env 
PYTHON="/usr/local/bin/python2.5" SHELL=/bin/sh CONFIG_SHELL=/bin/sh MAKE=gmake 
ACLOCAL=/usr/local/bin/aclocal-1.9 AUTOMAKE=/usr/local/bin/automake-1.9 
AUTOMAKE_VERSION=19 AUTOCONF=/usr/local/bin/autoconf-2.61 
AUTOHEADER=/usr/local/bin/autoheader-2.61 
AUTOIFNAMES=/usr/local/bin/ifnames-2.61 AUTOM4TE=/usr/local/bin/autom4te-2.61 
AUTORECONF=/usr/local/bin/autoreconf-2.61 AUTOSCAN=/usr/local/bin/autoscan-2.61 
AUTOUPDATE=/usr/local/bin/autoupdate-2.61 AUTOCONF_VERSION=261 
LIBTOOL=/usr/local/bin/libtool LIBTOOLIZE=/usr/local/bin/libtoolize 
LIBTOOL_M4=/usr/local/share/aclocal/libtool.m4 lt_cv_sys_max_cmd_len=262144 
/bin/sh  ./configure --enable-threads --prefix=/usr/local 
${_LATE_CONFIGURE_ARGS} amd64-portbld-freebsd8.0 --with-apr=../apr-1.3.2  
--with-expat=/usr/local  --with-iconv=/usr/local --without-gdbm 
--with-ldap-include=/usr/local/include  --with-ldap-lib=/usr/local/lib 
--with-ldap=ldap

[....]

checking for ldap support...
  setting APRUTIL_INCLUDES to "-I/usr/local/include"
  setting APRUTIL_LDFLAGS to "-L/usr/local/lib"
checking for ldap_init in -lldap... yes
checking for ldapssl_client_init in -lldap... no
checking for ldapssl_client_deinit in -lldap... no
checking for ldapssl_add_trusted_cert in -lldap... no
checking for ldap_start_tls_s in -lldap... yes
checking for ldap_sslinit in -lldap... no
checking for ldapssl_init in -lldap... no
checking for ldapssl_install_routines in -lldap... no
checking for ber_init in -llber... yes
checking lber.h usability... yes
checking lber.h presence... yes
checking for lber.h... yes
checking for ldap.h... yes
checking ldap_ssl.h usability... no
checking ldap_ssl.h presence... no
checking for ldap_ssl.h... no
checking for LDAP toolkit... OpenLDAP
checking style of ldap_set_rebind_proc routine... two

[....]

/bin/sh /work/a/ports/devel/apr/work/apr-1.3.2/libtool --silent --mode=compile 
gcc -g -O2   -DHAVE_CONFIG_H    
-I/work/a/ports/devel/apr/work/apr-util-1.3.2/include 
-I/work/a/ports/devel/apr/work/apr-util-1.3.2/include/private  
-I/work/a/ports/devel/apr/work/apr-1.3.2/include  -I/usr/local/include  -o 
ldap/apr_ldap_rebind.lo -c ldap/apr_ldap_rebind.c && touch 
ldap/apr_ldap_rebind.lo
ldap/apr_ldap_rebind.c: In function 'apr_ldap_rebind_set_callback':
ldap/apr_ldap_rebind.c:305: warning: passing argument 2 of 
'ldap_set_rebind_proc' from incompatible pointer type
ldap/apr_ldap_rebind.c:305: error: too few arguments to function 
'ldap_set_rebind_proc'
gmake[1]: *** [ldap/apr_ldap_rebind.lo] Error 1
gmake[1]: Leaving directory `/work/a/ports/devel/apr/work/apr-util-1.3.2'
gmake: *** [all-recursive] Error 1
*** Error code 2

Reply via email to