[openssh-commits] [openssh] 02/02: Try -lstdc++ for libcrypto before giving up.
git+noreply at mindrot.org
git+noreply at mindrot.org
Sun Mar 1 09:49:07 AEDT 2026
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit b50b881b17ab15e34b5e57b159b65f2a02725798
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Sun Mar 1 09:46:39 2026 +1100
Try -lstdc++ for libcrypto before giving up.
BoringSSL recently added destructors to libcrypto, which requires
linking against libstdc++, so when checking for a working libcrypto if
at first the link fails, try again with -lstdc++ before giving up.
---
configure.ac | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 110d39088..d98650bf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3003,8 +3003,15 @@ nocrypto_saved_LIBS="$LIBS"
if test "x$openssl" = "xyes" ; then
LIBS="-lcrypto $LIBS"
CHANNELLIBS="-lcrypto $CHANNELLIBS"
- AC_TRY_LINK_FUNC([RAND_add], ,
- [AC_MSG_ERROR([*** working libcrypto not found, check config.log])])
+ AC_TRY_LINK_FUNC([RAND_add], , [
+ # As of early 2026, BoringSSL libcrypto needs -lstdc++ for
+ # destructors so try that before giving up.
+ LIBS="$LIBS -lstdc++"
+ CHANNELLIBS="$CHANNELLIBS -lstdc++"
+ AC_TRY_LINK_FUNC([RAND_add], , [
+ AC_MSG_ERROR([*** working libcrypto not found, check config.log])
+ ])
+ ])
AC_CHECK_HEADER([openssl/opensslv.h], ,
[AC_MSG_ERROR([*** OpenSSL headers missing - please install first or check config.log ***])])
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list