From owner-freebsd-questions@FreeBSD.ORG Tue Oct 17 15:15:26 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75BDE16A415 for ; Tue, 17 Oct 2006 15:15:26 +0000 (UTC) (envelope-from jonathan@hst.org.za) Received: from sirian.hst.org.za (sirian.hst.org.za [209.203.2.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2A8F43D53 for ; Tue, 17 Oct 2006 15:15:20 +0000 (GMT) (envelope-from jonathan@hst.org.za) Received: from localhost (localhost.hst.org.za [127.0.0.1]) by sirian.hst.org.za (Postfix) with ESMTP id 4CD9A31C7F8 for ; Tue, 17 Oct 2006 17:17:45 +0200 (SAST) Received: from sirian.hst.org.za ([127.0.0.1]) by localhost (sirian.hst.org.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 38911-03 for ; Tue, 17 Oct 2006 17:17:45 +0200 (SAST) Received: by sirian.hst.org.za (Postfix, from userid 1004) id 133B731C7F1; Tue, 17 Oct 2006 17:17:45 +0200 (SAST) Received: from sysadmin.int.dbn.hst.org.za (sysadmin.int.dbn.hst.org.za [10.1.1.20]) by sirian.hst.org.za (Postfix) with ESMTP id 550C831C7BD for ; Tue, 17 Oct 2006 17:17:44 +0200 (SAST) From: Jonathan McKeown Organization: Health Systems Trust To: freebsd-questions@freebsd.org Date: Tue, 17 Oct 2006 17:17:26 +0200 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610171717.26640.jonathan@hst.org.za> X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on sirian.hst.org.za X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=7.0 tests=BAYES_00 autolearn=ham version=2.61 X-Virus-Scanned: by amavisd-new at hst.org.za Subject: Base sendmail: undefined symbol in libmilter when -DLDAPMAP set in make.conf X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2006 15:15:26 -0000 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