[31560] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Add MACOS_FRAMEWORK to static link flags

daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Wed Jul 15 18:24:26 2026

From: ghudson@mit.edu
To: cvs-krb5@mit.edu
Message-Id: <20260715222421.63AA4105116@krbdev.mit.edu>
Date: Wed, 15 Jul 2026 18:24:21 -0400 (EDT)
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/9a27137bfa04f9ae79b19cce7cdb05680dfe844e
commit 9a27137bfa04f9ae79b19cce7cdb05680dfe844e
Author: George Chow <george@overcoil.com>
Date:   Thu Jun 18 11:40:36 2026 -0700

    Add MACOS_FRAMEWORK to static link flags
    
    When building statically on macOS, the CoreFoundation and Security
    frameworks required by krb5 are not propagated to consumers via
    pkg-config or the Makefile link variables.  This causes linker failures
    when an application links against the static krb5 libraries without
    separately specifying the framework flags.
    
    Add @MACOS_FRAMEWORK@ to Libs.private in mit-krb5.pc.in, so pkg-config
    --static exposes it, and to KRB5_BASE_LIBS in config/pre.in, so the
    build system includes it when linking executables against the static
    libraries.

 src/build-tools/mit-krb5.pc.in | 2 +-
 src/config/pre.in              | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/build-tools/mit-krb5.pc.in b/src/build-tools/mit-krb5.pc.in
index fdc557785..e5fde402c 100644
--- a/src/build-tools/mit-krb5.pc.in
+++ b/src/build-tools/mit-krb5.pc.in
@@ -12,4 +12,4 @@ Description: An implementation of Kerberos network authentication
 Version: @KRB5_VERSION@
 Cflags: -I${includedir}
 Libs: -L${libdir} -lkrb5 -lk5crypto @COM_ERR_LIB@
-Libs.private: -lkrb5support
+Libs.private: -lkrb5support @MACOS_FRAMEWORK@ @LIBS@ @DL_LIB@
diff --git a/src/config/pre.in b/src/config/pre.in
index d165ba9cc..a59f6ca90 100644
--- a/src/config/pre.in
+++ b/src/config/pre.in
@@ -370,6 +370,8 @@ CMOCKA_LIBS	= @CMOCKA_LIBS@
 LDAP_LIBS	= @LDAP_LIBS@
 LMDB_LIBS	= @LMDB_LIBS@
 
+MACOS_FRAMEWORK = @MACOS_FRAMEWORK@
+
 KRB5_LIB			= -lkrb5
 K5CRYPTO_LIB			= -lk5crypto
 GSS_KRB5_LIB			= -lgssapi_krb5
@@ -378,7 +380,7 @@ SUPPORT_LIB			= -l$(SUPPORT_LIBNAME)
 # HESIOD_LIBS is -lhesiod...
 HESIOD_LIBS	= @HESIOD_LIBS@
 
-KRB5_BASE_LIBS	= $(KRB5_LIB) $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(SUPPORT_LIB) $(LIBS) $(DL_LIB)
+KRB5_BASE_LIBS	= $(KRB5_LIB) $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(SUPPORT_LIB) $(MACOS_FRAMEWORK) $(LIBS) $(DL_LIB)
 KDB5_LIBS	= $(KDB5_LIB) $(GSSRPC_LIBS)
 GSS_LIBS	= $(GSS_KRB5_LIB)
 GSSRPC_LIBS	= -lgssrpc $(GSS_LIBS)
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post