Skip to content

Commit

Permalink
package/fluent-bit: bump to 3.2.0
Browse files Browse the repository at this point in the history
News:

https://fluentbit.io/announcements/v3.2.0/
https://fluentbit.io/announcements/v3.1.10/
https://fluentbit.io/announcements/v3.1.9/
https://fluentbit.io/announcements/v3.1.8/
https://fluentbit.io/announcements/v3.1.7/
https://fluentbit.io/announcements/v3.1.6/
https://fluentbit.io/announcements/v3.1.5/
https://fluentbit.io/announcements/v3.1.4/

Support has been added for (some) system provided libraries,
see:
 - fluent/fluent-bit#7286
 - fluent/fluent-bit#8930

The c-ares and nghttp2 package are always needed, so use
the buildroot shipped versions. Also allow the usage of
libbacktrace and jemalloc.

A bunch of new compile fixes have been added,
all of them are proposed upstream for review.

Signed-off-by: Thomas Devoogdt <[email protected]>
  • Loading branch information
ThomasDevoogdt committed Nov 16, 2024
1 parent e63ede8 commit 628ed46
Show file tree
Hide file tree
Showing 12 changed files with 318 additions and 106 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 29be5275f6f7e15aca768e9b235998abc5a604e2 Mon Sep 17 00:00:00 2001
From 4673bad24352eefe514f36e65f63fc4db51a4d07 Mon Sep 17 00:00:00 2001
From: Thomas Devoogdt <[email protected]>
Date: Tue, 25 Jul 2023 09:10:41 +0200
Subject: [PATCH] lib: librdkafka: CMakeLists.txt: allow compilation without
Expand All @@ -7,13 +7,11 @@ Subject: [PATCH] lib: librdkafka: CMakeLists.txt: allow compilation without
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
Upstream: https://github.com/fluent/fluent-bit/pull/9277
Signed-off-by: Thomas Devoogdt <[email protected]>
[Fabrice: update for 3.1.3]
Signed-off-by: Fabrice Fontaine <[email protected]>
---
lib/librdkafka-2.3.0/CMakeLists.txt | 18 ++++++++++--
lib/librdkafka-2.3.0/examples/CMakeLists.txt | 31 +++++++++++++-------
lib/librdkafka-2.4.0/CMakeLists.txt | 18 ++++++++++--
lib/librdkafka-2.4.0/examples/CMakeLists.txt | 31 +++++++++++++-------
2 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/lib/librdkafka-2.4.0/CMakeLists.txt b/lib/librdkafka-2.4.0/CMakeLists.txt
Expand Down Expand Up @@ -116,5 +114,5 @@ index 8c0079abe..c9336b729 100644
+ endif()
endif(NOT WIN32)
--
2.34.1
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 24a547a6c3506aaf88849bfa6f97993e09d6b36a Mon Sep 17 00:00:00 2001
From: Thomas Devoogdt <[email protected]>
Date: Tue, 25 Jul 2023 10:00:36 +0200
Subject: [PATCH] build: 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/9277
Signed-off-by: Thomas Devoogdt <[email protected]>
---
cmake/kafka.cmake | 1 +
1 file changed, 1 insertion(+)

diff --git a/cmake/kafka.cmake b/cmake/kafka.cmake
index 3a0ebfed2..af0e2f460 100644
--- a/cmake/kafka.cmake
+++ b/cmake/kafka.cmake
@@ -1,4 +1,5 @@
# kafka cmake
+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.43.0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
From c40033a8d427f593ecfce47ecba610a1f8a48274 Mon Sep 17 00:00:00 2001
From: Thomas Devoogdt <[email protected]>
Date: Sun, 25 Aug 2024 20:09:21 +0200
Subject: [PATCH] lib: nghttp2: CMakeLists.txt: do not require a CXX compiler

Upstream: https://github.com/nghttp2/nghttp2/commit/d9d266124c9f851bab7927321da6637d930367e2
Upstream: https://github.com/fluent/fluent-bit/pull/9277
Signed-off-by: Thomas Devoogdt <[email protected]>
---
lib/nghttp2/CMakeLists.txt | 50 ++++++++++++++++++++------------------
1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/lib/nghttp2/CMakeLists.txt b/lib/nghttp2/CMakeLists.txt
index ee4cb0a4a..90c00b1dd 100644
--- a/lib/nghttp2/CMakeLists.txt
+++ b/lib/nghttp2/CMakeLists.txt
@@ -24,7 +24,7 @@

cmake_minimum_required(VERSION 3.0)
# XXX using 1.8.90 instead of 1.9.0-DEV
-project(nghttp2 VERSION 1.58.90)
+project(nghttp2 VERSION 1.58.90 LANGUAGES C)

# See versioning rule:
# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
@@ -122,29 +122,31 @@ else()
set(HINT_NORETURN)
endif()

-include(ExtractValidFlags)
-foreach(_cxx1x_flag -std=c++14)
- extract_valid_cxx_flags(_cxx1x_flag_supported ${_cxx1x_flag})
- if(_cxx1x_flag_supported)
- set(CXX1XCXXFLAGS ${_cxx1x_flag})
- break()
- endif()
-endforeach()
+if(NOT ENABLE_LIB_ONLY)
+ include(ExtractValidFlags)
+ foreach(_cxx1x_flag -std=c++14)
+ extract_valid_cxx_flags(_cxx1x_flag_supported ${_cxx1x_flag})
+ if(_cxx1x_flag_supported)
+ set(CXX1XCXXFLAGS ${_cxx1x_flag})
+ break()
+ endif()
+ endforeach()

-include(CMakePushCheckState)
-include(CheckCXXSourceCompiles)
-cmake_push_check_state()
-set(CMAKE_REQUIRED_DEFINITIONS "${CXX1XCXXFLAGS}")
-# Check that std::future is available.
-check_cxx_source_compiles("
-#include <vector>
-#include <future>
-int main() { std::vector<std::future<int>> v; }" HAVE_STD_FUTURE)
-# Check that std::map::emplace is available for g++-4.7.
-check_cxx_source_compiles("
-#include <map>
-int main() { std::map<int, int>().emplace(1, 2); }" HAVE_STD_MAP_EMPLACE)
-cmake_pop_check_state()
+ include(CMakePushCheckState)
+ include(CheckCXXSourceCompiles)
+ cmake_push_check_state()
+ set(CMAKE_REQUIRED_DEFINITIONS "${CXX1XCXXFLAGS}")
+ # Check that std::future is available.
+ check_cxx_source_compiles("
+ #include <vector>
+ #include <future>
+ int main() { std::vector<std::future<int>> v; }" HAVE_STD_FUTURE)
+ # Check that std::map::emplace is available for g++-4.7.
+ check_cxx_source_compiles("
+ #include <map>
+ int main() { std::map<int, int>().emplace(1, 2); }" HAVE_STD_MAP_EMPLACE)
+ cmake_pop_check_state()
+endif()


# Checks for libraries.
@@ -177,7 +179,7 @@ endif()
# openssl (for src)
include(CheckSymbolExists)
set(HAVE_OPENSSL ${OPENSSL_FOUND})
-if(OPENSSL_FOUND)
+if(NOT ENABLE_LIB_ONLY AND OPENSSL_FOUND)
set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
cmake_push_check_state()
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
--
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 09c8b4b58dca1d1d9b03275338f9228d908cfd1d Mon Sep 17 00:00:00 2001
From: Thomas Devoogdt <[email protected]>
Date: Sun, 25 Aug 2024 20:10:27 +0200
Subject: [PATCH] lib: luajit-cmake: CMakeLists.txt: do not require a CXX
compiler

Upstream: https://github.com/fluent/fluent-bit/pull/9277
Signed-off-by: Thomas Devoogdt <[email protected]>
---
lib/luajit-cmake/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/luajit-cmake/CMakeLists.txt b/lib/luajit-cmake/CMakeLists.txt
index 7baf878c7..051a800f5 100644
--- a/lib/luajit-cmake/CMakeLists.txt
+++ b/lib/luajit-cmake/CMakeLists.txt
@@ -13,7 +13,7 @@ endif()

get_directory_property(hasParent PARENT_DIRECTORY)
if(LUAJIT_DIR)
- project(luajit)
+ project(luajit LANGUAGES C)
include(LuaJIT.cmake)
if (hasParent)
set(LUA_TARGET $<TARGET_FILE:luajit> PARENT_SCOPE)
@@ -24,7 +24,7 @@ if(LUAJIT_DIR)
endif()
endif()
elseif(LUA_DIR)
- project(lua)
+ project(lua LANGUAGES C)
include(lua.cmake)
if (hasParent)
set(LUA_TARGET $<TARGET_FILE:lua> PARENT_SCOPE)
--
2.43.0

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 7eacb2ab839e74cb07038398def5e3cc198448d4 Mon Sep 17 00:00:00 2001
From 249708897806fedc92c2a1e4caa47b53c49d23c0 Mon Sep 17 00:00:00 2001
From: Wenyong Huang <[email protected]>
Date: Tue, 23 Jan 2024 12:21:20 +0800
Subject: [PATCH] Enhance setting write gs base with cmake variable (#3066)
Expand Down Expand Up @@ -95,5 +95,5 @@ index e73ebc85f..a61a522f3 100644
endif ()
if (WAMR_CONFIGUABLE_BOUNDS_CHECKS EQUAL 1)
--
2.34.1
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 69b66af5e2b5deed6069dd45266bfce07cedbb14 Mon Sep 17 00:00:00 2001
From: Thomas Devoogdt <[email protected]>
Date: Sat, 16 Nov 2024 19:46:28 +0100
Subject: [PATCH] plugins/{in,out}_kafka/CMakeLists.txt: fix cross compile
error

KAFKA_INCLUDEDIR is not set if FLB_PREFER_SYSTEM_LIB_KAFKA is not used,
when cross-compiling, it just translates to -I/librdkafka, which is not allowed.
Fix this by only including KAFKA_INCLUDEDIR if really set.

x86_64-linux-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/librdkafka'

Upstream: https://github.com/fluent/fluent-bit/pull/9600
Signed-off-by: Thomas Devoogdt <[email protected]>
---
plugins/in_kafka/CMakeLists.txt | 4 +++-
plugins/out_kafka/CMakeLists.txt | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/plugins/in_kafka/CMakeLists.txt b/plugins/in_kafka/CMakeLists.txt
index ede0831f9..02e2dc786 100644
--- a/plugins/in_kafka/CMakeLists.txt
+++ b/plugins/in_kafka/CMakeLists.txt
@@ -3,5 +3,7 @@ set(src
)

FLB_PLUGIN(in_kafka "${src}" ${KAFKA_LIBRARIES})
-target_include_directories(flb-plugin-in_kafka PUBLIC ${KAFKA_INCLUDEDIR}/librdkafka)
+if(DEFINED KAFKA_INCLUDEDIR)
+ target_include_directories(flb-plugin-in_kafka PUBLIC ${KAFKA_INCLUDEDIR}/librdkafka)
+endif()
target_link_libraries(flb-plugin-in_kafka -lpthread)
diff --git a/plugins/out_kafka/CMakeLists.txt b/plugins/out_kafka/CMakeLists.txt
index 01c96529b..54b14fc2a 100644
--- a/plugins/out_kafka/CMakeLists.txt
+++ b/plugins/out_kafka/CMakeLists.txt
@@ -5,5 +5,7 @@ set(src
kafka.c)

FLB_PLUGIN(out_kafka "${src}" ${KAFKA_LIBRARIES})
-target_include_directories(flb-plugin-out_kafka PUBLIC ${KAFKA_INCLUDEDIR}/librdkafka)
+if(DEFINED KAFKA_INCLUDEDIR)
+ target_include_directories(flb-plugin-out_kafka PUBLIC ${KAFKA_INCLUDEDIR}/librdkafka)
+endif()
target_link_libraries(flb-plugin-out_kafka -lpthread)
--
2.43.0

Loading

0 comments on commit 628ed46

Please sign in to comment.