All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency
@ 2020-07-27 12:41 Fabrice Fontaine
  2020-07-27 12:51 ` Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Fabrice Fontaine @ 2020-07-27 12:41 UTC (permalink / raw)
  To: buildroot

openssl is an optional dependency that is enabled by default since
version 0.7.0 and
https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/capnproto/capnproto.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk
index 34fb885914..2afeb8ffa3 100644
--- a/package/capnproto/capnproto.mk
+++ b/package/capnproto/capnproto.mk
@@ -21,5 +21,12 @@ endif
 # The actual source to be compiled is within a 'c++' subdirectory
 CAPNPROTO_SUBDIR = c++
 
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+CAPNPROTO_CONF_OPTS += --with-openssl
+CAPNPROTO_DEPENDENCIES += openssl
+else
+CAPNPROTO_CONF_OPTS += --without-openssl
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.27.0

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

* [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency
  2020-07-27 12:41 [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency Fabrice Fontaine
@ 2020-07-27 12:51 ` Yann E. MORIN
  2020-08-08 21:40   ` Thomas Petazzoni
  2020-07-28  6:41 ` Koen Martens
  2020-08-28 16:28 ` Peter Korsgaard
  2 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2020-07-27 12:51 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2020-07-27 14:41 +0200, Fabrice Fontaine spake thusly:
> openssl is an optional dependency that is enabled by default since
> version 0.7.0 and
> https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75

Seeing how they are testing for openssl, will that no fail for a staitc
link, because they forget to link with -lz in that case ?

      AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [:], [
        with_openssl=no
      ], [-lcrypto])

Why don't they yse pkg-config?

Additionally/alternatively, they do have a cmake-based buildsystem. Can
we switch over?

Regards,
Yann E. MORIN.

> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/capnproto/capnproto.mk | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk
> index 34fb885914..2afeb8ffa3 100644
> --- a/package/capnproto/capnproto.mk
> +++ b/package/capnproto/capnproto.mk
> @@ -21,5 +21,12 @@ endif
>  # The actual source to be compiled is within a 'c++' subdirectory
>  CAPNPROTO_SUBDIR = c++
>  
> +ifeq ($(BR2_PACKAGE_OPENSSL),y)
> +CAPNPROTO_CONF_OPTS += --with-openssl
> +CAPNPROTO_DEPENDENCIES += openssl
> +else
> +CAPNPROTO_CONF_OPTS += --without-openssl
> +endif
> +
>  $(eval $(autotools-package))
>  $(eval $(host-autotools-package))
> -- 
> 2.27.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency
  2020-07-27 12:41 [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency Fabrice Fontaine
  2020-07-27 12:51 ` Yann E. MORIN
@ 2020-07-28  6:41 ` Koen Martens
  2020-08-28 16:28 ` Peter Korsgaard
  2 siblings, 0 replies; 7+ messages in thread
From: Koen Martens @ 2020-07-28  6:41 UTC (permalink / raw)
  To: buildroot

Hi,

I'm still waiting for this to be approved/merged:

https://patchwork.ozlabs.org/project/buildroot/patch/20200516075313.GB31946 at coltrane/

Pending that, I'm not touching the package.

Cheers,

Koen

On Mon, Jul 27, 2020 at 02:41:45PM +0200, Fabrice Fontaine wrote:
> openssl is an optional dependency that is enabled by default since
> version 0.7.0 and
> https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/capnproto/capnproto.mk | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk
> index 34fb885914..2afeb8ffa3 100644
> --- a/package/capnproto/capnproto.mk
> +++ b/package/capnproto/capnproto.mk
> @@ -21,5 +21,12 @@ endif
>  # The actual source to be compiled is within a 'c++' subdirectory
>  CAPNPROTO_SUBDIR = c++
>  
> +ifeq ($(BR2_PACKAGE_OPENSSL),y)
> +CAPNPROTO_CONF_OPTS += --with-openssl
> +CAPNPROTO_DEPENDENCIES += openssl
> +else
> +CAPNPROTO_CONF_OPTS += --without-openssl
> +endif
> +
>  $(eval $(autotools-package))
>  $(eval $(host-autotools-package))
> -- 
> 2.27.0
> 

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

* [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency
  2020-07-27 12:51 ` Yann E. MORIN
@ 2020-08-08 21:40   ` Thomas Petazzoni
  2020-08-09 16:52     ` Yann E. MORIN
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2020-08-08 21:40 UTC (permalink / raw)
  To: buildroot

On Mon, 27 Jul 2020 14:51:40 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> On 2020-07-27 14:41 +0200, Fabrice Fontaine spake thusly:
> > openssl is an optional dependency that is enabled by default since
> > version 0.7.0 and
> > https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75  
> 
> Seeing how they are testing for openssl, will that no fail for a staitc
> link, because they forget to link with -lz in that case ?
> 
>       AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [:], [
>         with_openssl=no
>       ], [-lcrypto])
> 
> Why don't they yse pkg-config?

It is weird, we don't have any build failures for this. I would assume
that any configuration where OpenSSL gets built before capnproto (by
chance) and is static should exhibit a build failure, but it's not the
case.

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

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

* [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency
  2020-08-08 21:40   ` Thomas Petazzoni
@ 2020-08-09 16:52     ` Yann E. MORIN
  2020-08-13 21:23       ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2020-08-09 16:52 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2020-08-08 23:40 +0200, Thomas Petazzoni spake thusly:
> On Mon, 27 Jul 2020 14:51:40 +0200
> "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > On 2020-07-27 14:41 +0200, Fabrice Fontaine spake thusly:
> > > openssl is an optional dependency that is enabled by default since
> > > version 0.7.0 and
> > > https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75  
> > Seeing how they are testing for openssl, will that no fail for a staitc
> > link, because they forget to link with -lz in that case ?
> > 
> >       AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [:], [
> >         with_openssl=no
> >       ], [-lcrypto])
> > 
> > Why don't they yse pkg-config?
> It is weird, we don't have any build failures for this. I would assume
> that any configuration where OpenSSL gets built before capnproto (by
> chance) and is static should exhibit a build failure, but it's not the
> case.

So, I got the answer, at least partially:

  - the code snippet above is only executed when auto-detection is done

    - before this patch, it would alwasys fail in static builds, so
      capnproto would always be built without ssl/tls support, and a
      shared build would depend on the build ordering;

    - with this patch, we explicitly enable or disable openssl support,
      so the code snippet is not executed.

  - the dependency on openssl is only used to build a library, that is
    not used to link an executable in capnproto, and does not seem to be
    used by of our in-tree packages that use capnproto.

And indeed, the link forget -lz )indentation mine):

    /bin/bash ./libtool --tag=CXX \
        --mode=link /home/ymorin/dev/buildroot/O/host/bin/arm-linux-g++ \
        [...] \
        -DKJ_HAS_OPENSSL \
        -o libkj-tls.la \
        [...] \
        -lssl -lcrypto -latomic

so indeed, no -lz.

Furthermre, capnproto does install a bunch of .pc file, but installs
none for libkj-tls. And none of the .pc files insalled ever reference
libkj-tls or ssl or crypto.

That's why we have no build failure in our autobuilders.

Yet, I wonder how openssl support works in capnproto, and if this patch
ever makes sense in the context of Buildroot...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency
  2020-08-09 16:52     ` Yann E. MORIN
@ 2020-08-13 21:23       ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2020-08-13 21:23 UTC (permalink / raw)
  To: buildroot

On Sun, 9 Aug 2020 18:52:15 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> So, I got the answer, at least partially:
> 
>   - the code snippet above is only executed when auto-detection is done
> 
>     - before this patch, it would alwasys fail in static builds, so
>       capnproto would always be built without ssl/tls support, and a
>       shared build would depend on the build ordering;
> 
>     - with this patch, we explicitly enable or disable openssl support,
>       so the code snippet is not executed.
> 
>   - the dependency on openssl is only used to build a library, that is
>     not used to link an executable in capnproto, and does not seem to be
>     used by of our in-tree packages that use capnproto.
> 
> And indeed, the link forget -lz )indentation mine):
> 
>     /bin/bash ./libtool --tag=CXX \
>         --mode=link /home/ymorin/dev/buildroot/O/host/bin/arm-linux-g++ \
>         [...] \
>         -DKJ_HAS_OPENSSL \
>         -o libkj-tls.la \
>         [...] \
>         -lssl -lcrypto -latomic
> 
> so indeed, no -lz.
> 
> Furthermre, capnproto does install a bunch of .pc file, but installs
> none for libkj-tls. And none of the .pc files insalled ever reference
> libkj-tls or ssl or crypto.
> 
> That's why we have no build failure in our autobuilders.
> 
> Yet, I wonder how openssl support works in capnproto, and if this patch
> ever makes sense in the context of Buildroot...

Thanks for the exhaustive research! I think we should not only look at
packages that are in Buildroot: people may be having their own custom
stuff that links against libkj-tls, so overall I think the patch makes
sense. There is something that optionally links against OpenSSL in
capnproto, so we should have an optional dependency on OpenSSL.

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

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

* [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency
  2020-07-27 12:41 [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency Fabrice Fontaine
  2020-07-27 12:51 ` Yann E. MORIN
  2020-07-28  6:41 ` Koen Martens
@ 2020-08-28 16:28 ` Peter Korsgaard
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2020-08-28 16:28 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > openssl is an optional dependency that is enabled by default since
 > version 0.7.0 and
 > https://github.com/capnproto/capnproto/commit/23db5e3fd91104a0b2881d8f8ab3c10bf9dd8e75

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2020.02.x and 2020.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2020-08-28 16:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 12:41 [Buildroot] [PATCH 1/1] package/capnproto: add openssl optional dependency Fabrice Fontaine
2020-07-27 12:51 ` Yann E. MORIN
2020-08-08 21:40   ` Thomas Petazzoni
2020-08-09 16:52     ` Yann E. MORIN
2020-08-13 21:23       ` Thomas Petazzoni
2020-07-28  6:41 ` Koen Martens
2020-08-28 16:28 ` Peter Korsgaard

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.