fluentbit: use system libs instead of vendored ones

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>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Patrick Wicki
2024-11-29 22:38:37 +01:00
committed by Khem Raj
parent 0fdf559877
commit f57840b83b
@@ -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"