From: Baruch Siach via buildroot <buildroot@buildroot.org>
To: Byron Gallagher <trippgallagher98@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/socat: fix static openssl compatibility
Date: Tue, 21 Nov 2023 20:09:30 +0200 [thread overview]
Message-ID: <87fs0zx9el.fsf@tarshish> (raw)
In-Reply-To: <20231121174722.4164-1-trippgallagher98@gmail.com>
Hi Byron,
On Tue, Nov 21 2023, Byron Gallagher wrote:
> 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.
> +
Patches should have Upstream: tag. See
https://buildroot.org/downloads/manual/manual.html#_additional_patch_documentation
In this case adding something like
Upstream: sent to socat@dest-unreach.org
should be enough.
baruch
> +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
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-11-21 18:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 17:47 [Buildroot] [PATCH] package/socat: fix static openssl compatibility Byron Gallagher
2023-11-21 18:09 ` Baruch Siach via buildroot [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fs0zx9el.fsf@tarshish \
--to=buildroot@buildroot.org \
--cc=baruch@tkos.co.il \
--cc=trippgallagher98@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox