Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] netsnmp: fix static build with openssl
Date: Sun, 9 Sep 2018 14:16:12 +0200	[thread overview]
Message-ID: <20180909141612.43915a59@windsurf.home> (raw)
In-Reply-To: <20180909085119.27976-1-fontaine.fabrice@gmail.com>

Hello Fabrice,

Thanks for working on this!

On Sun,  9 Sep 2018 10:51:19 +0200, Fabrice Fontaine wrote:

> +diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
> +index 74bed6bf7..84ebb77f5 100644
> +--- a/configure.d/config_os_libs2
> ++++ b/configure.d/config_os_libs2
> +@@ -309,13 +309,13 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
> +         LIBS="$netsnmp_save_LIBS"
> + 
> +         if test x$CRYPTO = x; then
> +-            AC_CHECK_LIB([crypto], [EVP_md5], [CRYPTO="crypto"])
> ++            AC_CHECK_LIB([crypto], [EVP_md5], [CRYPTO="crypto"], [], -lz)
> +         fi
> + 
> +         if test x$CRYPTO != x; then
> +             AC_DEFINE(HAVE_LIBCRYPTO, 1,
> +                 [Define to 1 if you have the OpenSSL library (-lcrypto or -leay32).])
> +-            LIBCRYPTO="-l${CRYPTO}"
> ++            LIBCRYPTO="-l${CRYPTO} -lz"
> +             netsnmp_save_LIBS="$LIBS"
> +             LIBS="$LIBCRYPTO"
> +             AC_CHECK_FUNCS([AES_cfb128_encrypt]dnl
> +@@ -345,7 +345,7 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
> +             LIBS="$netsnmp_save_LIBS"
> +         fi
> +         netsnmp_save_LIBS="$LIBS"
> +-        LIBS="-lssl"
> ++        LIBS="-lssl $LIBCRYPTO"
> +         AC_CHECK_FUNCS([TLS_method TLSv1_method DTLS_method DTLSv1_method]dnl
> +                        [SSL_library_init SSL_load_error_strings])
> +         LIBS="$netsnmp_save_LIBS"

If you're patching the configure.ac stuff, what about doing the right
thing, and use pkg-config ? :-)

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-09-09 12:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-09  8:51 [Buildroot] [PATCH 1/1] netsnmp: fix static build with openssl Fabrice Fontaine
2018-09-09 12:16 ` Thomas Petazzoni [this message]
2018-09-09 12:43   ` Fabrice Fontaine
2018-09-09 13:09     ` Thomas Petazzoni
2018-09-17 20:37       ` Giulio Benetti
2018-09-17 20:39         ` [Buildroot] [PATCH] netsnmp: fix static build failure due to missing -lssl and -lz Giulio Benetti
2018-10-11 20:46           ` Peter Korsgaard
2018-10-11 20:52             ` Giulio Benetti
2018-09-17 20:43         ` [Buildroot] [PATCH 1/1] netsnmp: fix static build with openssl Fabrice Fontaine
2018-09-17 21:22         ` Thomas Petazzoni
2018-09-17 21:44           ` Giulio Benetti

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=20180909141612.43915a59@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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