-
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?
I have no experience with GitHub workflows. So that would take me some time to get started with it. Also, not all packages are up-to-date in e.g. the ubuntu docker containers. I tested all of them by linking to /usr/local/lib installs. I know that the apple homebrew eco system is quite up to date, so perhaps, that can be a good start? But I would propose to not hamper this PR with this extra request. |
What exactly has to be invoked to build this? I can potentially update CI to do that |
@patrick-stephens A test job that compiles fluent-bit against a set of native system libraries, where we do enable the FLB_PREFER_SYSTEM_ flags. e.g. for ubuntu 2022.04:
and then use
The only problem is that Ubuntu doesn't always ship the latest libraries. A very similar test can be made, using the homebrew environment. Homebrew typically is more up-to-date, and if I'm right, homebrew does allow the installation of a fixed version. |
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. |
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: