diff mbox series

[meta-oe,2/2] fluentbit: use system libs instead of vendored ones

Message ID 20241129213837.523955-2-patrick@subset.ch
State Accepted
Headers show
Series [meta-oe,1/2] fluentbit: upgrade to v3.2.1 | expand

Commit Message

patrick@subset.ch Nov. 29, 2024, 9:38 p.m. UTC
From: Patrick Wicki <patrick.wicki@siemens.com>

Make use of the new build option to unbundle some vendored dependencies.
Currently supported are libbacktrace, c-ares, jemalloc, luajit and
nghttp, all of which have Yocto recipes. librdkafka is currently below
the required version (>=2.3.0) so for that it will fall back to the
vendored version.

Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
---
 meta-oe/recipes-extended/fluentbit/fluentbit_3.2.1.bb | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit_3.2.1.bb b/meta-oe/recipes-extended/fluentbit/fluentbit_3.2.1.bb
index 54fa9b277..b895c7da0 100644
--- a/meta-oe/recipes-extended/fluentbit/fluentbit_3.2.1.bb
+++ b/meta-oe/recipes-extended/fluentbit/fluentbit_3.2.1.bb
@@ -43,6 +43,7 @@  PACKAGECONFIG ??= "\
     ipo \
     metrics \
     parser \
+    prefer-system-libs \
     proxy-go \
     record-accessor \
     regex \
@@ -56,6 +57,12 @@  PACKAGECONFIG ??= "\
 # See https://github.com/fluent/fluent-bit/issues/7248#issuecomment-1631280496
 PACKAGECONFIG:remove:toolchain-clang = "ipo"
 
+# Use system libs
+PACKAGECONFIG[prefer-system-libs] = "-DFLB_PREFER_SYSTEM_LIBS=Yes,-DFLB_PREFER_SYSTEM_LIBS=No, nghttp2 c-ares"
+DEPENDS += " ${@bb.utils.contains('PACKAGECONFIG', 'prefer-system-libs backtrace', 'libbacktrace', '', d)}"
+DEPENDS += " ${@bb.utils.contains('PACKAGECONFIG', 'prefer-system-libs jemalloc', 'jemalloc', '', d)}"
+DEPENDS += " ${@bb.utils.contains('PACKAGECONFIG', 'prefer-system-libs luajit', 'luajit', '', d)}"
+
 PACKAGECONFIG[all] = "-DFLB_ALL=Yes,-DFLB_ALL=No"
 PACKAGECONFIG[arrow] = "-DFLB_ARROW=Yes,-DFLB_ARROW=No"
 PACKAGECONFIG[avro-encoder] = "-DFLB_AVRO_ENCODER=Yes,-DFLB_AVRO_ENCODER=No"
@@ -105,8 +112,8 @@  PACKAGECONFIG[windows-defaults] = "-DFLB_WINDOWS_DEFAULTS=Yes,-DFLB_WINDOWS_DEFA
 PACKAGECONFIG[minimal] = "-DFLB_MINIMAL=Yes,-DFLB_MINIMAL=No"
 
 # Without zstd dependency, kafka plugin build fails at link attempt against native libzstd.so
-PACKAGECONFIG[in-kafka] = "-DFLB_IN_KAFKA=ON,-DFLB_IN_KAFKA=OFF,librdkafka zstd"
-PACKAGECONFIG[out-kafka] = "-DFLB_OUT_KAFKA=ON,-DFLB_OUT_KAFKA=OFF,librdkafka zstd"
+PACKAGECONFIG[in-kafka] = "-DFLB_IN_KAFKA=ON,-DFLB_IN_KAFKA=OFF,librdkafka zstd curl"
+PACKAGECONFIG[out-kafka] = "-DFLB_OUT_KAFKA=ON,-DFLB_OUT_KAFKA=OFF,librdkafka zstd curl"
 
 SYSTEMD_SERVICE:${PN} = "fluent-bit.service"