Subject: pkg/23339: cyrus-sasl2 doesn't build with GSSAPI support on NetBSD stable
To: None <>
From: None <>
List: netbsd-bugs
Date: 11/01/2003 23:34:27
>Number:         23339
>Category:       pkg
>Synopsis:       cyrus-sasl2 doesn't build with GSSAPI support on NetBSD stable
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 01 22:35:00 UTC 2003
>Originator:     Jukka Salmi
>Release:        NetBSD 1.6.1_STABLE
System: NetBSD 1.6.1_STABLE NetBSD 1.6.1_STABLE (HAUSTIER) #0: Mon Oct 20 19:26:25 CEST 2003 i386
Architecture: i386
Machine: i386
security/cyrus-sasl2 from current pkgsrc (currently Cyrus SASL 2.1.15)
doesn't build if SASL_USE_GSSAPI is set to YES:

$ cd /usr/pkgsrc/security/cyrus-sasl2
cc  -Wall -W -Wall -O2 -I/usr/pkg/include -L/usr/local/lib -R/usr/local/lib  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -L/usr/lib -L/usr/lib -L/usr/lib -L/usr/lib -L/usr/lib -o saslauthd  mechanisms.o auth_dce.o auth_getpwent.o auth_krb5.o  auth_krb4.o auth_pam.o auth_rimap.o auth_shadow.o auth_sia.o  auth_sasldb.o lak.o auth_ldap.o cache.o utils.o ipc_unix.o ipc_doors.o  saslauthd-main.o md5.o -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv  -lcrypt -lresolv -lresolv -lresolv -lresolv
ld: cannot find -lgssapi_krb5
*** Error code 1

The problem is that cyrus-sasl's configure script thinks I'm using MIT
kerberos instead of heimdal (this was also reported here [1]). If I set
LIBS as follows it works, i.e. SASL builds successfully (at least doesn't
report any error during build, and GSSAPI test server and client work fine):

$ LIBS=-lcrypto SASL_USE_GSSAPI=YES make

But now building OpenLDAP from pkgsrc fails with undefined references:

$ cd databases/openldap
$ USE_SASL2=YES make
cc -O2 -I/usr/pkgbuild/databases/openldap/work/.buildlink/include -Wl,-R/usr/pkg/lib -o apitest apitest.o  -L/usr/pkgbuild/databases/openldap/work/.buildlink/lib ./.libs/libldap.a -L/usr/pkgbuild/databases/openldap/work/openldap-2.1.22/libraries/liblber/.libs /usr/pkgbuild/databases/openldap/work/openldap-2.1.22/libraries/liblber/.libs/liblber.a -L/usr/pkg/lib ../../libraries/liblber/.libs/liblber.a ../../libraries/liblutil/liblutil.a /usr/pkg/lib/libsasl2.a -lresolv -lssl -lcrypto
/usr/pkgbuild/databases/openldap/work/.buildlink/lib/libsasl2.a(dlopen.o)(.data+0x8): undefined reference to `gssapiv2_server_plug_init'
/usr/pkgbuild/databases/openldap/work/.buildlink/lib/libsasl2.a(dlopen.o)(.data+0x14): undefined reference to `gssapiv2_client_plug_init'
*** Error code 1

make: stopped in /usr/pkgbuild/databases/openldap/work/openldap-2.1.22/libraries/libldap
*** Error code 1

I don't think this is an OpenLDAP problem, it seems to be a SASL problem.
But I don't know how to solve it...

Set SASL_USE_GSSAPI=YES and build security/cyrus-sasl2 and databases/openldap
from current pkgsrc on a NetBSD stable 1.6.1 system.