All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] netsnmp: fix static build with openssl
Date: Sun, 9 Sep 2018 14:43:41 +0200	[thread overview]
Message-ID: <CAPi7W81tAT9=LeVBT6gCR7a57S72ynpganrm4rSLq5viv4oUqw@mail.gmail.com> (raw)
In-Reply-To: <20180909141612.43915a59@windsurf.home>

Dear Thomas,

Le dim. 9 sept. 2018 ? 14:16, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
a ?crit :

> 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 ? :-)
>
Because the last time I tried to use pkg-config, the upstream project
decided to refuse the merge request and use ac_search_libs instead:
https://gitlab.com/muttmua/mutt/merge_requests/25 :-(
I know that netsnmp is already using pkg-config, but only for libnl perhaps
they would agree to use it also for ssl. I'll ask them and if they agree
I'll update my patch.

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


Best Regards,

Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180909/d3951079/attachment.html>

  reply	other threads:[~2018-09-09 12:43 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
2018-09-09 12:43   ` Fabrice Fontaine [this message]
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='CAPi7W81tAT9=LeVBT6gCR7a57S72ynpganrm4rSLq5viv4oUqw@mail.gmail.com' \
    --to=fontaine.fabrice@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.