Skip to content

Kafka support needs a toolchain w/ C++ #7741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ThomasDevoogdt opened this issue Jul 24, 2023 · 5 comments
Closed

Kafka support needs a toolchain w/ C++ #7741

ThomasDevoogdt opened this issue Jul 24, 2023 · 5 comments

Comments

@ThomasDevoogdt
Copy link
Contributor

ThomasDevoogdt commented Jul 24, 2023

Bug Report

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 <[email protected]>
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 <[email protected]>

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.

Your Environment

  • Version used: buildroot nightly
  • Configuration: N/A
  • Server type and version: N/A

Logs
http://autobuild.buildroot.org/?reason=fluent-bit-2.1.7

@patrick-stephens
Copy link
Contributor

Any chance you can contribute this @ThomasDevoogdt ?

@ThomasDevoogdt
Copy link
Contributor Author

Any chance you can contribute this @ThomasDevoogdt ?

Created a PR upstream:

If accepted, then I will add a PR here with the upstream change + a change in this CMakeLists.txt file.

ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Jul 26, 2023
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Jul 26, 2023
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Jul 26, 2023
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Jul 26, 2023
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
@ThomasDevoogdt
Copy link
Contributor Author

Copy link
Contributor

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.

@github-actions github-actions bot added the Stale label Dec 11, 2023
Copy link
Contributor

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2023
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Aug 25, 2024
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Aug 25, 2024
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Nov 9, 2024
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Nov 9, 2024
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Nov 17, 2024
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Nov 17, 2024
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Dec 15, 2024
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Dec 15, 2024
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Jan 10, 2025
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Jan 10, 2025
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Jan 10, 2025
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Jan 10, 2025
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 1, 2025
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 1, 2025
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 16, 2025
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 16, 2025
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 20, 2025
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 20, 2025
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 21, 2025
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 21, 2025
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 22, 2025
…fluent#7741

e.g. fluent-bit is a c-only library, so allow compilation without cxx

Upstream: confluentinc/librdkafka#4366
Signed-off-by: Thomas Devoogdt <[email protected]>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this issue Apr 22, 2025
Fluent-bit is c only, so no need to compile cxx.
This fixes also a compile error in buildroot.

Signed-off-by: Thomas Devoogdt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants