-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: use the system provided packages if found #8930
build: use the system provided packages if found #8930
Conversation
6093bda
to
4c6da55
Compare
95225eb
to
169ee05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'll be reasonable. However, we shouldn't break the priority of building and including the bundled libraries. So, how about adding FLB_USE_SYSTEM_LIBRARIRS
or similar flag to provide an option to prioritize the system installed libraries?
This is because using system installed libraries by default diversifies the version of dependent libraries.
Hi, I once did that in #7286, but that PR is somewhat ignored in the meantime. I kept it open for reference. Please consider that one first, if it gets merged, then I can rework this PR to do the same for some other packages. The only difference in the other PR is that I've used FLB_PREFER_SYSTEM_LIBS iso FLB_USE_SYSTEM_LIBRARIRS. |
169ee05
to
95ccc2d
Compare
95ccc2d
to
70c5a0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The direction of this PR is all good. But I found a concern to use system/bundled cares library case. Could you take a look?
Probably not homebrew - macOS runners cost a lot and we already have Linux based package tests in place for all targets via simple container builds. |
Another option is like using ArchLinux via docker containers. ArchLinux's packaging is blazingly fast and typically no patches are applied. If we need to test against the latest packages, we'll be able to consider this option. However, that distribution is sometimes too cutting edge. So, I feel that testing with system packages on Ubuntu 22.04 is enough for most cases. ;) |
In #7286, we added simple workflow which uses system libluajit-5.1-dev and its associated libraries. So, once that PR is merged we can continue to add dependent libraries as apt packages. |
1cfe759
to
beae70e
Compare
@edsiper @cosmo0920 kind remember to take this up again |
beae70e
to
ef73d77
Compare
ef73d77
to
4bdf7a6
Compare
e.g. buildroot has logic to build libnghttp2, so if pkg_check_modules can find a suitable version, then use that one if -DFLB_PREFER_SYSTEM_LIB_NGHTTP2=Yes. Signed-off-by: Thomas Devoogdt <[email protected]>
e.g. buildroot has logic to build backtrace, so if find_path/find_library can find a suitable version, then use that one if -DFLB_PREFER_SYSTEM_LIB_BACKTRACE=Yes. Signed-off-by: Thomas Devoogdt <[email protected]>
e.g. buildroot has logic to build jemalloc, so if pkg_check_modules can find a suitable version, then use that one if -DFLB_PREFER_SYSTEM_LIB_JEMALLOC=Yes. Signed-off-by: Thomas Devoogdt <[email protected]>
e.g. buildroot has logic to build c-ares, so if pkg_check_modules can find a suitable version, then use that one if -DFLB_PREFER_SYSTEM_LIB_CARES=Yes. Note that the CheckIncludeFiles include for wasm is added, since that was done by c-ares otherwise. Signed-off-by: Thomas Devoogdt <[email protected]>
e.g. buildroot has logic to build librdkafka, so if pkg_check_modules can find a suitable version, then use that one if -DFLB_PREFER_SYSTEM_LIB_KAFKA=Yes. Signed-off-by: Thomas Devoogdt <[email protected]>
Signed-off-by: Thomas Devoogdt <[email protected]>
Signed-off-by: Thomas Devoogdt <[email protected]>
Signed-off-by: Thomas Devoogdt <[email protected]>
4bdf7a6
to
a24eac7
Compare
@edsiper @cosmo0920 @patrick-stephens @leonardo-albertovich Hi, I rebased this PR to the current master. Is it possible to consider this PR? |
Hi, thanks for continuously rebasing on top of master. Currently, I added a milestone for v3.2.0 in this PR. |
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]>
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]>
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]>
Some packages might already be present in the system, so use them if that is the case.
E.g. in buildroot, it doesn't make sense that e.g. luajit is compiled twice.
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
This overrules these PRs: