forked from buildroot/buildroot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
News: https://fluentbit.io/announcements/v3.2.2/ https://fluentbit.io/announcements/v3.2.1/ 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]> Signed-off-by: Julien Olivain <[email protected]>
- Loading branch information
1 parent
fb8690e
commit 655a2c8
Showing
12 changed files
with
318 additions
and
106 deletions.
There are no files selected for viewing
62 changes: 0 additions & 62 deletions
62
package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 29be5275f6f7e15aca768e9b235998abc5a604e2 Mon Sep 17 00:00:00 2001 | ||
From c44256c95f5703dd627413f17c6ad250073898d9 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 | ||
|
@@ -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 | ||
|
@@ -116,5 +114,5 @@ index 8c0079abe..c9336b729 100644 | |
+ endif() | ||
endif(NOT WIN32) | ||
-- | ||
2.34.1 | ||
2.43.0 | ||
|
27 changes: 27 additions & 0 deletions
27
package/fluent-bit/0002-build-disable-cxx-support-for-librdkafka-7741.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From 0dc955cd15cc0b09a1d557131fae59842cb2bbd8 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 | ||
|
29 changes: 0 additions & 29 deletions
29
package/fluent-bit/0003-CMakeLists.txt-disable-cxx-support-for-librdkafka-77.patch
This file was deleted.
Oops, something went wrong.
91 changes: 91 additions & 0 deletions
91
package/fluent-bit/0003-lib-nghttp2-CMakeLists.txt-do-not-require-a-CXX-comp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
From 8a9aed874fc41973d007f5145eca85e261f2bb35 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 | ||
|
37 changes: 37 additions & 0 deletions
37
package/fluent-bit/0004-lib-luajit-cmake-CMakeLists.txt-do-not-require-a-CXX.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From ac870a2e2de899bcc8b6818b97404479da6d0663 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 7eacb2ab839e74cb07038398def5e3cc198448d4 Mon Sep 17 00:00:00 2001 | ||
From e17ce6ddcb4dc1cd3081eabfb94a1cdc224f4d69 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) | ||
|
@@ -95,5 +95,5 @@ index e73ebc85f..a61a522f3 100644 | |
endif () | ||
if (WAMR_CONFIGUABLE_BOUNDS_CHECKS EQUAL 1) | ||
-- | ||
2.34.1 | ||
2.43.0 | ||
|
48 changes: 48 additions & 0 deletions
48
package/fluent-bit/0006-plugins-in-out-_kafka-CMakeLists.txt-fix-cross-compi.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From 7e8bb790cba0619af9e8d80e947f7cda0910caaa 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 | ||
|
Oops, something went wrong.