Date: Tue, 17 Oct 2006 17:17:26 +0200 From: Jonathan McKeown <jonathan@hst.org.za> To: freebsd-questions@freebsd.org Subject: Base sendmail: undefined symbol in libmilter when -DLDAPMAP set in make.conf Message-ID: <200610171717.26640.jonathan@hst.org.za>
next in thread | raw e-mail | index | archive | help
This summarises the conversation I have had with myself on the list over the last few days: I'm not sure whether this is really a question or a potential PR. I am running FreeBSD-6.1-RELEASE-p5 (cvsup on 6 September). One of the source files for a rebuild of /usr/src/contrib/sendmail/libmilter is /usr/src/contrib/sendmail/libsm/errstring.c. If SENDMAIL_CFLAGS in /etc/make.conf contains -DLDAPMAP (and SENDMAIL_LDADD contains "-lldap -llber") when libmilter is rebuilt, LDAPMAP enables a conditional compilation in errstring.c of a call to ldap_err2string. The resulting libmilter.a contains an undefined reference to that symbol, which prevents building some ports which use milters (at least mail/mimedefang as per my experience, mail/sentinel as per PR ports/95647 and security/amavisd-milter as per PR ports/95646). There is a suggested fix under ports/95646, which is to ensure that when building libmilter, the SENDMAIL_CFLAGS and SENDMAIL_LDADD do *not* contain -DLDAPMAP and -lldap -llber respectively. I have used the following in /etc/make.conf to do this: SENDMAIL_CFLAGS = -I/usr/local/include -DSASL=2 SENDMAIL_LDFLAGS = -L/usr/local/lib SENDMAIL_LDADD = -lsasl2 .if ${.CURDIR} != /usr/src/lib/libmilter SENDMAIL_CFLAGS += -DLDAPMAP SENDMAIL_LDADD += -lldap -llber .endif It appears to work but it does seem... less than elegant. Jonathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610171717.26640.jonathan>