[Mimedefang] Compiling MimeDefang 2.72 (configuration bug report).

kd6lvw at yahoo.com kd6lvw at yahoo.com
Sun Jul 24 16:20:26 EDT 2011


For some reason, MD 2.72 didn't pick up that it needed the LDAP library (i.e. a "-lldap" added to the compiling line, when libmilter also has LDAP enabled).

Error:
gcc -g -O2 -Wall -Wstrict-prototypes -pthread -o mimedefang mimedefang.o drop_privs_threaded.o utils.o rm_r.o syslog-fac.o dynbuf.o milter_cap.o gen_id.o -L../sendmail-8.14.5/obj.Linux.2.6.39.1.x86_64/libmilter -lmilter -lpthread -lnsl 
../sendmail-8.14.5/obj.Linux.2.6.39.1.x86_64/libmilter/libmilter.a(errstring.o): In function `sm_errstring':
errstring.c:(.text+0x482): undefined reference to `ldap_err2string'
collect2: ld returned 1 exit status
make: *** [mimedefang] Error 1

I saw no check for LDAP support during the configure stage either.

I use openldap, installed with this shell script:

#!/bin/sh
configure --prefix=/usr --enable-ipv6 --enable-shared --enable-threads --disable-backends --enable-bdb --enable-ldap --enable-sql --with-slapd --without-slurpd --without-ldapd
SLAPD_USE_SQL=mysql make sql
exec make depend all install

Sendmail (and thus the milter library) is built with these M4 options:

APPENDDEF(`confENVDEF',`-DDNSMAP -DMATCHGECOS -DNETINET6 -DMILTER')
APPENDDEF(`confENVDEF',`-DSTARTTLS -DMAP_REGEX -DSASL=2 -DLDAPMAP -DNEWDB')
APPENDDEF(`confENVDEF',`-DIDENTPROTO=0 -DLDAP_REFERRALS -UNEEDSGETIPNODE')
APPENDDEF(`confLIBS',`-lcrypto -lldap -lpthread -lssl -lsasl2 -ldb')


Adding the missing "-lldap" to that one compile allows me to complete and install MD (and I have done so).  Maybe autoconf needs to be alerted that the LDAP library needs to be linked in as the milter library may be dependent on it. 



More information about the MIMEDefang mailing list