mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] libzmq: Add some conf env variables not automatically detected
@ 2022-09-02  6:09 Alexander Dahl
  2022-09-02  6:47 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Dahl @ 2022-09-02  6:09 UTC (permalink / raw)
  To: ptxdist

Follow up to the discussion on the last version bump.
zmq does not (try to) detect these features when cross compiling,
so we must assist.
Output of prepare stage contains this now:

    checking whether EFD_CLOEXEC is supported... (cached) yes
    …
    checking whether SOCK_CLOEXEC is supported... (cached) yes
    checking whether O_CLOEXEC is supported... (cached) yes
    checking whether SO_BINDTODEVICE is supported... (cached) yes
    checking whether SO_KEEPALIVE is supported... (cached) yes
    checking whether TCP_KEEPCNT is supported... (cached) yes
    checking whether TCP_KEEPIDLE is supported... (cached) yes
    checking whether TCP_KEEPINTVL is supported... (cached) yes
    checking whether TCP_KEEPALIVE is supported... not during cross-compile
    checking whether SO_PRIORITY is supported... (cached) yes
    checking whether getrandom is supported... not during cross-compile

Link: https://lore.ptxdist.org/ptxdist/20220708151537.GK20240@pengutronix.de/T/#m9b6e02442a30b09d25fe98258051ebd34ee4f94b
---
 rules/libzmq.make | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/rules/libzmq.make b/rules/libzmq.make
index d221ef6ac..eb52b339c 100644
--- a/rules/libzmq.make
+++ b/rules/libzmq.make
@@ -34,6 +34,29 @@ LIBZMQ_CONF_ENV		:= \
 	$(CROSS_ENV) \
 	ac_cv_lib_sodium_sodium_init=no
 
+# Assume these are always available:
+# - O_CLOEXEC		(2007, glibc 2.7, kernel 2.6.23)
+# - EFD_CLOEXEC		(2008, glibc 2.9, kernel 2.6.27)
+# - SOCK_CLOEXEC	(2008, glibc 2.9, kernel 2.6.27)
+# - SO_BINDTODEVICE	(2009, kernel 2.6.31)
+# - SO_KEEPALIVE	(2009, glibc 1.x, kernel 2.6.31)
+# - SO_PRIORITY		(2009, kernel 2.6.31)
+# - TCP_KEEPCNT		(pre 2005/2013, glibc 2.18, pre kernel 2.6.12)
+# - TCP_KEEPIDLE	(pre 2005/2013, glibc 2.18, pre kernel 2.6.12)
+# - TCP_KEEPINTVL	(pre 2005/2013, glibc 2.18, pre kernel 2.6.12)
+# Note: TCP_KEEPALIVE is not available in glibc/kernel,
+# and getrandom(2) was introduced later with glibc 2.25, kernel 3.17)
+LIBZMQ_CONF_ENV		+= \
+	libzmq_cv_o_cloexec=yes \
+	libzmq_cv_efd_cloexec=yes \
+	libzmq_cv_sock_cloexec=yes \
+	libzmq_cv_so_bindtodevice=yes \
+	libzmq_cv_so_keepalive=yes \
+	libzmq_cv_so_priority=yes \
+	libzmq_cv_tcp_keepcnt=yes \
+	libzmq_cv_tcp_keepidle=yes \
+	libzmq_cv_tcp_keepintvl=yes
+
 #
 # autoconf
 #

base-commit: 20275946c697076ca6f696276117daf08ca6f4d1
-- 
2.30.2




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

* Re: [ptxdist] [PATCH] libzmq: Add some conf env variables not automatically detected
  2022-09-02  6:09 [ptxdist] [PATCH] libzmq: Add some conf env variables not automatically detected Alexander Dahl
@ 2022-09-02  6:47 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2022-09-02  6:47 UTC (permalink / raw)
  To: Alexander Dahl; +Cc: ptxdist

On Fri, Sep 02, 2022 at 08:09:54AM +0200, Alexander Dahl wrote:
> Follow up to the discussion on the last version bump.
> zmq does not (try to) detect these features when cross compiling,
> so we must assist.
> Output of prepare stage contains this now:
> 
>     checking whether EFD_CLOEXEC is supported... (cached) yes
>     …
>     checking whether SOCK_CLOEXEC is supported... (cached) yes
>     checking whether O_CLOEXEC is supported... (cached) yes
>     checking whether SO_BINDTODEVICE is supported... (cached) yes
>     checking whether SO_KEEPALIVE is supported... (cached) yes
>     checking whether TCP_KEEPCNT is supported... (cached) yes
>     checking whether TCP_KEEPIDLE is supported... (cached) yes
>     checking whether TCP_KEEPINTVL is supported... (cached) yes
>     checking whether TCP_KEEPALIVE is supported... not during cross-compile
>     checking whether SO_PRIORITY is supported... (cached) yes
>     checking whether getrandom is supported... not during cross-compile
> 
> Link: https://lore.ptxdist.org/ptxdist/20220708151537.GK20240@pengutronix.de/T/#m9b6e02442a30b09d25fe98258051ebd34ee4f94b
> ---
>  rules/libzmq.make | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/rules/libzmq.make b/rules/libzmq.make
> index d221ef6ac..eb52b339c 100644
> --- a/rules/libzmq.make
> +++ b/rules/libzmq.make
> @@ -34,6 +34,29 @@ LIBZMQ_CONF_ENV		:= \
>  	$(CROSS_ENV) \
>  	ac_cv_lib_sodium_sodium_init=no
>  
> +# Assume these are always available:
> +# - O_CLOEXEC		(2007, glibc 2.7, kernel 2.6.23)
> +# - EFD_CLOEXEC		(2008, glibc 2.9, kernel 2.6.27)
> +# - SOCK_CLOEXEC	(2008, glibc 2.9, kernel 2.6.27)
> +# - SO_BINDTODEVICE	(2009, kernel 2.6.31)
> +# - SO_KEEPALIVE	(2009, glibc 1.x, kernel 2.6.31)
> +# - SO_PRIORITY		(2009, kernel 2.6.31)
> +# - TCP_KEEPCNT		(pre 2005/2013, glibc 2.18, pre kernel 2.6.12)
> +# - TCP_KEEPIDLE	(pre 2005/2013, glibc 2.18, pre kernel 2.6.12)
> +# - TCP_KEEPINTVL	(pre 2005/2013, glibc 2.18, pre kernel 2.6.12)
> +# Note: TCP_KEEPALIVE is not available in glibc/kernel,

Good point.

> +# and getrandom(2) was introduced later with glibc 2.25, kernel 3.17)

glibc 2.25 was released more than 5 years ago. I'm not sure the current
ptxdist will build with such and old glibc. And kernel 3.17 is even older.
So I'd suggest we enable this as well.

Michael

> +LIBZMQ_CONF_ENV		+= \
> +	libzmq_cv_o_cloexec=yes \
> +	libzmq_cv_efd_cloexec=yes \
> +	libzmq_cv_sock_cloexec=yes \
> +	libzmq_cv_so_bindtodevice=yes \
> +	libzmq_cv_so_keepalive=yes \
> +	libzmq_cv_so_priority=yes \
> +	libzmq_cv_tcp_keepcnt=yes \
> +	libzmq_cv_tcp_keepidle=yes \
> +	libzmq_cv_tcp_keepintvl=yes
> +
>  #
>  # autoconf
>  #
> 
> base-commit: 20275946c697076ca6f696276117daf08ca6f4d1
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2022-09-02  6:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02  6:09 [ptxdist] [PATCH] libzmq: Add some conf env variables not automatically detected Alexander Dahl
2022-09-02  6:47 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox