Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/socat: fix static openssl compatibility
@ 2023-11-21 17:47 Byron Gallagher
  2023-11-21 18:09 ` Baruch Siach via buildroot
  2023-11-23 10:15 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 8+ messages in thread
From: Byron Gallagher @ 2023-11-21 17:47 UTC (permalink / raw)
  To: buildroot; +Cc: Byron Gallagher

4028ee71743a25af172809e098e4c8eb61bf55f4 disables static openssl
compatibility due to issues linking against zlib.

This patch re-enables the functionality by patching socat's
autoconf to include zlib when locating openssl. Bug also reported
upstream via socat@dest-unreach.org.

Signed-off-by: Byron Gallagher <trippgallagher98@gmail.com>
---
 ...-build-link-against-zlib-for-openssl.patch | 35 +++++++++++++++++++
 package/socat/socat.mk                        |  2 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 package/socat/0003-build-link-against-zlib-for-openssl.patch

diff --git a/package/socat/0003-build-link-against-zlib-for-openssl.patch b/package/socat/0003-build-link-against-zlib-for-openssl.patch
new file mode 100644
index 0000000000..3851d5bcab
--- /dev/null
+++ b/package/socat/0003-build-link-against-zlib-for-openssl.patch
@@ -0,0 +1,35 @@
+From 0434a4674a012a35f6390d9afc4812de59a394ab Mon Sep 17 00:00:00 2001
+From: Byron Gallagher <trippgallagher98@gmail.com>
+Date: Tue, 21 Nov 2023 12:25:18 -0500
+Subject: [PATCH] build: link against zlib for openssl
+
+If openssl is static, socat will not find it due to autoconf
+failures on AC_TRY_LINK without -lz.
+
+Signed-off-by: Byron Gallagher <trippgallagher98@gmail.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9d60473..ae0e6bd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -580,12 +580,12 @@ if test -n "$WITH_OPENSSL" -a "$sc_cv_have_openssl_ssl_h" = 'yes'; then
+       if test -n "$OPENSSL_BASE"; then
+ 	L="$OPENSSL_BASE/lib"; LIBS="$LIBS -L$L -lssl -lcrypto"
+       else
+-	LIBS="$LIBS -lssl -lcrypto"
++	LIBS="$LIBS -lssl -lcrypto -lz"
+       fi
+       AC_TRY_LINK([#include <openssl/ssl.h>],
+        [SSL_library_init();ERR_error_string()],
+        [sc_cv_have_libssl='yes'],
+-       [ LIBS="$LIBS -lcrypto"
++       [ LIBS="$LIBS -lcrypto -lz"
+        AC_TRY_LINK([#include <openssl/ssl.h>],
+        [SSL_library_init()],
+ 	  [sc_cv_have_libssl='yes'],
+-- 
+2.34.1
+
diff --git a/package/socat/socat.mk b/package/socat/socat.mk
index f958f26522..0741605687 100644
--- a/package/socat/socat.mk
+++ b/package/socat/socat.mk
@@ -39,7 +39,7 @@ SOCAT_DEPENDENCIES = host-autoconf
 # incompatibile license (GPL-3.0+)
 SOCAT_CONF_OPTS = --disable-readline
 
-ifeq ($(BR2_PACKAGE_LIBOPENSSL):$(BR2_STATIC_LIBS),y:)
+ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
 SOCAT_DEPENDENCIES += openssl
 else
 SOCAT_CONF_OPTS += --disable-openssl
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-30 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-21 17:47 [Buildroot] [PATCH] package/socat: fix static openssl compatibility Byron Gallagher
2023-11-21 18:09 ` Baruch Siach via buildroot
2023-11-21 18:25   ` Byron Gallagher
2023-11-26 15:41     ` Yann E. MORIN
2023-11-23 10:15 ` Thomas Petazzoni via buildroot
2023-11-23 17:55   ` Byron Gallagher
2023-11-24  8:53     ` Thomas Petazzoni via buildroot
2023-11-30 20:18       ` Byron Gallagher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox