-
Notifications
You must be signed in to change notification settings - Fork 1.9k
build: use the system provided LuaJIT if found #7286
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 LuaJIT if found #7286
Conversation
|
Hi @cosmo0920 , this PR is really important for us to leverage fluentbit on zLinux (s390x), as we make extensive use of Lua in our configurations. /cc @edsiper @celalettin1286 @fujimotos @koleini @leonardo-albertovich @niedbalski @patrick-stephens @agup006 |
|
Hi, any chance to add the following workflows in https://github.com/fluent/fluent-bit/blob/master/.github/workflows/pr-compile-check.yaml? # Sanity check for compilation using system libraries
pr-compile-system-libs:
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
flb_option:
- "-DFLB_PREFER_SYSTEM_LIBS=On"
compiler:
- gcc
- clang
steps:
- name: Setup environment
run: |
sudo apt-get update
sudo apt-get install -y gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr libyaml-dev libluajit-5.1-dev
sudo ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer || true
- name: Checkout Fluent Bit code
uses: actions/checkout@v4
- name: ${{ matrix.compiler }} - ${{ matrix.flb_option }}
run: |
export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
echo "CC = $CC, CXX = $CXX, FLB_OPT = $FLB_OPT"
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 90
cmake $GLOBAL_OPTS $FLB_OPT ../
make -j $nparallel
working-directory: build
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler }}
FLB_OPT: ${{ matrix.flb_option }}
GLOBAL_OPTS: "-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
- name: Display dependencies w/ ldd
run: |
ldd ./bin/fluent-bit
working-directory: buildThis would be good to add to verify every time whether buildable or not with prefer system libs flag. I tested the above workflow in my fluent-bit fork and works fine: Run ldd ./bin/fluent-bit
linux-vdso.so.1 (0x00007ffc[4](https://github.com/cosmo0920/fluent-bit/actions/runs/9788101299/job/27025620765#step:5:5)b1f1000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ffa7869c000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ffa78692000)
libluajit-[5](https://github.com/cosmo0920/fluent-bit/actions/runs/9788101299/job/27025620765#step:5:6).1.so.2 => /lib/x86_64-linux-gnu/libluajit-5.1.so.2 (0x00007ffa78617000)
libyaml-0.so.2 => /lib/x8[6](https://github.com/cosmo0920/fluent-bit/actions/runs/9788101299/job/27025620765#step:5:7)_64-linux-gnu/libyaml-0.so.2 (0x00007ffa785f5000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x0000[7](https://github.com/cosmo0920/fluent-bit/actions/runs/9788101299/job/27025620765#step:5:8)ffa78546000)
libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007ffa784b3000)
libcrypto.so.1.1 => /lib/x[8](https://github.com/cosmo0920/fluent-bit/actions/runs/9788101299/job/27025620765#step:5:9)6_64-linux-gnu/libcrypto.so.1.1 (0x00007ffa781da000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ffa781be000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ffa7806f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ffa7806[9](https://github.com/cosmo0920/fluent-bit/actions/runs/9788101299/job/27025620765#step:5:10)000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffa77e77000)
/lib64/ld-linux-x86-64.so.2 (0x00007ffa786d[10](https://github.com/cosmo0920/fluent-bit/actions/runs/9788101299/job/27025620765#step:5:11)00)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ffa77e5c000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007ffa77e31000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007ffa77e10000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007ffa77cf2000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007ffa77ccf000) |
… pr-compile-check.yaml Based on fluent#7286 (comment) (@cosmo0920). Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
c9addec to
2bd4723
Compare
I've pushed a commit with your commit proposal. |
e.g. buildroot has logic to build luajit, so if pkg_check_modules can find a suitable version, then use that one if -DFLB_PREFER_SYSTEM_LIB_LUAJIT=Yes. Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
… pr-compile-check.yaml Based on fluent#7286 (comment) (@cosmo0920). Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
2bd4723 to
8a46f99
Compare
|
@cosmo0920 I've rebased the PR, the checks are now green again. |
|
Hi, @edsiper @cosmo0920, @patrick-stephens, is there any further blocker for merging this PR? If not, would you please help to merge it? |
I guess it's @edsiper you have to ping. |
|
@edsiper @cosmo0920 kind ping |
|
@edsiper kind remember |
|
@edsiper Can we include this PR in the v3.1.5 milestone? |
|
Hi, @ThomasDevoogdt, would you please help to merge ThomasDevoogdt#13 so that the feature in this PR can be enabled on the s390x architecture? Thanks! |
|
@ThomasDevoogdt thanks for the contribution!. Would you please submit a PR for fluent-bit-docs so we can reflect these new feature at build time ? |
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 <thomas@devoogdt.com>
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 <thomas@devoogdt.com> Signed-off-by: Julien Olivain <ju.o@free.fr>
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 <thomas@devoogdt.com> Signed-off-by: Julien Olivain <ju.o@free.fr>
… pr-compile-check.yaml Based on fluent#7286 (comment) (@cosmo0920). Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
e.g. buildroot has logic to build luajit,
so if pkg_check_modules can find a suitable version, then use that one
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-testlabel 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.