From: Patrick Wicki <[email protected]>

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 <[email protected]>
---
 meta-oe/recipes-extended/fluentbit/fluentbit_3.2.1.bb | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

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"
 
-- 
2.47.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#114123): 
https://lists.openembedded.org/g/openembedded-devel/message/114123
Mute This Topic: https://lists.openembedded.org/mt/109840556/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to