All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without c++
@ 2023-07-27 21:20 Bernd Kuhls
  2023-07-28  5:01 ` Thomas Devoogdt
  2023-07-28  9:36 ` [Buildroot] [PATCH] " Thomas Devoogdt
  0 siblings, 2 replies; 8+ messages in thread
From: Bernd Kuhls @ 2023-07-27 21:20 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt

The kafka plugin needs c++.

Fixes:
http://autobuild.buildroot.net/results/709/70960056479eab860e94eed993566fcb78c4dbbe/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/fluent-bit/fluent-bit.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index 1185860661..245f6ecf44 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -22,6 +22,16 @@ FLUENT_BIT_CONF_OPTS += \
 	-DFLB_PREFER_SYSTEM_LIBS=Yes \
 	-DFLB_BACKTRACE=No
 
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+FLUENT_BIT_CONF_OPTS += \
+	-DFLB_IN_KAFKA=Yes \
+	-DFLB_OUT_KAFKA=Yes
+else
+FLUENT_BIT_CONF_OPTS += \
+	-DFLB_IN_KAFKA=No \
+	-DFLB_OUT_KAFKA=No
+endif
+
 ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y)
 FLUENT_BIT_WAMR_ARCH = $(call qstrip,$(BR2_PACKAGE_FLUENT_BIT_WASM_ARCH))
 
-- 
2.39.2

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

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

* Re: [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without c++
  2023-07-27 21:20 [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without c++ Bernd Kuhls
@ 2023-07-28  5:01 ` Thomas Devoogdt
  2023-07-28  9:36 ` [Buildroot] [PATCH] " Thomas Devoogdt
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Devoogdt @ 2023-07-28  5:01 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: Thomas Devoogdt, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1546 bytes --]

Hi Bernd,


I know, I have a PR open for this upstream.
https://github.com/confluentinc/librdkafka/pull/4366

Which will then be added to fluent-bit.
https://github.com/fluent/fluent-bit/compare/master...ThomasDevoogdt:fluent-bit:bugfix/7741-librdkafka-without-cxx-support

The last one could then be applied in buildroot as a patch, or will be part
of a next fluent-bit release.

This is the issue which I originally submitted:
https://github.com/fluent/fluent-bit/issues/7741


Kr,

Thomas Devoogdt


Op do 27 jul. 2023 23:20 schreef Bernd Kuhls <bernd@kuhls.net>:

> The kafka plugin needs c++.
>
> Fixes:
>
> http://autobuild.buildroot.net/results/709/70960056479eab860e94eed993566fcb78c4dbbe/
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
>  package/fluent-bit/fluent-bit.mk | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/
> fluent-bit.mk
> index 1185860661..245f6ecf44 100644
> --- a/package/fluent-bit/fluent-bit.mk
> +++ b/package/fluent-bit/fluent-bit.mk
> @@ -22,6 +22,16 @@ FLUENT_BIT_CONF_OPTS += \
>         -DFLB_PREFER_SYSTEM_LIBS=Yes \
>         -DFLB_BACKTRACE=No
>
> +ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
> +FLUENT_BIT_CONF_OPTS += \
> +       -DFLB_IN_KAFKA=Yes \
> +       -DFLB_OUT_KAFKA=Yes
> +else
> +FLUENT_BIT_CONF_OPTS += \
> +       -DFLB_IN_KAFKA=No \
> +       -DFLB_OUT_KAFKA=No
> +endif
> +
>  ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y)
>  FLUENT_BIT_WAMR_ARCH = $(call qstrip,$(BR2_PACKAGE_FLUENT_BIT_WASM_ARCH))
>
> --
> 2.39.2
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 3229 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

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

* [Buildroot] [PATCH] package/fluent-bit: fix build without c++
  2023-07-27 21:20 [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without c++ Bernd Kuhls
  2023-07-28  5:01 ` Thomas Devoogdt
@ 2023-07-28  9:36 ` Thomas Devoogdt
  2023-07-28 19:32   ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Devoogdt @ 2023-07-28  9:36 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Bernd Kuhls

FLB_{IN,OUT}_KAFKA is enabled by default since v2.1.5,
causing compile errors if no c++ support.

These patches allow the Kafka plugin to be build without C++.

Fixes:
 - http://autobuild.buildroot.net/results/d63/d638390da721eb3bdfcc7a4229114b492aaead99/
 - http://autobuild.buildroot.net/results/709/70960056479eab860e94eed993566fcb78c4dbbe/
 - http://autobuild.buildroot.net/results/366/3667126ee954f927f83ccfbaae3c6fb8ebd07dbb/
 - http://autobuild.buildroot.net/results/9bd/9bd090216b9a8005fc3d020a9c0adf5e825bea59/
 - ...

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
 ...MakeLists.txt-allow-compilation-with.patch | 117 ++++++++++++++++++
 ...isable-cxx-support-for-librdkafka-77.patch |  29 +++++
 2 files changed, 146 insertions(+)
 create mode 100644 package/fluent-bit/0002-lib-librdkafka-CMakeLists.txt-allow-compilation-with.patch
 create mode 100644 package/fluent-bit/0003-CMakeLists.txt-disable-cxx-support-for-librdkafka-77.patch

diff --git a/package/fluent-bit/0002-lib-librdkafka-CMakeLists.txt-allow-compilation-with.patch b/package/fluent-bit/0002-lib-librdkafka-CMakeLists.txt-allow-compilation-with.patch
new file mode 100644
index 0000000000..a315fbf7ef
--- /dev/null
+++ b/package/fluent-bit/0002-lib-librdkafka-CMakeLists.txt-allow-compilation-with.patch
@@ -0,0 +1,117 @@
+From d5492ae7a0fa4e2c19b1d091ad28133fed53d8e2 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas.devoogdt@barco.com>
+Date: Tue, 25 Jul 2023 09:10:41 +0200
+Subject: [PATCH] lib: librdkafka: CMakeLists.txt: allow compilation without
+ CXX support #7741
+
+e.g. fluent-bit is a c-only library, so allow compilation without cxx
+
+Upstream: https://github.com/confluentinc/librdkafka/pull/4366
+Upstream: https://github.com/fluent/fluent-bit/pull/7765
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+---
+ lib/librdkafka-2.1.0/CMakeLists.txt          | 18 ++++++++++--
+ lib/librdkafka-2.1.0/examples/CMakeLists.txt | 30 +++++++++++++-------
+ 2 files changed, 35 insertions(+), 13 deletions(-)
+
+diff --git a/lib/librdkafka-2.1.0/CMakeLists.txt b/lib/librdkafka-2.1.0/CMakeLists.txt
+index 7f3dd0fc6..c1ee93062 100644
+--- a/lib/librdkafka-2.1.0/CMakeLists.txt
++++ b/lib/librdkafka-2.1.0/CMakeLists.txt
+@@ -3,7 +3,12 @@ cmake_minimum_required(VERSION 3.2)
+ include("packaging/cmake/parseversion.cmake")
+ parseversion("src/rdkafka.h")
+ 
+-project(RdKafka VERSION ${RDKAFKA_VERSION})
++project(RdKafka VERSION ${RDKAFKA_VERSION} LANGUAGES C)
++
++option(RDKAFKA_BUILD_CXX "Enable CXX support" ON)
++if(RDKAFKA_BUILD_CXX)
++  enable_language(CXX)
++endif()
+ 
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/packaging/cmake/Modules/")
+ 
+@@ -181,7 +186,11 @@ endif()
+ 
+ option(RDKAFKA_BUILD_STATIC "Build static rdkafka library" OFF)
+ option(RDKAFKA_BUILD_EXAMPLES "Build examples" ON)
+-option(RDKAFKA_BUILD_TESTS "Build tests" ON)
++
++if(RDKAFKA_BUILD_CXX)
++    option(RDKAFKA_BUILD_TESTS "Build tests" ON)
++endif()
++
+ if(WIN32)
+     option(WITHOUT_WIN32_CONFIG "Avoid including win32_config.h on cmake builds" ON)
+ endif(WIN32)
+@@ -279,7 +288,10 @@ install(
+ )
+ 
+ add_subdirectory(src)
+-add_subdirectory(src-cpp)
++
++if(RDKAFKA_BUILD_CXX)
++  add_subdirectory(src-cpp)
++endif()
+ 
+ if(RDKAFKA_BUILD_EXAMPLES)
+   add_subdirectory(examples)
+diff --git a/lib/librdkafka-2.1.0/examples/CMakeLists.txt b/lib/librdkafka-2.1.0/examples/CMakeLists.txt
+index bbbb89ad9..51b8b04be 100644
+--- a/lib/librdkafka-2.1.0/examples/CMakeLists.txt
++++ b/lib/librdkafka-2.1.0/examples/CMakeLists.txt
+@@ -5,8 +5,10 @@ endif(WIN32)
+ add_executable(producer producer.c ${win32_sources})
+ target_link_libraries(producer PUBLIC rdkafka)
+ 
+-add_executable(producer_cpp producer.cpp ${win32_sources})
+-target_link_libraries(producer_cpp PUBLIC rdkafka++)
++if(RDKAFKA_BUILD_CXX)
++    add_executable(producer_cpp producer.cpp ${win32_sources})
++    target_link_libraries(producer_cpp PUBLIC rdkafka++)
++endif()
+ 
+ add_executable(consumer consumer.c ${win32_sources})
+ target_link_libraries(consumer PUBLIC rdkafka)
+@@ -14,14 +16,20 @@ target_link_libraries(consumer PUBLIC rdkafka)
+ add_executable(rdkafka_performance rdkafka_performance.c ${win32_sources})
+ target_link_libraries(rdkafka_performance PUBLIC rdkafka)
+ 
+-add_executable(rdkafka_example_cpp rdkafka_example.cpp ${win32_sources})
+-target_link_libraries(rdkafka_example_cpp PUBLIC rdkafka++)
++if(RDKAFKA_BUILD_CXX)
++    add_executable(rdkafka_example_cpp rdkafka_example.cpp ${win32_sources})
++    target_link_libraries(rdkafka_example_cpp PUBLIC rdkafka++)
++endif()
+ 
+-add_executable(rdkafka_complex_consumer_example_cpp rdkafka_complex_consumer_example.cpp ${win32_sources})
+-target_link_libraries(rdkafka_complex_consumer_example_cpp PUBLIC rdkafka++)
++if(RDKAFKA_BUILD_CXX)
++    add_executable(rdkafka_complex_consumer_example_cpp rdkafka_complex_consumer_example.cpp ${win32_sources})
++    target_link_libraries(rdkafka_complex_consumer_example_cpp PUBLIC rdkafka++)
++endif()
+ 
+-add_executable(openssl_engine_example_cpp openssl_engine_example.cpp ${win32_sources})
+-target_link_libraries(openssl_engine_example_cpp PUBLIC rdkafka++)
++if(RDKAFKA_BUILD_CXX)
++    add_executable(openssl_engine_example_cpp openssl_engine_example.cpp ${win32_sources})
++    target_link_libraries(openssl_engine_example_cpp PUBLIC rdkafka++)
++endif()
+ 
+ add_executable(misc misc.c ${win32_sources})
+ target_link_libraries(misc PUBLIC rdkafka)
+@@ -35,6 +43,8 @@ if(NOT WIN32)
+     add_executable(rdkafka_complex_consumer_example rdkafka_complex_consumer_example.c)
+     target_link_libraries(rdkafka_complex_consumer_example PUBLIC rdkafka)
+ 
+-    add_executable(kafkatest_verifiable_client kafkatest_verifiable_client.cpp)
+-    target_link_libraries(kafkatest_verifiable_client PUBLIC rdkafka++)
++    if(RDKAFKA_BUILD_CXX)
++        add_executable(kafkatest_verifiable_client kafkatest_verifiable_client.cpp)
++        target_link_libraries(kafkatest_verifiable_client PUBLIC rdkafka++)
++    endif()
+ endif(NOT WIN32)
+-- 
+2.34.1
+
diff --git a/package/fluent-bit/0003-CMakeLists.txt-disable-cxx-support-for-librdkafka-77.patch b/package/fluent-bit/0003-CMakeLists.txt-disable-cxx-support-for-librdkafka-77.patch
new file mode 100644
index 0000000000..0022d5929c
--- /dev/null
+++ b/package/fluent-bit/0003-CMakeLists.txt-disable-cxx-support-for-librdkafka-77.patch
@@ -0,0 +1,29 @@
+From f5303533fb64bf038dbd8203ac52d94819346239 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas.devoogdt@barco.com>
+Date: Tue, 25 Jul 2023 10:00:36 +0200
+Subject: [PATCH] CMakeLists.txt: disable cxx support for librdkafka #7741
+
+Fluent-bit is c only, so no need to compile cxx.
+This fixes also a compile error in buildroot.
+
+Upstream: https://github.com/fluent/fluent-bit/pull/7765/commits
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index df6b283cf..10e6071f3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -967,6 +967,7 @@ if(FLB_BACKTRACE)
+ endif()
+ 
+ if(FLB_IN_KAFKA OR FLB_OUT_KAFKA)
++    FLB_OPTION(RDKAFKA_BUILD_CXX      Off)
+     FLB_OPTION(RDKAFKA_BUILD_STATIC    On)
+     FLB_OPTION(RDKAFKA_BUILD_EXAMPLES Off)
+     FLB_OPTION(RDKAFKA_BUILD_TESTS    Off)
+-- 
+2.34.1
+
-- 
2.34.1

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

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

* Re: [Buildroot] [PATCH] package/fluent-bit: fix build without c++
  2023-07-28  9:36 ` [Buildroot] [PATCH] " Thomas Devoogdt
@ 2023-07-28 19:32   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-28 19:32 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: Bernd Kuhls, buildroot

On Fri, 28 Jul 2023 11:36:58 +0200
Thomas Devoogdt <thomas@devoogdt.com> wrote:

> FLB_{IN,OUT}_KAFKA is enabled by default since v2.1.5,
> causing compile errors if no c++ support.
> 
> These patches allow the Kafka plugin to be build without C++.
> 
> Fixes:
>  - http://autobuild.buildroot.net/results/d63/d638390da721eb3bdfcc7a4229114b492aaead99/
>  - http://autobuild.buildroot.net/results/709/70960056479eab860e94eed993566fcb78c4dbbe/
>  - http://autobuild.buildroot.net/results/366/3667126ee954f927f83ccfbaae3c6fb8ebd07dbb/
>  - http://autobuild.buildroot.net/results/9bd/9bd090216b9a8005fc3d020a9c0adf5e825bea59/
>  - ...
> 
> Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
> ---
>  ...MakeLists.txt-allow-compilation-with.patch | 117 ++++++++++++++++++
>  ...isable-cxx-support-for-librdkafka-77.patch |  29 +++++
>  2 files changed, 146 insertions(+)
>  create mode 100644 package/fluent-bit/0002-lib-librdkafka-CMakeLists.txt-allow-compilation-with.patch
>  create mode 100644 package/fluent-bit/0003-CMakeLists.txt-disable-cxx-support-for-librdkafka-77.patch

Applied to master, thanks.

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

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

* Re: [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without C++
  2023-02-21 11:34   ` Fabrice Fontaine
@ 2023-02-21 13:50     ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-21 13:50 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Thomas Devoogdt, buildroot

On Tue, 21 Feb 2023 12:34:32 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> A build failure is raised when applying patch because of line ending in
> lib/snappy-fef67ac/CMakeLists.txt

Thanks for pointing this out. Fixed in
https://gitlab.com/buildroot.org/buildroot/-/commit/5c6e45f7eb4981810883961dd3af37ec0dc9d229

Best regards,

Thomas Petazzoni
-- 
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] 8+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without C++
  2023-02-21  8:37 ` Thomas Petazzoni via buildroot
@ 2023-02-21 11:34   ` Fabrice Fontaine
  2023-02-21 13:50     ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 8+ messages in thread
From: Fabrice Fontaine @ 2023-02-21 11:34 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Thomas Devoogdt, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 3474 bytes --]

Le mar. 21 févr. 2023 à 09:37, Thomas Petazzoni <
thomas.petazzoni@bootlin.com> a écrit :

> On Tue, 21 Feb 2023 00:19:02 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > Commit dedbc69022ba0beaf259463ac8082c86776f7e88 was incomplete resuling
> > in the following build failure since the addition of the package in
> > commit 6a0f7c39bcb48fc13aa2ce3fc4996baf1be66483:
> >
> > -- Check for working CXX compiler: /usr/bin/c++ - broken
> > CMake Error at
> /home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62
> (message):
> >   The C++ compiler
> >
> >     "/usr/bin/c++"
> >
> >   is not able to compile a simple test program.
> >
> >   It fails with the following output:
> >
> >     Change Dir:
> /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp
> >
> >     Run Build Command(s):/home/autobuild/make/make -f Makefile
> cmTC_bfb29/fast && make[1]: Entering directory
> '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
> >     /home/autobuild/make/make  -f CMakeFiles/cmTC_bfb29.dir/build.make
> CMakeFiles/cmTC_bfb29.dir/build
> >     make[2]: Entering directory
> '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
> >     Building CXX object CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o
> >     /usr/bin/c++
> --sysroot=/home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/xtensa-buildroot-linux-uclibc/sysroot
>  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> -mlongcalls -mauto-litpools -O2 -g0  -fcommon -U_FILE_OFFSET_BITS  -g -fPIE
> -o CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o -c
> /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
> >     c++: error: unrecognized command-line option '-mlongcalls'
> >     c++: error: unrecognized command-line option '-mauto-litpools'
> >     make[2]: *** [CMakeFiles/cmTC_bfb29.dir/build.make:78:
> CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o] Error 1
> >     make[2]: Leaving directory
> '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
> >     make[1]: *** [Makefile:127: cmTC_bfb29/fast] Error 2
> >     make[1]: Leaving directory
> '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
> >
> >   CMake will not be able to correctly generate this project.
> > Call Stack (most recent call first):
> >   lib/msgpack-c/CMakeLists.txt:2 (project)
> >
> > While at it, add missing comment about C++ dependency for wasm
> >
> > Fixes:
> >  -
> http://autobuild.buildroot.org/results/4b0f90d79d6dbbf976acf1da839260b0ee94ddda
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  .../fluent-bit/0003-fix-build-without-C.patch | 131 ++++++++++++++++++
> >  package/fluent-bit/Config.in                  |   4 +
> >  2 files changed, 135 insertions(+)
> >  create mode 100644 package/fluent-bit/0003-fix-build-without-C.patch
>
> Applied to master, thanks.
>

A build failure is raised when applying patch because of line ending in
lib/snappy-fef67ac/CMakeLists.txt


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


Best Regards,

Fabrice

[-- Attachment #1.2: Type: text/html, Size: 4664 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

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

* Re: [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without C++
  2023-02-20 23:19 [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without C++ Fabrice Fontaine
@ 2023-02-21  8:37 ` Thomas Petazzoni via buildroot
  2023-02-21 11:34   ` Fabrice Fontaine
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-21  8:37 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Thomas Devoogdt, buildroot

On Tue, 21 Feb 2023 00:19:02 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Commit dedbc69022ba0beaf259463ac8082c86776f7e88 was incomplete resuling
> in the following build failure since the addition of the package in
> commit 6a0f7c39bcb48fc13aa2ce3fc4996baf1be66483:
> 
> -- Check for working CXX compiler: /usr/bin/c++ - broken
> CMake Error at /home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
>   The C++ compiler
> 
>     "/usr/bin/c++"
> 
>   is not able to compile a simple test program.
> 
>   It fails with the following output:
> 
>     Change Dir: /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp
> 
>     Run Build Command(s):/home/autobuild/make/make -f Makefile cmTC_bfb29/fast && make[1]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
>     /home/autobuild/make/make  -f CMakeFiles/cmTC_bfb29.dir/build.make CMakeFiles/cmTC_bfb29.dir/build
>     make[2]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
>     Building CXX object CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o
>     /usr/bin/c++ --sysroot=/home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/xtensa-buildroot-linux-uclibc/sysroot   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -O2 -g0  -fcommon -U_FILE_OFFSET_BITS  -g -fPIE -o CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o -c /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
>     c++: error: unrecognized command-line option '-mlongcalls'
>     c++: error: unrecognized command-line option '-mauto-litpools'
>     make[2]: *** [CMakeFiles/cmTC_bfb29.dir/build.make:78: CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o] Error 1
>     make[2]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
>     make[1]: *** [Makefile:127: cmTC_bfb29/fast] Error 2
>     make[1]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
> 
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   lib/msgpack-c/CMakeLists.txt:2 (project)
> 
> While at it, add missing comment about C++ dependency for wasm
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/4b0f90d79d6dbbf976acf1da839260b0ee94ddda
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  .../fluent-bit/0003-fix-build-without-C.patch | 131 ++++++++++++++++++
>  package/fluent-bit/Config.in                  |   4 +
>  2 files changed, 135 insertions(+)
>  create mode 100644 package/fluent-bit/0003-fix-build-without-C.patch

Applied to master, thanks.

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

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

* [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without C++
@ 2023-02-20 23:19 Fabrice Fontaine
  2023-02-21  8:37 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 8+ messages in thread
From: Fabrice Fontaine @ 2023-02-20 23:19 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Fabrice Fontaine

Commit dedbc69022ba0beaf259463ac8082c86776f7e88 was incomplete resuling
in the following build failure since the addition of the package in
commit 6a0f7c39bcb48fc13aa2ce3fc4996baf1be66483:

-- Check for working CXX compiler: /usr/bin/c++ - broken
CMake Error at /home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
  The C++ compiler

    "/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp

    Run Build Command(s):/home/autobuild/make/make -f Makefile cmTC_bfb29/fast && make[1]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
    /home/autobuild/make/make  -f CMakeFiles/cmTC_bfb29.dir/build.make CMakeFiles/cmTC_bfb29.dir/build
    make[2]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o
    /usr/bin/c++ --sysroot=/home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/xtensa-buildroot-linux-uclibc/sysroot   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -O2 -g0  -fcommon -U_FILE_OFFSET_BITS  -g -fPIE -o CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o -c /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    c++: error: unrecognized command-line option '-mlongcalls'
    c++: error: unrecognized command-line option '-mauto-litpools'
    make[2]: *** [CMakeFiles/cmTC_bfb29.dir/build.make:78: CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o] Error 1
    make[2]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
    make[1]: *** [Makefile:127: cmTC_bfb29/fast] Error 2
    make[1]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  lib/msgpack-c/CMakeLists.txt:2 (project)

While at it, add missing comment about C++ dependency for wasm

Fixes:
 - http://autobuild.buildroot.org/results/4b0f90d79d6dbbf976acf1da839260b0ee94ddda

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../fluent-bit/0003-fix-build-without-C.patch | 131 ++++++++++++++++++
 package/fluent-bit/Config.in                  |   4 +
 2 files changed, 135 insertions(+)
 create mode 100644 package/fluent-bit/0003-fix-build-without-C.patch

diff --git a/package/fluent-bit/0003-fix-build-without-C.patch b/package/fluent-bit/0003-fix-build-without-C.patch
new file mode 100644
index 0000000000..16afec3fe5
--- /dev/null
+++ b/package/fluent-bit/0003-fix-build-without-C.patch
@@ -0,0 +1,131 @@
+From 014e44808ebaf29b0c25b5a3fa2e35a99a30f628 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 21 Feb 2023 00:09:57 +0100
+Subject: [PATCH] fix build without C++
+
+Fix the following build failure without C++:
+
+-- Check for working CXX compiler: /usr/bin/c++ - broken
+CMake Error at /home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
+  The C++ compiler
+
+    "/usr/bin/c++"
+
+  is not able to compile a simple test program.
+
+  It fails with the following output:
+
+    Change Dir: /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp
+
+    Run Build Command(s):/home/autobuild/make/make -f Makefile cmTC_bfb29/fast && make[1]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
+    /home/autobuild/make/make  -f CMakeFiles/cmTC_bfb29.dir/build.make CMakeFiles/cmTC_bfb29.dir/build
+    make[2]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
+    Building CXX object CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o
+    /usr/bin/c++ --sysroot=/home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/xtensa-buildroot-linux-uclibc/sysroot   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -O2 -g0  -fcommon -U_FILE_OFFSET_BITS  -g -fPIE -o CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o -c /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
+    c++: error: unrecognized command-line option '-mlongcalls'
+    c++: error: unrecognized command-line option '-mauto-litpools'
+    make[2]: *** [CMakeFiles/cmTC_bfb29.dir/build.make:78: CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o] Error 1
+    make[2]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
+    make[1]: *** [Makefile:127: cmTC_bfb29/fast] Error 2
+    make[1]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
+
+  CMake will not be able to correctly generate this project.
+Call Stack (most recent call first):
+  lib/msgpack-c/CMakeLists.txt:2 (project)
+
+Fixes:
+ - http://autobuild.buildroot.org/results/4b0f90d79d6dbbf976acf1da839260b0ee94ddda
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/fluent/fluent-bit/pull/6893]
+---
+ lib/chunkio/CMakeLists.txt          | 2 +-
+ lib/lwrb/CMakeLists.txt             | 2 +-
+ lib/msgpack-c/CMakeLists.txt        | 2 +-
+ lib/onigmo/CMakeLists.txt           | 2 +-
+ lib/snappy-fef67ac/CMakeLists.txt   | 2 +-
+ lib/tutf8e/CMakeLists.txt           | 2 +-
+ src/stream_processor/CMakeLists.txt | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/lib/chunkio/CMakeLists.txt b/lib/chunkio/CMakeLists.txt
+index 233bce35c..8bfe5199d 100644
+--- a/lib/chunkio/CMakeLists.txt
++++ b/lib/chunkio/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 3.0)
+-project(chunk-io)
++project(chunk-io C)
+ 
+ set(CIO_VERSION_MAJOR  1)
+ set(CIO_VERSION_MINOR  4)
+diff --git a/lib/lwrb/CMakeLists.txt b/lib/lwrb/CMakeLists.txt
+index 2fabd6319..031cbc1dd 100644
+--- a/lib/lwrb/CMakeLists.txt
++++ b/lib/lwrb/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 3.0)
+ 
+ # Setup project
+-project(LwLibPROJECT)
++project(LwLibPROJECT C)
+ 
+ # -------------------------------------------------
+ # This CMakeLists.txt is used only if it is a top-level file.
+diff --git a/lib/msgpack-c/CMakeLists.txt b/lib/msgpack-c/CMakeLists.txt
+index 810ad609a..ffbbc5ddb 100644
+--- a/lib/msgpack-c/CMakeLists.txt
++++ b/lib/msgpack-c/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 2.8)
+-project(msgpack-c)
++project(msgpack-c C)
+ 
+ set(src
+     src/objectc.c
+diff --git a/lib/onigmo/CMakeLists.txt b/lib/onigmo/CMakeLists.txt
+index 4a3b30d7d..66865130a 100644
+--- a/lib/onigmo/CMakeLists.txt
++++ b/lib/onigmo/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 3.4)
+-project(onigmo)
++project(onigmo C)
+ 
+ # Onigmo Version
+ set(ONIGMO_VERSION_MAJOR  6)
+diff --git a/lib/snappy-fef67ac/CMakeLists.txt b/lib/snappy-fef67ac/CMakeLists.txt
+index 8bb1e9598..ae9225c49 100644
+--- a/lib/snappy-fef67ac/CMakeLists.txt
++++ b/lib/snappy-fef67ac/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 2.8)
+-project(snappy-c)
++project(snappy-c C)
+ 
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+ 
+diff --git a/lib/tutf8e/CMakeLists.txt b/lib/tutf8e/CMakeLists.txt
+index 35cbe01ad..a056ef83c 100644
+--- a/lib/tutf8e/CMakeLists.txt
++++ b/lib/tutf8e/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 2.8)
+-project(tutf8e)
++project(tutf8e C)
+ 
+ # Not supported: -std=c90 (lacks support for inline)
+ # Supported:     -std=gnu90, -std=c99 or -std=gnu99
+diff --git a/src/stream_processor/CMakeLists.txt b/src/stream_processor/CMakeLists.txt
+index 8c5d70d13..de2c2fe38 100644
+--- a/src/stream_processor/CMakeLists.txt
++++ b/src/stream_processor/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-project(stream-processor)
++project(stream-processor C)
+ 
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+ 
+-- 
+2.39.0
+
diff --git a/package/fluent-bit/Config.in b/package/fluent-bit/Config.in
index f53eacb447..bfdea895b0 100644
--- a/package/fluent-bit/Config.in
+++ b/package/fluent-bit/Config.in
@@ -30,6 +30,10 @@ config BR2_PACKAGE_FLUENT_BIT_WASM
 	help
 	  Support for WASM-based plugins.
 
+comment "wasm runtime support needs a toolchain w/ C++"
+	depends on BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS
+	depends on !BR2_INSTALL_LIBSTDCPP
+
 endif
 
 comment "fluent-bit needs a toolchain w/ threads, dynamic library"
-- 
2.39.0

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

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

end of thread, other threads:[~2023-07-28 19:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-27 21:20 [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without c++ Bernd Kuhls
2023-07-28  5:01 ` Thomas Devoogdt
2023-07-28  9:36 ` [Buildroot] [PATCH] " Thomas Devoogdt
2023-07-28 19:32   ` Thomas Petazzoni via buildroot
  -- strict thread matches above, loose matches on Subject: below --
2023-02-20 23:19 [Buildroot] [PATCH 1/1] package/fluent-bit: fix build without C++ Fabrice Fontaine
2023-02-21  8:37 ` Thomas Petazzoni via buildroot
2023-02-21 11:34   ` Fabrice Fontaine
2023-02-21 13:50     ` Thomas Petazzoni via buildroot

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.