Unable to build Sendmail with LDAP
Duane Whitty
duane at dwlabs.ca
Tue Jun 20 22:45:24 UTC 2006
Hi,
I am currently unable to rebuild Sendmail with LDAP support.
Unfortunately I am not sure what broke it; it could be my
upgrade from OpenLDAP 2.2.30 to 2.3.24 or my upgrade from OpenSSL 0.9.8a
to 0.9.8b. Foolishly, I did both at the same time without testing after
each one. I do know it is not because of the recent Sendmail patch nor
because of a change in 6-STABLE. As well, I am able to build Sendmail
if I eliminate LDAP support.
Here is what I am currently running.
dwpc@ /home/build/src# uname -a
FreeBSD dwpc.dwlabs.ca 6.1-STABLE FreeBSD 6.1-STABLE #1: Mon Jun 19 13:44:08 ADT 2006 duane at dwpc.dwlabs.ca:/usr/obj/usr/src/sys/DWPC-KERNEL i386
dwpc@ /home/build/src# sendmail -d0.1 -bt </dev/null
Version 8.13.6
Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7
NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS PIPELINING SCANF
STARTTLS TCPWRAPPERS USERDB XDEBUG
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = dwpc
(canonical domain name) $j = dwpc.dwlabs.ca
(subdomain name) $m = dwlabs.ca
(node name) $k = dwpc.dwlabs.ca
========================================================
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
dwpc@ /home/build/src# pkg_info | grep open
openldap-sasl-client-2.3.24 Open source LDAP client implementation with SASL2 support
openldap-server-2.3.24 Open source LDAP server implementation
openssl-0.9.8b_1 SSL and crypto library
/etc/make.conf
KERNCONF=DWPC-KERNEL
NO_PROFILE=1
# added by use.perl 2006-04-01 17:11:27
PERL_VER=5.8.8
PERL_VERSION=5.8.8
# Tried first with the following two lines uncommented
# and then retried compiling with them commented out
# WANT_LDAP_VER=23
# WITH_LDAP_PORT=yes
SENDMAIL_CFLAGS=-I/usr/local/include -DSASL2=2 -DLDAPMAP
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl2 -lldap -llber
I first went through the compilation routine using my usual
/usr/src build tree after upgrading OpenSSL and OpenLDAP.
After a reboot I noticed that everything which used OpenSSL or
OpenLDAP had failed so I upgraded all my ports applications. All's
well, except for Sendmail.
So here is the output [snipped to relevant section] of my make buildworld.
The full make buildworld output is available at
http://www.dwlabs.ca/freebsd/build/buildworld-1
===> libexec/mail.local (all)
cc -O2 -fno-strict-aliasing -pipe -I/home/build/src/libexec/mail.local/../../contrib/sendmail/include -I. -I/usr/local/include -DSASL2=2 -DLDAPMAP -c /home/build/src/libexec/mail.local/../../contrib/sendmail/mail.local/mail.local.c
cc -O2 -fno-strict-aliasing -pipe -I/home/build/src/libexec/mail.local/../../contrib/sendmail/include -I. -I/usr/local/include -DSASL2=2 -DLDAPMAP -L/usr/local/lib -o mail.local mail.local.o /usr/obj/home/build/src/libexec/mail.local/../../lib/libsm/libsm.a -lsasl2 -lldap -llber
/usr/obj/home/build/src/tmp/usr/bin/ld: warning: libssl.so.5, needed by /usr/local/lib/libldap.so, not found (try using -rpath or -rpath-link)
/usr/obj/home/build/src/tmp/usr/bin/ld: warning: libcrypto.so.5, needed by /usr/local/lib/libldap.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libldap.so: undefined reference to `SSL_CTX_set_tmp_rsa_callback'
[snip -- more "undefined reference to ..." messages]
*** Error code 1
Stop in /home/build/src/libexec/mail.local.
*** Error code 1
Stop in /home/build/src/libexec.
*** Error code 1
Stop in /home/build/src.
*** Error code 1
Stop in /home/build/src.
*** Error code 1
Stop in /home/build/src.
What has me puzzled is that the shared libraries ld says it can't find
are present and where they should be:
dwpc@ /usr/local/lib# ll libssl*
-rw-r--r-- 1 root wheel 353678 Jun 19 02:31 libssl.a
lrwxr-xr-x 1 root wheel 11 Jun 19 02:31 libssl.so -> libssl.so.5
-r--r--r-- 1 root wheel 259018 Jun 19 02:31 libssl.so.5
lrwxr-xr-x 1 root wheel 12 Jun 17 07:54 libssl3.so -> libssl3.so.1
-r-xr-xr-x 1 root wheel 141960 Jun 17 07:56 libssl3.so.1
dwpc@ /usr/local/lib# ll libldap*
lrwxr-xr-x 1 root wheel 16 Jun 19 03:31 libldap-2.3.so -> libldap-2.3.so.2
-rw-r--r-- 1 root wheel 229979 Jun 19 03:31 libldap-2.3.so.2
-rw-r--r-- 1 root wheel 280354 Jun 19 03:31 libldap.a
-rw-r--r-- 1 root wheel 865 Jun 19 03:31 libldap.la
lrwxr-xr-x 1 root wheel 16 Jun 19 03:31 libldap.so -> libldap-2.3.so.2
lrwxr-xr-x 1 root wheel 18 Jun 19 03:31 libldap_r-2.3.so -> libldap_r-2.3.so.2
-rw-r--r-- 1 root wheel 251450 Jun 19 03:31 libldap_r-2.3.so.2
-rw-r--r-- 1 root wheel 313272 Jun 19 03:31 libldap_r.a
-rw-r--r-- 1 root wheel 879 Jun 19 03:31 libldap_r.la
lrwxr-xr-x 1 root wheel 18 Jun 19 03:31 libldap_r.so -> libldap_r-2.3.so.2
dwpc@ /usr/local/lib# ldd /usr/local/lib/libldap.so
/usr/local/lib/libldap.so:
liblber-2.3.so.2 => /usr/local/lib/liblber-2.3.so.2 (0x28189000)
libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28194000)
libssl.so.5 => /usr/local/lib/libssl.so.5 (0x281a9000)
libcrypto.so.5 => /usr/local/lib/libcrypto.so.5 (0x281e1000)
libc.so.6 => /lib/libc.so.6 (0x28080000)
If needed I can backout the necessary ports to previous versions. However,
I'd rather help anyway I can if it turns out there is a problem with OpenSSL
or OpenLDAP as opposed to it just being something I did wrong.
--Duane Whitty
More information about the freebsd-questions
mailing list