Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/zeek: disable with uclibc-ng
@ 2022-07-27  7:14 Fabrice Fontaine
  2022-07-27  7:40 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-07-27  7:14 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

zeek unconditionally uses f_owner_ex which is only available with
aarch64 on uclibc-ng
(https://github.com/wbx-github/uclibc-ng/search?q=f_owner_ex) resulting
in the following build failure since the addition of the package in
commit ea36681572255ec906167308c07adc42ed2ac9f9:

/home/giuliobenetti/autobuild/run/instance-0/output-1/build/zeek-4.1.1/auxil/libkqueue/src/linux/platform.c: In function 'linux_kqueue_init':
/home/giuliobenetti/autobuild/run/instance-0/output-1/build/zeek-4.1.1/auxil/libkqueue/src/linux/platform.c:279:23: error: storage size of 'sig_owner' isn't known
  279 |     struct f_owner_ex sig_owner;
      |                       ^~~~~~~~~
/home/giuliobenetti/autobuild/run/instance-0/output-1/build/zeek-4.1.1/auxil/libkqueue/src/linux/platform.c:383:22: error: 'F_OWNER_TID' undeclared (first use in this function)
  383 |     sig_owner.type = F_OWNER_TID;
      |                      ^~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/f15bc6fda2a6117b2beef91a3f97a5d063789102

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/zeek/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/zeek/Config.in b/package/zeek/Config.in
index 123fedb339..01f5337292 100644
--- a/package/zeek/Config.in
+++ b/package/zeek/Config.in
@@ -5,6 +5,7 @@ config BR2_PACKAGE_ZEEK
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_WCHAR
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # f_owner_ex
 	select BR2_PACKAGE_LIBPCAP
 	select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_OPENSSL
@@ -34,7 +35,8 @@ config BR2_PACKAGE_ZEEK_ZEEKCTL
 
 endif
 
-comment "zeek needs a toolchain w/ C++, wchar, threads, dynamic library"
+comment "zeek needs a glibc or musl toolchain w/ C++, wchar, threads, dynamic library"
 	depends on BR2_USE_MMU
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
-		!BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+		!BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
+		BR2_TOOLCHAIN_USES_UCLIBC
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/zeek: disable with uclibc-ng
  2022-07-27  7:14 [Buildroot] [PATCH 1/1] package/zeek: disable with uclibc-ng Fabrice Fontaine
@ 2022-07-27  7:40 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-27  7:40 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

Hello Fabrice,

On Wed, 27 Jul 2022 09:14:12 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> zeek unconditionally uses f_owner_ex which is only available with
> aarch64 on uclibc-ng
> (https://github.com/wbx-github/uclibc-ng/search?q=f_owner_ex) resulting
> in the following build failure since the addition of the package in
> commit ea36681572255ec906167308c07adc42ed2ac9f9:
> 
> /home/giuliobenetti/autobuild/run/instance-0/output-1/build/zeek-4.1.1/auxil/libkqueue/src/linux/platform.c: In function 'linux_kqueue_init':
> /home/giuliobenetti/autobuild/run/instance-0/output-1/build/zeek-4.1.1/auxil/libkqueue/src/linux/platform.c:279:23: error: storage size of 'sig_owner' isn't known
>   279 |     struct f_owner_ex sig_owner;
>       |                       ^~~~~~~~~
> /home/giuliobenetti/autobuild/run/instance-0/output-1/build/zeek-4.1.1/auxil/libkqueue/src/linux/platform.c:383:22: error: 'F_OWNER_TID' undeclared (first use in this function)
>   383 |     sig_owner.type = F_OWNER_TID;
>       |                      ^~~~~~~~~~~
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/f15bc6fda2a6117b2beef91a3f97a5d063789102
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

It's probably a bit of a pity to disable this package on uClibc just
because of this missing structure. I have no idea why uClibc has it
just in the aarch64 headers, because on both glibc and musl, it's
defined in a completely generic way.

So here is my proposal:

 (1) Unbundle libkqueue from zeek, by creating a separate libkqueue
     package (BTW zeek should be investigated further, it contains
     several bundled libraries, and it should preferably use external
     packages instead of bundled libraries).

 (2) Add a patch in libkqueue that checks for the availability of
     f_owner_ex, and if not available, provides its own definition.

 (3) Send a patch to uClibc to add the missing f_owner_ex definition.

Do you think you could have a look into this?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-07-27  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27  7:14 [Buildroot] [PATCH 1/1] package/zeek: disable with uclibc-ng Fabrice Fontaine
2022-07-27  7:40 ` Thomas Petazzoni via buildroot

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