From nobody@FreeBSD.org  Wed Apr  3 16:24:43 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id BF1A637B420
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  3 Apr 2002 16:24:39 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g340OdM32137;
	Wed, 3 Apr 2002 16:24:39 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200204040024.g340OdM32137@freefall.freebsd.org>
Date: Wed, 3 Apr 2002 16:24:39 -0800 (PST)
From: "Peter Sripitisawad@yahoo.com" <psripitisawad@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Configure Bug:  cyrus-sasl-1.5.27_2 / krb5-  unable to detect MIT Kerberos when Heimdal libraries and includes are installed.
X-Send-Pr-Version: www-1.0

>Number:         36711
>Category:       ports
>Synopsis:       Configure Bug:  cyrus-sasl-1.5.27_2 / krb5-  unable to detect MIT Kerberos when Heimdal libraries and includes are installed.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 03 16:30:02 PST 2002
>Closed-Date:    Fri May 09 05:47:57 PDT 2003
>Last-Modified:  Fri May 09 05:47:57 PDT 2003
>Originator:     Peter Sripitisawad@yahoo.com
>Release:        4.5-Release
>Organization:
>Environment:
FreeBSD r2d2.serverspec.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Sun Mar 31 04:41:11 PST 2002     root@r2d2.serverspec.com:/usr/obj/usr/src/sys/r2d2kernel  i386      
>Description:
1)
Problem:  If $KRB5_HOME is not defined to where krb5 (MIT kerberos5) was installed, the configure scripts fail to locate the include file gssapi.h  With $KRB5_HOME defined, an --enable-GSSAPI flag will be set to true (value=$KRB5_HOME) causing the configure scripts to hunt and look for the required include files and libraries with $KRB5_HOME as the base.
 
2)
Problem:   With --enable-GSSAPI=$KRB5_HOME properly set, the configure script then attempts to determine if heimdal is installed.  If Heimdal libraries are not installed/detected the configure script defaults to MIT Kerberos.  Problem is if heimdal was already installed, or a "make world" was initiated even with "MAKE_KERBEROS5" = no (make world will still compile and install heimdal libraries without installing the executables... stupid), this will trip up the configure script to ignore the installed MIT Kerberos and compile to Heimdal.
       
>How-To-Repeat:
Install the krb5 port of MIT Kerberos5, then do a "make" or "make install" of cyrus-sasl-1.5.27_2 from the ports tree with Heimdal libraries also installed.    
>Fix:
For Problem #1
Work-around: setenv $KRB5_HOME before "make" or set the option KRB5_HOME in /etc/make.conf.  The krb5 install defaults to /usr/local so the option in make.conf only needs to be uncommented.
 
Solution:  Patch the cyrus-sasl Makefile to default $KRB5_HOME to /usr/local if it is not defined.  This is most likely to not be defined since most people will not uncomment #KRB5_HOME in make.conf since the default is generally assumed.

For Problem #2 
Work-around:  I Ctrl-C on make at configure stage, and removed reference to the m4script cmulocal/heimdal.m4 in the configure.in files.  This causes the lookup to not occur and naturally default to MIT Kerberos.
 
Solution:  Detect for both versions of Kerberos and provide an option for user to choose version of kerberos during install if both are found.... this is a bug on CMU's side and not FreeBSD... though a FreeBSD fix would be a good idea on preventing make world from COMPILING and INSTALLING libraries for programs that it was told to not install for! ... naturally the same goes for various other dependencies, i.e pam_kerberos*, etc.  The present state of make world is not very elegant.
  
>Release-Note:
>Audit-Trail:

From: "David W. Chapman Jr." <dwcjr@inethouston.net>
To: <freebsd-gnats-submit@FreeBSD.org>, <psripitisawad@yahoo.com>
Cc: "Scot W. Hetzel" <hetzels@westbend.net>
Subject: Re: ports/36711: Configure Bug:  cyrus-sasl-1.5.27_2 / krb5-  unable to detect MIT Kerberos when Heimdal libraries and includes are installed.
Date: Tue, 21 May 2002 12:08:33 -0500

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_0C4B_01C200C0.3A60D2E0
 Content-Type: text/plain;
 	charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 
 Have you cc'd the maintainer in this pr, he's usually very responsive
 
 ------=_NextPart_000_0C4B_01C200C0.3A60D2E0
 Content-Type: text/html;
 	charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML><HEAD>
 <META http-equiv=3DContent-Type content=3D"text/html; =
 charset=3Diso-8859-1">
 <META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
 <STYLE></STYLE>
 </HEAD>
 <BODY bgColor=3D#ffffff>
 <DIV><FONT face=3DArial size=3D2>Have you cc'd the maintainer in this =
 pr, he's=20
 usually very responsive</FONT></DIV></BODY></HTML>
 
 ------=_NextPart_000_0C4B_01C200C0.3A60D2E0--
 

From: patrick <patrick@cookie.monster.org>
To: freebsd-gnats-submit@FreeBSD.org, psripitisawad@yahoo.com
Cc:  
Subject: Re: ports/36711: Configure Bug:  cyrus-sasl-1.5.27_2 / krb5-  unable to detect MIT Kerberos when Heimdal libraries and includes are installed.
Date: Tue, 25 Feb 2003 16:52:48 +0100

 I cvsupped to 1.5.28 and still get errors on FreeBSD 4.8-PRELEASE
 
 # New ports collection makefile for:    cyrus-sasl
 # Date created:                         Nov 1 1999
 # Whom:                                 hetzels@westbend.net
 #
 # $FreeBSD: ports/security/cyrus-sasl/Makefile,v 1.48 2003/02/21 
 13:26:42 knu Exp $
 #
 
 PORTNAME=       cyrus-sasl
 PORTVERSION=    1.5.28
 
 FreeBSD sco 4.8-PRERELEASE FreeBSD 4.8-PRERELEASE #1: Fri Feb 21 
 15:02:50 CET 2003     pine@sco:/usr/obj/usr/src/sys/SCO  i386
 
 creating libdigestmd5.la
 (cd .libs && rm -f libdigestmd5.la && ln -s ../libdigestmd5.la 
 libdigestmd5.la)
 /bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. 
 -I../include  -I/usr/local/includee/db3 -I/usr/include/openssl  
 -I/usr/local/include  -Wall -W -O -pipe -c kerberos4.c
 rm -f .libs/kerberos4.lo
 cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I/usr/local/include/db3 
 -I/usr/include/openssl -I/usr//local/include -Wall -W -O -pipe -c 
 kerberos4.c  -fPIC -DPIC -o .libs/kerberos4.lo
 kerberos4.c:731: unterminated macro call
 kerberos4.c:1402: warning: preprocessing directive not recognized 
 within macro arg
 kerberos4.c:1402: warning: preprocessing directive not recognized 
 within macro arg
 kerberos4.c:730: unterminated `#if' conditional
 In file included from /usr/include/krb.h:355,
                   from kerberos4.c:48:
 /usr/include/krb-protos.h:182: warning: `struct des_ks_struct' declared 
 inside parameter list
 /usr/include/krb-protos.h:182: warning: its scope is only this 
 definition or declaration, which is pprobably not what you want.
 /usr/include/krb-protos.h:455: warning: `struct des_ks_struct' declared 
 inside parameter list
 /usr/include/krb-protos.h:533: warning: `struct des_ks_struct' declared 
 inside parameter list
 /usr/include/krb-protos.h:573: warning: `struct des_ks_struct' declared 
 inside parameter list
 /usr/include/krb-protos.h:589: warning: `struct des_ks_struct' declared 
 inside parameter list
 kerberos4.c: In function `privacy_encode':
 kerberos4.c:195: incompatible type for argument 4 of `krb_mk_priv'
 kerberos4.c:195: warning: passing arg 6 of `krb_mk_priv' from 
 incompatible pointer type
 kerberos4.c:195: warning: passing arg 7 of `krb_mk_priv' from 
 incompatible pointer type
 kerberos4.c: In function `privacy_decode':
 kerberos4.c:279: incompatible type for argument 3 of `krb_rd_priv'
 kerberos4.c:279: warning: passing arg 5 of `krb_rd_priv' from 
 incompatible pointer type
 kerberos4.c:279: warning: passing arg 6 of `krb_rd_priv' from 
 incompatible pointer type
 kerberos4.c: In function `integrity_encode':
 kerberos4.c:344: warning: passing arg 5 of `krb_mk_safe' from 
 incompatible pointer type
 kerberos4.c:344: warning: passing arg 6 of `krb_mk_safe' from 
 incompatible pointer type
 kerberos4.c: In function `integrity_decode':
 kerberos4.c:426: warning: passing arg 4 of `krb_rd_safe' from 
 incompatible pointer type
 kerberos4.c:426: warning: passing arg 5 of `krb_rd_safe' from 
 incompatible pointer type
 kerberos4.c: In function `server_continue_step':
 kerberos4.c:733: undefined or invalid # directive
 kerberos4.c:736: undefined or invalid # directive
 kerberos4.c:740: warning: passing arg 1 of `DES_pcbc_encrypt' from 
 incompatible pointer type
 kerberos4.c:740: warning: passing arg 2 of `DES_pcbc_encrypt' from 
 incompatible pointer type
 kerberos4.c:740: syntax error before `;'
 kerberos4.c:742: syntax error before `;'
 kerberos4.c:712: warning: `testnum' might be used uninitialized in this 
 function
 kerberos4.c: At top level:
 kerberos4.c:870: syntax error before `)'
 kerberos4.c:871: invalid lvalue in unary `&'
 kerberos4.c:871: initializer element is not constant
 kerberos4.c:871: (near initialization for `plugins[0].mech_name')
 kerberos4.c:873: syntax error before `)'
 kerberos4.c:867: warning: array `plugins' assumed to have one element
 kerberos4.c:503: warning: `server_start' defined but not used
 kerberos4.c:512: warning: `dispose' defined but not used
 kerberos4.c:521: warning: `mech_free' defined but not used
 kerberos4.c:560: warning: `server_continue_step' defined but not used
 *** Error code 1
 
 Stop in /usr/ports/security/cyrus-sasl/work/cyrus-sasl-1.5.28/plugins.
 *** Error code 1
 
 Stop in /usr/ports/security/cyrus-sasl/work/cyrus-sasl-1.5.28.
 *** Error code 1
 
 Stop in /usr/ports/security/cyrus-sasl/work/cyrus-sasl-1.5.28.
 *** Error code 1
 
 Stop in /usr/ports/security/cyrus-sasl.
 *** Error code 1
 
 Stop in /usr/ports/security/cyrus-sasl.
 sco#
 
State-Changed-From-To: open->closed 
State-Changed-By: arved 
State-Changed-When: Fri May 9 05:47:38 PDT 2003 
State-Changed-Why:  
Should be fixed with the latest commit to cyrus-sasl 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36711 
>Unformatted:
