Skip to content
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

config: fix compilation with FLB_HAVE_STATIC_CONF #8912

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/pr-compile-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,20 @@ jobs:
run: |
ldd ./bin/fluent-bit
working-directory: build

pr-compile-static-config:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Fluent Bit code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Attempt to build current source with FLB_STATIC_CONF enabled
working-directory: packaging
run: ./build.sh
env:
FLB_DISTRO: ubuntu/20.04
FLB_ARG: --build-arg=FLB_STATIC_CONF=/tmp
4 changes: 4 additions & 0 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ COPY . ./
# We split the builder setup out so people can target it or use as a base image without doing a full build.
FROM builder-base AS builder
WORKDIR /src/fluent-bit/build/

ARG FLB_STATIC_CONF

RUN cmake -DFLB_RELEASE=On \
-DFLB_JEMALLOC=On \
-DFLB_TLS=On \
Expand All @@ -78,6 +81,7 @@ RUN cmake -DFLB_RELEASE=On \
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_LOG_NO_CONTROL_CHARS=On \
-DFLB_CHUNK_TRACE="$FLB_CHUNK_TRACE" \
${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \
..

RUN make -j "$(getconf _NPROCESSORS_ONLN)"
Expand Down
2 changes: 2 additions & 0 deletions packaging/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ FLB_DISTRO=${FLB_DISTRO:-}
FLB_OUT_DIR=${FLB_OUT_DIR:-}
FLB_NIGHTLY_BUILD=${FLB_NIGHTLY_BUILD:-}
FLB_JEMALLOC=${FLB_JEMALLOC:-On}
FLB_STATIC_CONF=${FLB_STATIC_CONF:-}
DOCKER=${FLB_DOCKER_CLI:-docker}

# Use this to pass special arguments to docker build
Expand Down Expand Up @@ -90,6 +91,7 @@ if ! ${DOCKER} build \
--build-arg FLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
--build-arg FLB_JEMALLOC="$FLB_JEMALLOC" \
--build-arg FLB_TD="$FLB_TD" \
--build-arg FLB_STATIC_CONF="$FLB_STATIC_CONF" \
$FLB_ARG \
-t "$MAIN_IMAGE" \
-f "$IMAGE_CONTEXT_DIR/Dockerfile" \
Expand Down
2 changes: 2 additions & 0 deletions packaging/distros/amazonlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ ARG FLB_OUT_KAFKA=On
ARG FLB_OUT_PGSQL=On
ARG FLB_JEMALLOC=On
ARG FLB_CHUNK_TRACE=On
ARG FLB_STATIC_CONF

RUN cmake3 -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \
Expand All @@ -97,6 +98,7 @@ RUN cmake3 -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_JEMALLOC="${FLB_JEMALLOC}" \
-DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \
${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \
../

VOLUME [ "/output" ]
Expand Down
2 changes: 2 additions & 0 deletions packaging/distros/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ ARG FLB_HTTP_SERVER=On
ARG FLB_OUT_KAFKA=On
ARG FLB_JEMALLOC=On
ARG FLB_CHUNK_TRACE=On
ARG FLB_STATIC_CONF

# cmake3 exists in every image - cmake references the older cmake2 in centos 7
RUN cmake3 -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
Expand All @@ -177,6 +178,7 @@ RUN cmake3 -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \
-DFLB_JEMALLOC="${FLB_JEMALLOC}" \
-DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \
${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \
../

VOLUME [ "/output" ]
Expand Down
2 changes: 2 additions & 0 deletions packaging/distros/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ ARG FLB_OUT_KAFKA=On
ARG FLB_OUT_PGSQL=On
ARG FLB_JEMALLOC=On
ARG FLB_CHUNK_TRACE=On
ARG FLB_STATIC_CONF

ENV CFLAGS=$CFLAGS
RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
Expand All @@ -130,6 +131,7 @@ RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_JEMALLOC="${FLB_JEMALLOC}" \
-DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \
${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \
../

VOLUME [ "/output" ]
Expand Down
2 changes: 2 additions & 0 deletions packaging/distros/raspbian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ ARG FLB_OUT_KAFKA=On
ARG FLB_OUT_PGSQL=On
ARG FLB_JEMALLOC=On
ARG FLB_CHUNK_TRACE=On
ARG FLB_STATIC_CONF

ENV CFLAGS=$CFLAGS
RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
Expand All @@ -71,6 +72,7 @@ RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_JEMALLOC="${FLB_JEMALLOC}" \
-DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \
${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \
../

VOLUME [ "/output" ]
Expand Down
2 changes: 2 additions & 0 deletions packaging/distros/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ ARG FLB_OUT_KAFKA=On
ARG FLB_OUT_PGSQL=On
ARG FLB_JEMALLOC=On
ARG FLB_CHUNK_TRACE=On
ARG FLB_STATIC_CONF

ENV CFLAGS=$CFLAGS
RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
Expand All @@ -185,6 +186,7 @@ RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_JEMALLOC="${FLB_JEMALLOC}" \
-DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \
${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \
../

VOLUME [ "/output" ]
Expand Down
Loading