Skip to content

lib: dependency updates #10195

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

Merged
merged 29 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
efa97fa
lib: cfl: update to v0.6.0
edsiper Apr 7, 2025
bafa67f
lib: chunkio: upgrade to v1.5.3
edsiper Apr 7, 2025
d0e766e
lib: ctraces: upgrade to v0.6.3
edsiper Apr 8, 2025
72cdaff
lib: cmetrics: upgrade to v1.0.0
edsiper Apr 9, 2025
06cb16d
in_ebpf: remove cmake requirement
edsiper Apr 9, 2025
ded893c
lib: nghttp2: upgrade to v1.65.0
edsiper Apr 9, 2025
d730f58
lib: fluent-otel-proto: upgrade to v0.9.1
edsiper Apr 9, 2025
349cbc8
lib: librdkafka: upgrade to v2.8.0
edsiper Apr 9, 2025
f2a30de
lib: lwrb: cmake requirement >= v3.20
edsiper Apr 9, 2025
dfa6336
lib: miniz: cmake requirement >= v3.20
edsiper Apr 9, 2025
8580329
lib: msgpack-c: cmake requirement >= v3.20
edsiper Apr 9, 2025
1c7403a
lib: tutf8e: cmake requirement >= v3.20
edsiper Apr 9, 2025
2f6cc38
lib: ctraces: upgrade to v0.6.4
edsiper Apr 9, 2025
268d565
lib: cprofiles: upgrade to v0.1.1
edsiper Apr 9, 2025
2ed7c9c
lib: monkey: upgrade to v1.8.3
edsiper Apr 9, 2025
499bb6c
lib: onigmo: requires CMake v3.20
edsiper Apr 9, 2025
5822353
lib: snappy: add README.md about original repo
edsiper Apr 9, 2025
161ec2b
cmake: libraries: adjust snappy path
edsiper Apr 9, 2025
03c42af
filter_geoip2: upgrade libmaxminddb to v1.12.2
edsiper Apr 9, 2025
2d4d702
lib: snappy: requires CMake >= v3.20
edsiper Apr 9, 2025
eed6572
lib: nghttp2: set proper options and OpenSSL options
edsiper Apr 9, 2025
503c146
lib: cmetrics: detect MSVC first
edsiper Apr 11, 2025
817b13f
lib: nghttp2: define ssize_t as a ptrdiff_t
edsiper Apr 11, 2025
ee533f4
packaging: disable Ubuntu 16.04/18.04/20.04 and older Rasbians
edsiper Apr 16, 2025
98d4e69
build: new FLB_KAFKA (default: on) option
edsiper Apr 16, 2025
5f8ef72
build: only include flb_kafka.c if FLB_KAFKA is set
edsiper Apr 16, 2025
c2dabff
packaging: distros: centos: fix build
edsiper Apr 22, 2025
25f3e56
packaging: distros: amazonlinux: disable Kafka on amazonlinux:2
edsiper Apr 22, 2025
a92a6f9
dockerfiles: centos 7: disable Kafka
edsiper Apr 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 14 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ option(FLB_WASM "Build with WASM runtime support" Yes)
option(FLB_WAMRC "Build with WASM AOT compiler executable" No)
option(FLB_WASM_STACK_PROTECT "Build with WASM runtime with strong stack protector flags" No)
option(FLB_ENFORCE_ALIGNMENT "Enable limited platform specific aligned memory access" No)
option(FLB_KAFKA "Enable Kafka support" Yes)
option(FLB_ZIG "Enable zig integration" Yes)

# Native Metrics Support (cmetrics)
Expand Down Expand Up @@ -1084,16 +1085,19 @@ if(FLB_BACKTRACE)
FLB_DEFINITION(FLB_HAVE_LIBBACKTRACE)
endif()

if(FLB_IN_KAFKA OR FLB_OUT_KAFKA)
if(FLB_PREFER_SYSTEM_LIB_KAFKA)
find_package(PkgConfig)
pkg_check_modules(KAFKA rdkafka>=2.3.0)
endif()
if(KAFKA_FOUND)
include_directories(${KAFKA_INCLUDE_DIRS})
link_directories(${KAFKA_LIBRARY_DIRS})
else()
include(cmake/kafka.cmake)
# Kafka support (library in general)
if(FLB_KAFKA)
if(FLB_IN_KAFKA OR FLB_OUT_KAFKA)
if(FLB_PREFER_SYSTEM_LIB_KAFKA)
find_package(PkgConfig)
pkg_check_modules(KAFKA rdkafka>=2.3.0)
endif()
if(KAFKA_FOUND)
include_directories(${KAFKA_INCLUDE_DIRS})
link_directories(${KAFKA_LIBRARY_DIRS})
else()
include(cmake/kafka.cmake)
endif()
endif()
endif()

Expand Down
4 changes: 2 additions & 2 deletions cmake/libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(FLB_PATH_LIB_CPROFILES "lib/cprofiles")
set(FLB_PATH_LIB_CO "lib/flb_libco")
set(FLB_PATH_LIB_RBTREE "lib/rbtree")
set(FLB_PATH_LIB_MSGPACK "lib/msgpack-c")
set(FLB_PATH_LIB_NGHTTP2 "lib/nghttp2")
set(FLB_PATH_LIB_NGHTTP2 "lib/nghttp2-1.65.0")
set(FLB_PATH_LIB_AVRO "lib/avro")
set(FLB_PATH_LIB_CHUNKIO "lib/chunkio")
set(FLB_PATH_LIB_LUAJIT "lib/luajit-04dca791")
Expand All @@ -22,7 +22,7 @@ set(FLB_PATH_LIB_MINIZ "lib/miniz")
set(FLB_PATH_LIB_TUTF8E "lib/tutf8e")
set(FLB_PATH_LIB_CARES "lib/c-ares-1.34.4")
set(FLB_PATH_LIB_SNAPPY "lib/snappy-fef67ac")
set(FLB_PATH_LIB_RDKAFKA "lib/librdkafka-2.4.0")
set(FLB_PATH_LIB_RDKAFKA "lib/librdkafka-2.8.0")
set(FLB_PATH_LIB_RING_BUFFER "lib/lwrb")
set(FLB_PATH_LIB_WASM_MICRO_RUNTIME "lib/wasm-micro-runtime-WAMR-1.3.3")
set(FLB_PATH_LIB_ZSTD "lib/zstd-1.5.7")
Expand Down
2 changes: 2 additions & 0 deletions cmake/nghttp2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FLB_OPTION(ENABLE_LIB_ONLY ON)
FLB_OPTION(ENABLE_STATIC_LIB ON)
FLB_OPTION(ENABLE_SHARED_LIB OFF)
FLB_OPTION(BUILD_SHARED_LIBS OFF)
FLB_OPTION(BUILD_STATIC_LIBS ON)
FLB_DEFINITION(NGHTTP2_STATICLIB)

add_subdirectory(${FLB_PATH_LIB_NGHTTP2} EXCLUDE_FROM_ALL)
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN cmake -DCMAKE_INSTALL_PREFIX=/opt/fluent-bit/ -DCMAKE_INSTALL_SYSCONFDIR=/et
-DFLB_RELEASE=On -DFLB_TRACE=On \
-DFLB_TESTS_INTERNAL=On -DFLB_TESTS_RUNTIME=On \
-DFLB_SQLDB=On -DFLB_HTTP_SERVER=On \
-DFLB_OUT_KAFKA=On \
-DFLB_KAFKA=off \
-DFLB_JEMALLOC=On \
-DFLB_CHUNK_TRACE=On \
-DFLB_OUT_PGSQL=On \
Expand Down
119 changes: 99 additions & 20 deletions lib/cfl/.github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
os: [windows-latest, windows-2019]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build on ${{ matrix.os }} with vs-2019
run: |
.\scripts\win_build.bat
Expand All @@ -33,9 +33,9 @@ jobs:
matrix:
os: [windows-latest, windows-2019]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get dependencies w/ chocolatey
uses: crazy-max/ghaction-chocolatey@v2
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
- uses: msys2/setup-msys2@v2
Expand Down Expand Up @@ -67,17 +67,37 @@ jobs:
sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
yum -y update
yum install -y ca-certificates cmake gcc gcc-c++ make wget
yum install -y ca-certificates gcc gcc-c++ git make wget
yum install -y epel-release
yum install -y cmake3
shell: bash

- uses: actions/checkout@v3
- name: Install CMake 3.20.0
run: |
CMAKE_VERSION=3.20.0
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh
chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh
./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/usr/local
ln -sf /usr/local/bin/cmake /usr/bin/cmake
cmake --version

- name: Clone repo without submodules (1.8.3 version of Git)
run: |
git clone https://github.com/fluent/cfl.git
shell: bash

- name: Check out the branch (1.8.3 version of Git)
env:
BRANCH_NAME: ${{ github.head_ref }}
run: |
git checkout "$BRANCH_NAME"
shell: bash
working-directory: cfl

- name: Run compilation
run: |
cmake3 -DCFL_DEV=on .
cmake -DCFL_DEV=on .
make
working-directory: cfl

build-debian:
name: Debian Buster build to confirm no issues once used downstream
Expand All @@ -87,14 +107,26 @@ jobs:
- name: Set up base image dependencies
run: |
apt-get update
apt-get install -y build-essential cmake make
shell: bash
apt-get install -y build-essential wget make gcc g++

- name: Install CMake 3.20.0
run: |
CMAKE_VERSION=3.20.0
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh
chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh
./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/usr/local

# Ensure the new CMake is found first
export PATH="/usr/local/bin:$PATH"

- uses: actions/checkout@v3
# Confirm CMake installation
/usr/local/bin/cmake --version

- uses: actions/checkout@v4

- name: Run compilation
run: |
cmake -DCFL_DEV=on .
/usr/local/bin/cmake -DCFL_DEV=on .
make

build-unix-arm64:
Expand All @@ -106,19 +138,19 @@ jobs:
os: [ubuntu-latest]
compiler: [ gcc, clang ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build on ${{ matrix.os }} with ${{ matrix.compiler }}
uses: uraimo/run-on-arch-action@v2.5.0
uses: uraimo/run-on-arch-action@v3.0.0
with:
arch: aarch64
distro: ubuntu20.04
distro: ubuntu_latest
run: |
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
file \
make
make
export CC=${{ env.compiler }}
cmake -DCFL_TESTS=On .
make all
Expand All @@ -135,7 +167,7 @@ jobs:
os: [ubuntu-latest, macos-latest]
compiler: [ gcc, clang ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build on ${{ matrix.os }} with ${{ matrix.compiler }}
run: |
echo "CC = $CC, CXX = $CXX"
Expand All @@ -161,13 +193,60 @@ jobs:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
dependencies_debian: 'wget'

- name: Install CMake 3.20.0
run: |
CMAKE_VERSION=3.20.0
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh
chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh

# Create a writable temporary directory
mkdir -p /tmp/cmake

# Install CMake to /tmp/cmake
./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/tmp/cmake

- uses: docker://lpenz/ghaction-cmake:0.19
# Add CMake to the PATH
echo 'export PATH=/tmp/cmake/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

# Verify installation
/tmp/cmake/bin/cmake --version

- uses: actions/checkout@v4
with:
preset: ${{ matrix.preset }}
# dependencies_debian: ''

cmakeflags: '-DCFL_TESTS=On -DCFL_DEV=on .'
build_command: make all
build_command: /tmp/cmake/bin/cmake && make all

# this job provides the single required status for PRs to be merged into main.
# instead of updating the protected branch status in github, developers can update the needs section below
# to require additional status checks to protect main.
# the job uses the alls-green action to get around the github issue that treats a "skipped" required status check
# as passed. github will skip a job if an upstream needed job fails, which would defeat the purpose of this required
# status check.
test-required-checks-complete:
# note: this step always has to run in order to check if the dependent jobs passed. by default github skips running a job
# if the needed jobs upstream failed.
if: always()
needs:
- build-windows
- build-msys2
- build-centos
- build-debian
- build-unix-arm64
- build-unix-amd64
- build-analysis-tests
name: Required checks complete
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
4 changes: 2 additions & 2 deletions lib/cfl/.github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ludeeus/action-shellcheck@master
with:
ignore_paths: lib
Expand All @@ -21,7 +21,7 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
echo "::add-matcher::.github/actionlint-matcher.json"
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
Expand Down
18 changes: 9 additions & 9 deletions lib/cfl/.github/workflows/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ jobs:
matrix:
format: [ rpm, deb ]
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2.5.0
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v3.0.0
name: Build the ${{matrix.format}} packages
with:
arch: aarch64
distro: ubuntu20.04
distro: ubuntu_latest
run: |
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
file \
rpm \
make
make
cmake .
echo ${{ matrix.format }} | awk '{print toupper($0)}' | xargs -I{} cpack -G {}

- name: Store the master package artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.format }}-arm64
path: |
Expand All @@ -51,14 +51,14 @@ jobs:

runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the ${{matrix.format}} packages
run: |
cmake .
echo ${{ matrix.format }} | awk '{print toupper($0)}' | xargs -I{} cpack -G {}

- name: Store the master package artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.format }}-amd64
path: |
Expand All @@ -74,7 +74,7 @@ jobs:
contents: write
steps:
- name: Download all artefacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts/

Expand All @@ -94,7 +94,7 @@ jobs:
artifacts/**/*

- name: Release on tag
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
Expand Down
6 changes: 3 additions & 3 deletions lib/cfl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.20)
project(cfl C)
Copy link
Contributor

@mabrarov mabrarov Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change requires changes in run_code_analysis.sh script, because lpenz/ghaction-cmake:0.19 docker image (https://hub.docker.com/r/lpenz/ghaction-cmake) used in that script contains older version of CMake:

$ TEST_PRESET=valgrind SKIP_TESTS='flb-rt-out_td flb-it-network' ./run_code_analysis.sh
...
-- Enabling FLB_REGEX since FLB_PARSER requires
CMake Error at lib/cfl/CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.20 or higher is required.  You are running version 3.18.4


-- Configuring incomplete, errors occurred!
See also "/tmp/source/CMakeFiles/CMakeOutput.log".
::error title=popen::> Error 1 while running cmake . -DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off -DFLB_TESTS_INTERNAL=On -DFLB_TESTS_RUNTIME=On  -DFLB_WITHOUT_flb-rt-out_td=1 -DFLB_WITHOUT_flb-it-network=1
> > Error 1 while running cmake . -DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off -DFLB_TESTS_INTERNAL=On -DFLB_TESTS_RUNTIME=On  -DFLB_WITHOUT_flb-rt-out_td=1 -DFLB_WITHOUT_flb-it-network=1
::endgroup::
+ exit_code=1
+ rm -f /tmp/tmp.u88OHRGpro
+ exit 1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to #10238 for one of the possible solutions

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# C Floppy Version
set(CFL_VERSION_MAJOR 0)
set(CFL_VERSION_MINOR 5)
set(CFL_VERSION_PATCH 1)
set(CFL_VERSION_MINOR 6)
set(CFL_VERSION_PATCH 0)
set(CFL_VERSION_STR "${CFL_VERSION_MAJOR}.${CFL_VERSION_MINOR}.${CFL_VERSION_PATCH}")

# Configuration options
Expand Down
7 changes: 7 additions & 0 deletions lib/cfl/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Global Owners
# -------------
* @edsiper @leonardo-albertovich

# CI
# -------------------------
/.github/ @niedbalski @patrick-stephens @celalettin1286
Loading
Loading