Skip to contentSkip to conversation

Fix openssl builds with custom-built library: specify most-dependent first

PATCH In review Steffan Karger 3 participants 3 messages Nov 28, 2015 – Nov 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix openssl builds with custom-built library: specify most-dependent first

Libraries should be specified from left-to-right as most-dependent to least-dependent. Thus, -lssl comes first, then -lcrypto.

(This does not fail when pkg-config finds your libraries for you, since we tell it '-lssl needs -lcrypto' and we then end up with "-lcrypto -lssl -lcrypto", which is not pretty but does work.)

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index 40df8a1..d3b3fa9 100644
@@ -1110,7 +1110,7 @@ if test "${enable_crypto}" = "yes"; then
 		test "${have_crypto_aead_modes}" != "yes" && AC_MSG_ERROR([AEAD modes required but missing])
 	fi
 	OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CRYPTO_CFLAGS} ${CRYPTO_SSL_CFLAGS}"
-	OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_CRYPTO_LIBS} ${CRYPTO_SSL_LIBS}"
+	OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_SSL_LIBS} ${CRYPTO_CRYPTO_LIBS}"
 	AC_DEFINE([ENABLE_CRYPTO], [1], [Enable crypto library])
 fi
 
Signature · 1 line
2.5.0
#1 lore raw

Am 28.11.15 um 23:48 schrieb Steffan Karger:

Quoted 7 lines

Libraries should be specified from left-to-right as most-dependent to least-dependent. Thus, -lssl comes first, then -lcrypto.

(This does not fail when pkg-config finds your libraries for you, since we tell it '-lssl needs -lcrypto' and we then end up with "-lcrypto -lssl -lcrypto", which is not pretty but does work.)

ACK from me.

Arne

#2 lore raw
In reply to Steffan Karger

Your patch has been applied to the master branch (with some massaging as the context has the aead_modes stuff in your tree...).

commit 09f2670ce27158f81b4983c06f63870a5188d4aa

Author: Steffan Karger
Date:   Sat Nov 28 23:48:01 2015 +0100
     Fix openssl builds with custom-built library: specify most-dependent first

     Signed-off-by: Steffan Karger <[email protected]...>
     Acked-by: Arne Schwabe <[email protected]...>
     Message-Id: <[email protected]...>
     URL: http://article.gmane.org/gmane.network.openvpn.devel/10649
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering