diff mbox series

[v2,1/3] package/fluent-bit: needs C++

Message ID 20230129094530.884944-1-thomas.devoogdt@barco.com
State Changes Requested
Headers show
Series [v2,1/3] package/fluent-bit: needs C++ | expand

Commit Message

Thomas Devoogdt Jan. 29, 2023, 9:45 a.m. UTC
From: Thomas Devoogdt <thomas.devoogdt@gmail.com>

Fixes:
 - http://autobuild.buildroot.net/results/007/007c7c69e54b8ff663891da4535e2e95d40c42a2/build-end.log
 - http://autobuild.buildroot.net/results/ede/ede6f9fb67c0c26ff02e71a3d20e3d4344ea59f0/build-end.log

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@gmail.com>
---
v1 --> v2:
 - added package/ prefix to the git message

 package/fluent-bit/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Yann E. MORIN Jan. 29, 2023, 3:56 p.m. UTC | #1
Thomas, All,

On 2023-01-29 10:45 +0100, Thomas Devoogdt spake thusly:
> From: Thomas Devoogdt <thomas.devoogdt@gmail.com>
> 
> Fixes:
>  - http://autobuild.buildroot.net/results/007/007c7c69e54b8ff663891da4535e2e95d40c42a2/build-end.log
>  - http://autobuild.buildroot.net/results/ede/ede6f9fb67c0c26ff02e71a3d20e3d4344ea59f0/build-end.log
> 
> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@gmail.com>
> ---
> v1 --> v2:
>  - added package/ prefix to the git message
> 
>  package/fluent-bit/Config.in | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/package/fluent-bit/Config.in b/package/fluent-bit/Config.in
> index 11ceb55d4f..bd89c05faa 100644
> --- a/package/fluent-bit/Config.in
> +++ b/package/fluent-bit/Config.in
> @@ -1,5 +1,6 @@
>  config BR2_PACKAGE_FLUENT_BIT
>  	bool "fluent-bit"
> +	depends on BR2_INSTALL_LIBSTDCPP

Are you sure? The test that fails is that cmake can't find a C++
compiler, indeed.

But if we look at the source tree, we can see that fluent-bit itself is
written in C, and that there are only 4 bundled libraries that have C++
source files:
  - librdkafka, which is optional;
  - c-ares, and it's only for tests;
  - jemalloc, and C++ is only optional there;
  - wasm-micro-runtime-WAMR, but that is only when targetting
    web-assembly, which we don't.

So, I thnk the test in CMakeFile.txt should be fixed to bot require C++
by default, and only enable C++ support when it is needed (i.e. just for
the Kafka bacnkend?), and then in Buildroot, we disable the Kafka
backend when we don;t have C++, and only enabke it when we do (or even
add an option for it).

Looking at the kafka backend, it should also be possible to not require
C++ for it, as it builds two libs, a C-ionly one, and a C++ one.

Regards,
Yann E. MORIN.

>  	depends on BR2_TOOLCHAIN_USES_GLIBC
>  	select BR2_PACKAGE_OPENSSL
>  	select BR2_PACKAGE_LIBYAML
> @@ -8,5 +9,5 @@ config BR2_PACKAGE_FLUENT_BIT
>  
>  	  https://github.com/fluent/fluent-bit
>  
> -comment "fluent-bit needs a glibc toolchain"
> -	depends on !BR2_TOOLCHAIN_USES_GLIBC
> +comment "fluent-bit needs a glibc toolchain w/ C++"
> +	depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP
> -- 
> 2.39.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/fluent-bit/Config.in b/package/fluent-bit/Config.in
index 11ceb55d4f..bd89c05faa 100644
--- a/package/fluent-bit/Config.in
+++ b/package/fluent-bit/Config.in
@@ -1,5 +1,6 @@ 
 config BR2_PACKAGE_FLUENT_BIT
 	bool "fluent-bit"
+	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_LIBYAML
@@ -8,5 +9,5 @@  config BR2_PACKAGE_FLUENT_BIT
 
 	  https://github.com/fluent/fluent-bit
 
-comment "fluent-bit needs a glibc toolchain"
-	depends on !BR2_TOOLCHAIN_USES_GLIBC
+comment "fluent-bit needs a glibc toolchain w/ C++"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP