From 9223c7d59955f26d0898b27f2a758a176822cce9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 22 Jan 2021 15:59:03 +1100 Subject: [PATCH 1/2] Fix linking order for OpenSSL libraries As libssl depends on libcrypto, -lssl needs to precede -lcrypto in linker invocations or else the build will fail with static OpenSSL libraries. Adjust m4/ax_check_openssl.m4 to prevent this issue from getting triggered when pkg-config files for OpenSSL are not available. --- m4/ax_check_openssl.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/ax_check_openssl.m4 b/m4/ax_check_openssl.m4 index 19d0c2d176..a3faba0a45 100644 --- a/m4/ax_check_openssl.m4 +++ b/m4/ax_check_openssl.m4 @@ -68,7 +68,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [ AS_IF([test -f "$ssldir/include/openssl/ssl.h"], [ OPENSSL_CFLAGS="-I$ssldir/include" - OPENSSL_LIBS="-L$ssldir/lib -lcrypto -lssl" + OPENSSL_LIBS="-L$ssldir/lib -lssl -lcrypto" found=true AC_MSG_RESULT([yes]) break From 98dc47d351fa5a863b3fcdb68dccff33b2f98d42 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 22 Jan 2021 16:04:33 +1100 Subject: [PATCH 2/2] Add CHANGES for [GL #2402] --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index c5f893bd90..fb695d438e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +5582. [bug] BIND 9 failed to build when static OpenSSL libraries + were used and the *.pc files for libssl and/or libcrypto + were unavailable. This has been fixed by ensuring the + correct linking order for libssl and libcrypto is always + used. [GL #2402] + 5581. [bug] Fix memory leak happening when inline-signed zones were added to the configuration followed by a reconfiguration of named. [GL #2041]