* [ptxdist] [RFC PATCH 0/2] fix indirect gnutls dependency @ 2017-03-09 9:37 Markus Niebel 2017-03-09 9:37 ` [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed Markus Niebel 2017-03-09 9:37 ` [ptxdist] [RFC PATCH 2/2] gnutls: needs libhogweed from nettle Markus Niebel 0 siblings, 2 replies; 8+ messages in thread From: Markus Niebel @ 2017-03-09 9:37 UTC (permalink / raw) To: ptxdist; +Cc: m.olbrich, Markus Niebel From: Markus Niebel <Markus.Niebel@tq-group.com> gnutls expects libhogweed from nettle and indirect libgmp. Try to fix this with adding a config for libhogweed and selecting libgmp from nettle for libhogweed support. I'm not really sure if this is the way to go. On the other hand the mini-gmp support in nettle could be dropped an nettle could select libgmp unconditionally Markus Niebel (2): nettle: add explicit support for libhogweed gnutls: needs libhogweed from nettle rules/gnutls.in | 1 + rules/nettle.in | 14 +++++++++++++- rules/nettle.make | 11 ++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) -- 1.9.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed 2017-03-09 9:37 [ptxdist] [RFC PATCH 0/2] fix indirect gnutls dependency Markus Niebel @ 2017-03-09 9:37 ` Markus Niebel 2017-03-09 15:19 ` Michael Olbrich 2017-03-09 9:37 ` [ptxdist] [RFC PATCH 2/2] gnutls: needs libhogweed from nettle Markus Niebel 1 sibling, 1 reply; 8+ messages in thread From: Markus Niebel @ 2017-03-09 9:37 UTC (permalink / raw) To: ptxdist; +Cc: m.olbrich, Markus Niebel From: Markus Niebel <Markus.Niebel@tq-group.com> the libhogweed part requires libgmp. Let's make it configurable. Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com> Conflicts: rules/nettle.in --- rules/nettle.in | 14 +++++++++++++- rules/nettle.make | 11 ++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/rules/nettle.in b/rules/nettle.in index fcacb96..f931994 100644 --- a/rules/nettle.in +++ b/rules/nettle.in @@ -1,8 +1,20 @@ ## SECTION=networking -config NETTLE +menuconfig NETTLE tristate prompt "nettle" + select LIBGMP if NETTLE_LIBHOGWEED help Nettle is a cryptographic library. +if NETTLE + +config NETTLE_LIBHOGWEED + bool + prompt "Build libhogweed" + help + The libhogweed library contains those functions of Nettle that + uses bignum operations, and depends on the GMP library + +endif + diff --git a/rules/nettle.make b/rules/nettle.make index 59df66e..23d6cb8 100644 --- a/rules/nettle.make +++ b/rules/nettle.make @@ -48,8 +48,15 @@ NETTLE_CONF_OPT := \ --disable-documentation \ --disable-fat \ --$(call ptx/endis,PTXCONF_ARCH_ARM_NEON)-arm-neon \ - --disable-x86-aesni \ + --disable-x86-aesni + +ifdef PTXCONF_NETTLE_LIBHOGWEED +NETTLE_CONF_OPT += \ --enable-mini-gmp +else +NETTLE_CONF_OPT += \ + --disable-mini-gmp +endif # ---------------------------------------------------------------------------- # Target-Install @@ -65,7 +72,9 @@ $(STATEDIR)/nettle.targetinstall: @$(call install_fixup, nettle,DESCRIPTION,missing) @$(call install_lib, nettle, 0, 0, 0644, libnettle) +ifdef PTXCONF_NETTLE_LIBHOGWEED @$(call install_lib, nettle, 0, 0, 0644, libhogweed) +endif @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/nettle-hash) @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/sexp-conv) @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/nettle-lfib-stream) -- 1.9.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed 2017-03-09 9:37 ` [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed Markus Niebel @ 2017-03-09 15:19 ` Michael Olbrich 2017-03-09 16:41 ` Markus Niebel 0 siblings, 1 reply; 8+ messages in thread From: Michael Olbrich @ 2017-03-09 15:19 UTC (permalink / raw) To: ptxdist On Thu, Mar 09, 2017 at 10:37:06AM +0100, Markus Niebel wrote: > From: Markus Niebel <Markus.Niebel@tq-group.com> > > the libhogweed part requires libgmp. Let's make it configurable. > This seems wrong. My understanding is, that the --enable-mini-gmp options exists to avoid the libgmp dependency by providing a minimalistic version of libgmp. If we want to use the 'real' libgmp (Are there any compelling reasons to do so?) then the --enable-mini-gmp must be _disabled_ if libhogweed is installed not the other way around. Also, the '--with-nettle-mini' of gnutls must be changed to 'without'. And all other nettle users must be reviewed to check if they need libhogweed. Michael > Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com> > > Conflicts: > rules/nettle.in > --- > rules/nettle.in | 14 +++++++++++++- > rules/nettle.make | 11 ++++++++++- > 2 files changed, 23 insertions(+), 2 deletions(-) > > diff --git a/rules/nettle.in b/rules/nettle.in > index fcacb96..f931994 100644 > --- a/rules/nettle.in > +++ b/rules/nettle.in > @@ -1,8 +1,20 @@ > ## SECTION=networking > > -config NETTLE > +menuconfig NETTLE > tristate > prompt "nettle" > + select LIBGMP if NETTLE_LIBHOGWEED > help > Nettle is a cryptographic library. > > +if NETTLE > + > +config NETTLE_LIBHOGWEED > + bool > + prompt "Build libhogweed" > + help > + The libhogweed library contains those functions of Nettle that > + uses bignum operations, and depends on the GMP library > + > +endif > + > diff --git a/rules/nettle.make b/rules/nettle.make > index 59df66e..23d6cb8 100644 > --- a/rules/nettle.make > +++ b/rules/nettle.make > @@ -48,8 +48,15 @@ NETTLE_CONF_OPT := \ > --disable-documentation \ > --disable-fat \ > --$(call ptx/endis,PTXCONF_ARCH_ARM_NEON)-arm-neon \ > - --disable-x86-aesni \ > + --disable-x86-aesni > + > +ifdef PTXCONF_NETTLE_LIBHOGWEED > +NETTLE_CONF_OPT += \ > --enable-mini-gmp > +else > +NETTLE_CONF_OPT += \ > + --disable-mini-gmp > +endif > > # ---------------------------------------------------------------------------- > # Target-Install > @@ -65,7 +72,9 @@ $(STATEDIR)/nettle.targetinstall: > @$(call install_fixup, nettle,DESCRIPTION,missing) > > @$(call install_lib, nettle, 0, 0, 0644, libnettle) > +ifdef PTXCONF_NETTLE_LIBHOGWEED > @$(call install_lib, nettle, 0, 0, 0644, libhogweed) > +endif > @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/nettle-hash) > @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/sexp-conv) > @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/nettle-lfib-stream) > -- > 1.9.1 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed 2017-03-09 15:19 ` Michael Olbrich @ 2017-03-09 16:41 ` Markus Niebel 2017-03-09 17:25 ` Michael Olbrich 2017-03-09 17:27 ` Clemens Gruber 0 siblings, 2 replies; 8+ messages in thread From: Markus Niebel @ 2017-03-09 16:41 UTC (permalink / raw) To: ptxdist Am Donnerstag, den 09.03.2017, 16:19 +0100 schrieb Michael Olbrich: > On Thu, Mar 09, 2017 at 10:37:06AM +0100, Markus Niebel wrote: > > From: Markus Niebel <Markus.Niebel@tq-group.com> > > > > the libhogweed part requires libgmp. Let's make it configurable. > > > > This seems wrong. My understanding is, that the --enable-mini-gmp options > exists to avoid the libgmp dependency by providing a minimalistic version > of libgmp. > If we want to use the 'real' libgmp (Are there any compelling reasons to do > so?) then the --enable-mini-gmp must be _disabled_ if libhogweed is > installed not the other way around. > > Also, the '--with-nettle-mini' of gnutls must be changed to 'without'. And > all other nettle users must be reviewed to check if they need libhogweed. > I did't noticed that in gnutls. But I came up with this because I noticed a build break during a clean rebuild on our buildserver using ptxdist 2017.01: 8<-------------------------------------------------- configure: summary of build options: Version: nettle 3.3 Host type: arm-v7a-linux-gnueabihf ABI: standard Assembly files: arm Install prefix: /usr Library directory: /usr/lib Compiler: arm-v7a-linux-gnueabihf-gcc Static libraries: no Shared libraries: yes Public key crypto: yes Using mini-gmp: yes Documentation: no finished target nettle.prepare ... ---------------------- target: gnutls.prepare ---------------------- checking build system type... x86_64-host-linux-gnu checking host system type... arm-v7a-linux-gnueabihf checking for a BSD-compatible install... /usr/local/lib/ptxdist-2017.01.0/bin/install -c checking whether build environment is sane... yes checking for arm-v7a-linux-gnueabihf-strip... arm-v7a-linux-gnueabihf-strip checking for a thread-safe mkdir -p... /usr/local/lib/ptxdist-2017.01.0/bin/mkdir -p ... checking for gawk... gawk checking whether it is safe to define __EXTENSIONS__... yes checking whether _XOPEN_SOURCE should be defined... no checking for _LARGEFILE_SOURCE value needed for large files... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking dependency style of arm-v7a-linux-gnueabihf-gcc... gcc3 checking for arm-v7a-linux-gnueabihf-ar... arm-v7a-linux-gnueabihf-ar checking the archiver (arm-v7a-linux-gnueabihf-ar) interface... ar checking whether we are using the GNU C++ compiler... yes checking whether arm-v7a-linux-gnueabihf-g++ accepts -g... yes checking dependency style of arm-v7a-linux-gnueabihf-g++... gcc3 checking for bison... bison -y checking for a sed that does not truncate output... /usr/local/lib/ptxdist-2017.01.0/bin/sed checking for autogen... /bin/true configure: WARNING: *** *** autogen not found. Will not link against libopts. *** checking for inline... inline checking for ANSI C header files... (cached) yes checking for NETTLE... yes checking for HOGWEED... yes checking for __gmpz_cmp in -lgmp... no configure: error: *** *** gmp was not found. 8<------------------------------------------------------------------------ This says nettle incl. hogweed were found but a gmp feature was missing for some reason ... So something seems wrong. > Michael > Markus > > Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com> > > > > Conflicts: > > rules/nettle.in > > --- > > rules/nettle.in | 14 +++++++++++++- > > rules/nettle.make | 11 ++++++++++- > > 2 files changed, 23 insertions(+), 2 deletions(-) > > > > diff --git a/rules/nettle.in b/rules/nettle.in > > index fcacb96..f931994 100644 > > --- a/rules/nettle.in > > +++ b/rules/nettle.in > > @@ -1,8 +1,20 @@ > > ## SECTION=networking > > > > -config NETTLE > > +menuconfig NETTLE > > tristate > > prompt "nettle" > > + select LIBGMP if NETTLE_LIBHOGWEED > > help > > Nettle is a cryptographic library. > > > > +if NETTLE > > + > > +config NETTLE_LIBHOGWEED > > + bool > > + prompt "Build libhogweed" > > + help > > + The libhogweed library contains those functions of Nettle that > > + uses bignum operations, and depends on the GMP library > > + > > +endif > > + > > diff --git a/rules/nettle.make b/rules/nettle.make > > index 59df66e..23d6cb8 100644 > > --- a/rules/nettle.make > > +++ b/rules/nettle.make > > @@ -48,8 +48,15 @@ NETTLE_CONF_OPT := \ > > --disable-documentation \ > > --disable-fat \ > > --$(call ptx/endis,PTXCONF_ARCH_ARM_NEON)-arm-neon \ > > - --disable-x86-aesni \ > > + --disable-x86-aesni > > + > > +ifdef PTXCONF_NETTLE_LIBHOGWEED > > +NETTLE_CONF_OPT += \ > > --enable-mini-gmp > > +else > > +NETTLE_CONF_OPT += \ > > + --disable-mini-gmp > > +endif > > > > # ---------------------------------------------------------------------------- > > # Target-Install > > @@ -65,7 +72,9 @@ $(STATEDIR)/nettle.targetinstall: > > @$(call install_fixup, nettle,DESCRIPTION,missing) > > > > @$(call install_lib, nettle, 0, 0, 0644, libnettle) > > +ifdef PTXCONF_NETTLE_LIBHOGWEED > > @$(call install_lib, nettle, 0, 0, 0644, libhogweed) > > +endif > > @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/nettle-hash) > > @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/sexp-conv) > > @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/nettle-lfib-stream) > > -- > > 1.9.1 > > > > > > _______________________________________________ > > ptxdist mailing list > > ptxdist@pengutronix.de > _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed 2017-03-09 16:41 ` Markus Niebel @ 2017-03-09 17:25 ` Michael Olbrich 2017-03-09 17:32 ` Markus Niebel 2017-03-09 17:27 ` Clemens Gruber 1 sibling, 1 reply; 8+ messages in thread From: Michael Olbrich @ 2017-03-09 17:25 UTC (permalink / raw) To: ptxdist On Thu, Mar 09, 2017 at 05:41:04PM +0100, Markus Niebel wrote: > Am Donnerstag, den 09.03.2017, 16:19 +0100 schrieb Michael Olbrich: > > On Thu, Mar 09, 2017 at 10:37:06AM +0100, Markus Niebel wrote: > > > From: Markus Niebel <Markus.Niebel@tq-group.com> > > > > > > the libhogweed part requires libgmp. Let's make it configurable. > > > > > > > This seems wrong. My understanding is, that the --enable-mini-gmp options > > exists to avoid the libgmp dependency by providing a minimalistic version > > of libgmp. > > If we want to use the 'real' libgmp (Are there any compelling reasons to do > > so?) then the --enable-mini-gmp must be _disabled_ if libhogweed is > > installed not the other way around. > > > > Also, the '--with-nettle-mini' of gnutls must be changed to 'without'. And > > all other nettle users must be reviewed to check if they need libhogweed. > > > > I did't noticed that in gnutls. But I came up with this because I > noticed a build break during a clean rebuild on our buildserver using > ptxdist 2017.01: [...] Check master (or 2017.03.0): e0749034b9d6f48e61b57eeb3fa331419d1aa397 ("gnutls: bugfix: remove dependency on libgmp") should fix the problem. With --with-nettle-mini the libgmp check is skipped. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed 2017-03-09 17:25 ` Michael Olbrich @ 2017-03-09 17:32 ` Markus Niebel 0 siblings, 0 replies; 8+ messages in thread From: Markus Niebel @ 2017-03-09 17:32 UTC (permalink / raw) To: ptxdist Am Donnerstag, den 09.03.2017, 18:25 +0100 schrieb Michael Olbrich: > On Thu, Mar 09, 2017 at 05:41:04PM +0100, Markus Niebel wrote: > > Am Donnerstag, den 09.03.2017, 16:19 +0100 schrieb Michael Olbrich: > > > On Thu, Mar 09, 2017 at 10:37:06AM +0100, Markus Niebel wrote: > > > > From: Markus Niebel <Markus.Niebel@tq-group.com> > > > > > > > > the libhogweed part requires libgmp. Let's make it configurable. > > > > > > > > > > This seems wrong. My understanding is, that the --enable-mini-gmp options > > > exists to avoid the libgmp dependency by providing a minimalistic version > > > of libgmp. > > > If we want to use the 'real' libgmp (Are there any compelling reasons to do > > > so?) then the --enable-mini-gmp must be _disabled_ if libhogweed is > > > installed not the other way around. > > > > > > Also, the '--with-nettle-mini' of gnutls must be changed to 'without'. And > > > all other nettle users must be reviewed to check if they need libhogweed. > > > > > > > I did't noticed that in gnutls. But I came up with this because I > > noticed a build break during a clean rebuild on our buildserver using > > ptxdist 2017.01: > [...] > > Check master (or 2017.03.0): e0749034b9d6f48e61b57eeb3fa331419d1aa397 > ("gnutls: bugfix: remove dependency on libgmp") should fix the problem. > With --with-nettle-mini the libgmp check is skipped. > Ah, good. Didn't notice that, thank you and sorry for the noise > Michael > Markus _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed 2017-03-09 16:41 ` Markus Niebel 2017-03-09 17:25 ` Michael Olbrich @ 2017-03-09 17:27 ` Clemens Gruber 1 sibling, 0 replies; 8+ messages in thread From: Clemens Gruber @ 2017-03-09 17:27 UTC (permalink / raw) To: ptxdist On Thu, Mar 09, 2017 at 05:41:04PM +0100, Markus Niebel wrote: > Am Donnerstag, den 09.03.2017, 16:19 +0100 schrieb Michael Olbrich: > > On Thu, Mar 09, 2017 at 10:37:06AM +0100, Markus Niebel wrote: > > > From: Markus Niebel <Markus.Niebel@tq-group.com> > > > > > > the libhogweed part requires libgmp. Let's make it configurable. > > > > > > > This seems wrong. My understanding is, that the --enable-mini-gmp options > > exists to avoid the libgmp dependency by providing a minimalistic version > > of libgmp. > > If we want to use the 'real' libgmp (Are there any compelling reasons to do > > so?) then the --enable-mini-gmp must be _disabled_ if libhogweed is > > installed not the other way around. > > > > Also, the '--with-nettle-mini' of gnutls must be changed to 'without'. And > > all other nettle users must be reviewed to check if they need libhogweed. > > > > I did't noticed that in gnutls. But I came up with this because I > noticed a build break during a clean rebuild on our buildserver using > ptxdist 2017.01: The "real" GMP library is not required if you built gnutls with the --with-nettle-mini option (and nettle with the --enable-mini-gmp option). Since PTXdist 2017.03.0, gnutls is built with --with-nettle-mini. For me, the configure script output for gnutls looks as follows now: (..) checking for NETTLE... yes checking for HOGWEED... yes checking for LIBTASN1... yes checking whether to use the included minitasn1... no checking for asn1_decode_simple_ber... yes checking whether C99 macros are supported... yes checking whether to disable DTLS-SRTP extension... no checking whether to disable ALPN extension... no (..) Could you please try rebuilding your project with PTXdist 2017.03.0 ? Regards, Clemens _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* [ptxdist] [RFC PATCH 2/2] gnutls: needs libhogweed from nettle 2017-03-09 9:37 [ptxdist] [RFC PATCH 0/2] fix indirect gnutls dependency Markus Niebel 2017-03-09 9:37 ` [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed Markus Niebel @ 2017-03-09 9:37 ` Markus Niebel 1 sibling, 0 replies; 8+ messages in thread From: Markus Niebel @ 2017-03-09 9:37 UTC (permalink / raw) To: ptxdist; +Cc: m.olbrich, Markus Niebel From: Markus Niebel <Markus.Niebel@tq-group.com> explicitly select NETTLE_LIBHOGWEED to satisfy additional hidden dep from libgmp Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com> Conflicts: rules/gnutls.in --- rules/gnutls.in | 1 + 1 file changed, 1 insertion(+) diff --git a/rules/gnutls.in b/rules/gnutls.in index 73e610f..f901489 100644 --- a/rules/gnutls.in +++ b/rules/gnutls.in @@ -6,6 +6,7 @@ menuconfig GNUTLS select LIBGCRYPT select LIBTASN1 select NETTLE + select NETTLE_LIBHOGWEED select OPENSSL if GNUTLS_OPENSSL prompt "gnutls " help -- 1.9.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-03-09 17:32 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-03-09 9:37 [ptxdist] [RFC PATCH 0/2] fix indirect gnutls dependency Markus Niebel 2017-03-09 9:37 ` [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed Markus Niebel 2017-03-09 15:19 ` Michael Olbrich 2017-03-09 16:41 ` Markus Niebel 2017-03-09 17:25 ` Michael Olbrich 2017-03-09 17:32 ` Markus Niebel 2017-03-09 17:27 ` Clemens Gruber 2017-03-09 9:37 ` [ptxdist] [RFC PATCH 2/2] gnutls: needs libhogweed from nettle Markus Niebel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox