Building Heimal without using ports

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Mar 20 08:23:42 PST 2004


Robert,

On Sat, Mar 20, 2004 at 10:25:27AM -0500, Robert Fitzpatrick wrote:
> Well, I have sent two posts to the FreeBSD questions list, one to the
> ports list, one to Heimdal and one to OpenLDAP and copied the port
> maintainer on the last one to the FreeBSD questions list. No help on how
> to get LDAP backend support built in to Heimdal using the port
> security/heimdal.

Do you already have any version of OpenLDAP installed?  I've tried to
reproduce what you saw in your earlier post, but defining WITH_LDAP
makes evrything link against libldap.so as expected for me:

    % ldd kadmind 
    kadmind:
            libkadm5srv.so.7 => /home/matthew/tmp/local/lib/libkadm5srv.so.7 (0x28074000)
            libhdb.so.7 => /home/matthew/tmp/local/lib/libhdb.so.7 (0x28080000)
            libkrb5.so.19 => /home/matthew/tmp/local/lib/libkrb5.so.19 (0x2808f000)
            libldap.so.2 => /usr/local/lib/libldap.so.2 (0x280c8000)
            liblber.so.2 => /usr/local/lib/liblber.so.2 (0x280f5000)
            libasn1.so.6 => /home/matthew/tmp/local/lib/libasn1.so.6 (0x28100000)
            libroken.so.16 => /home/matthew/tmp/local/lib/libroken.so.16 (0x28121000)
            libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x2812f000)
            libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x2822c000)
            libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x2822e000)
            libc.so.4 => /usr/lib/libc.so.4 (0x28247000)
            libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x282e3000)
            libssl.so.3 => /usr/lib/libssl.so.3 (0x282f7000)
    % ldd kdc
    kdc:
            libhdb.so.7 => /home/matthew/tmp/local/lib/libhdb.so.7 (0x2807b000)
            libkrb5.so.19 => /home/matthew/tmp/local/lib/libkrb5.so.19 (0x2808a000)
            libldap.so.2 => /usr/local/lib/libldap.so.2 (0x280c3000)
            liblber.so.2 => /usr/local/lib/liblber.so.2 (0x280f0000)
            libasn1.so.6 => /home/matthew/tmp/local/lib/libasn1.so.6 (0x280fb000)
            libroken.so.16 => /home/matthew/tmp/local/lib/libroken.so.16 (0x2811c000)
            libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x2812a000)
            libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x28227000)
            libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28229000)
            libc.so.4 => /usr/lib/libc.so.4 (0x28242000)
            libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x282de000)
            libssl.so.3 => /usr/lib/libssl.so.3 (0x282f2000)

I think that the problem is the port doesn't add any dependencies
against OpenLDAP even if WITH_LDAP is defined.  That's a bug.

In fact, can you try this patch to the security/heimdal Makefile?

% diff -u Makefile.orig Makefile 
--- Makefile.orig       Sat Mar 20 16:15:56 2004
+++ Makefile    Sat Mar 20 16:17:08 2004
@@ -32,6 +32,7 @@
 CONFIGURE_ENV+=                CFLAGS="${CFLAGS}"
 CONFIGURE_ARGS+=       --enable-shared --without-krb4
 .if defined(WITH_LDAP)
+USE_OPENLDAP=          yes
 CONFIGURE_ARGS+=       --with-openldap=${LOCALBASE}
 .endif

This should cause your system to install one of the OpenLDAP ports as
a dependency of security/heimdal before it builds the heimdal stuff
itself -- net/openldap21-client is probably what will be installed.
When you rebuild the security/heimdal port using WITH_LDAP=yes, be
sure to do a 'make clean' first so you force the configuration scripts
to be run again.

Since you'll be installing OpenLDAP, you might want to refer to
http://www.padl.com/Research/Heimdal.html -- I don't know if the
patches spoken of there are still necessary (that page could well be
out of date as it seems to be a few versions behind on the OpenLDAP
releases), but if they are, you can try building the OpenLDAP stuff
with "WITH_SASL=yes"

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040320/6033c1ae/attachment.bin


More information about the freebsd-questions mailing list