You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While building fluent-bit on buildroot, I saw some build failures for toolchains that are lacking C++ support.
Kafka needs a C++ compiler to get compiled, but given the C codebase, it should be possible to compile it without.
In buildroot, I will have to add this patch to get fluent-bit compiled without Kafka.
commit ed44ebc2d4065ee75036c18b84fdaafec57eaeab (HEAD -> thode/bump-fluent-bit, thode/thode/bump-fluent-bit)
Author: Thomas Devoogdt <thomas.devoogdt@barco.com>
Date: Sun Jul 23 21:05:11 2023 +0200
package/fluent-bit: fix Kafka compilation if no cxx compiler
FLB_{IN,OUT}_KAFKA is enabled by default since v2.1.5,
causing compile errors if no cxx support.
- https://github.com/fluent/fluent-bit/commit/a36cde163db1d882af6714a2a8690060e877d767
- https://github.com/confluentinc/librdkafka/blob/e75de5be191b6b8e9602efc969f4af64071550de/CMakeLists.txt#L282
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index c863e62fdb..63d4346172 100644
--- a/package/fluent-bit/fluent-bit.mk+++ b/package/fluent-bit/fluent-bit.mk@@ -22,6 +22,17 @@ FLUENT_BIT_CONF_OPTS += \
-DFLB_PREFER_SYSTEM_LIBS=Yes \
-DFLB_BACKTRACE=No
+# Kafka support needs a toolchain w/ C+++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+
# WASM runtime support needs a toolchain w/ C++
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y)
To Reproduce
Steps to reproduce the problem:
$ git clone https://github.com/buildroot/buildroot
$ cd buildroot
$ ./utils/test-pkg -p fluent-bit -a
Expected behavior
Compilation should succeed for all the targets.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.
Activity
patrick-stephens commentedon Jul 24, 2023
Any chance you can contribute this @ThomasDevoogdt ?
ThomasDevoogdt commentedon Jul 25, 2023
Created a PR upstream:
If accepted, then I will add a PR here with the upstream change + a change in this CMakeLists.txt file.
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
CMakeLists.txt: disable cxx support for librdkafka fluent#7741
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
CMakeLists.txt: disable cxx support for librdkafka fluent#7741
ThomasDevoogdt commentedon Jul 28, 2023
@patrick-stephens, created a PR:
github-actions commentedon Dec 11, 2023
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the
exempt-stalelabel.github-actions commentedon Dec 19, 2023
This issue was closed because it has been stalled for 5 days with no activity.
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
CMakeLists.txt: disable cxx support for librdkafka fluent#7741
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
4 remaining items
build: disable cxx support for librdkafka fluent#7741
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
build: disable cxx support for librdkafka fluent#7741
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
build: disable cxx support for librdkafka fluent#7741
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
build: disable cxx support for librdkafka fluent#7741
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
build: disable cxx support for librdkafka fluent#7741
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
build: disable cxx support for librdkafka fluent#7741
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
build: disable cxx support for librdkafka fluent#7741
lib: librdkafka: CMakeLists.txt: allow compilation without CXX support …
build: disable cxx support for librdkafka fluent#7741