Building dovecot2 on FreeBSD 9.2 using security/heimdal port results in configure returning /usr/bin/ld: cannot find -lgssapi_krb5 which is correct, because libgssapi_krb5 isn't built by the security/heimdal port. The security/heimdal port builds libgssapi to contain the calls that lower versions of heimdal use in libgssapi_krb5. Fix: .if defined(HEIMDAL_HOME) BUILD_DEPENDS+= ${HEIMDAL_HOME}/lib/libgssapi.so:${PORTSDIR}/security/heimdal RUN_DEPENDS+= ${HEIMDAL_HOME}/lib/libgssapi.so:${PORTSDIR}/security/heimdal .else LDFLAGS+= -lgssapi_krb5 .endif or for a minimal solution .if !defined(HEIMDAL_HOME) LDFLAGS+= -lgssapi_krb5 .endif It is common practice to use HEIMDAL_HOME as both the trigger for recognition of use of the security/heimdal port as well as the location of the libs and headers. How-To-Repeat: rm /usr/lib/libgssap* # In my case I don't build these, via src.conf WITHOUT_KERBEROS cd /usr/ports/security/heimdal && make install package cd /usr/ports/mail/dovecot2 && make install package
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Maintainer of mail/dovecot2, Please note that PR ports/187721 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/187721 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
This is the third timeout out of 4 attempts by maintainer. Unless I hear something immediately why I shouldn't, I'm going to reset the maintainer to ports@.
*** Bug 189133 has been marked as a duplicate of this bug. ***
Actually I found a few more unanswered PRs so I am going to reset the port now. Dewayne, it seems like HEIMDAL support has been removed completely (dovecot now on 2.2.13). Can you indicate if this PR is still valid and if it is, can you submit a proper patch?
Adam has taken over the port, so I'll assign the PR to him. Adam, dewayne is planning on responding in a couple of days. I'll leave myself on CC for now.
It looks like GSSAPI support is still in there... it's still listed in configure.ac anyway. dewayne, this strikes me as a job for the new USES=gssapi:heimdal feature (http://svnweb.freebsd.org/ports/head/Mk/Uses/gssapi.mk?view=markup). Thoughts?
Thanks for looking into this, and making me review the Uses/gssapi.mk file. It looks like that addresses the issue nicely. So, I'm guessing, with a USES=gssapi I should be able to remove the patch for dovecot2(below) :) =================================================================== --- Makefile (revision 359521) +++ Makefile (working copy) @@ -60,7 +60,13 @@ OPTIONS_SUB= yes DOCS_CONFIGURE_WITH= docs GSSAPI_CONFIGURE_WITH= gssapi +.if defined(HEIMDAL_HOME) +BUILD_DEPENDS+= ${HEIMDAL_HOME}/lib/libgssapi.so:${PORTSDIR}/security/heimdal +RUN_DEPENDS+= ${HEIMDAL_HOME}/lib/libgssapi.so:${PORTSDIR}/security/heimdal +GSSAPI_LDFLAGS= -lgssapi +.else GSSAPI_LDFLAGS= -lgssapi_krb5 +.endif I have a minor concern that gssapi.mk sets the PREFIX though simple testing indicates that it should be ok (eg Remote our patch, insert USES=gssapi and # unsetenv HEIMDAL_HOME ; make __MAKE_CONF=/dev/null -VPREFIX -VHEIMDAL_HOME -VUSES /usr/local /usr gssapi iconv The concern was that the ports PREFIX was altered (to match $HEIMDAL_HOME). Unfortunately I'm unable to test, as we had a successful rebuild of all ports on 2014-06-28 so the systems are frozen during functional testing. I should mention that our /etc/src.conf contains WITHOUT_GSSAPI=yes WITHOUT_KERBEROS=yes WITHOUT_KERBEROS_SUPPORT=yes
Created attachment 144316 [details] Adds GSSAPI support This patch is essentially straight out of the Uses/gssapi.mk description.
A commit references this bug: Author: adamw Date: Tue Jul 1 16:04:14 UTC 2014 New revision: 360050 URL: http://svnweb.freebsd.org/changeset/ports/360050 Log: Enable support for GSSAPI from ports using USES=gssapi magic. PORTREVISION bump for this. PR: ports/187721 Submitted by: dewayne@heuristicsystems.com.au While we're here: - More general cleanups - Improve COMMENT and pkg-descr Changes: head/mail/dovecot2/Makefile head/mail/dovecot2/pkg-descr
Thanks, dewayne. I've committed the GSSAPI patch in r360050. Please let me know if you encounter any trouble with this in the future... I don't use kerberos so I'll rely on you for this! :-)