Skip to content

Commit

Permalink
add flb-wamrc deps for ubuntu packaging
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Perez <[email protected]>
  • Loading branch information
andresperezl committed Jun 25, 2023
1 parent 41d3e17 commit 3af0c7c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
3 changes: 3 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_WAMRC=${FLB_WAMRC:-Off}

# Use this to pass special arguments to docker build
FLB_ARG=${FLB_ARG:-}
Expand Down Expand Up @@ -75,6 +76,7 @@ echo "IMAGE_CONTEXT_DIR => $IMAGE_CONTEXT_DIR"
echo "CMAKE_INSTALL_PREFIX => $CMAKE_INSTALL_PREFIX"
echo "FLB_NIGHTLY_BUILD => $FLB_NIGHTLY_BUILD"
echo "FLB_JEMALLOC => $FLB_JEMALLOC"
echo "FLB_WAMRC => $FLB_WAMRC"

export DOCKER_BUILDKIT=1

Expand All @@ -84,6 +86,7 @@ if ! docker build \
--build-arg CMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
--build-arg FLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
--build-arg FLB_JEMALLOC="$FLB_JEMALLOC" \
--build-arg FLB_WAMRC="$FLB_WAMRC" \
--build-arg FLB_TD="$FLB_TD" \
$FLB_ARG \
-t "$MAIN_IMAGE" \
Expand Down
23 changes: 17 additions & 6 deletions packaging/distros/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ RUN apt-get update && \
wget -q -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main' && \
wget -q -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main" && \
apt-get update && \
apt-get install -y llvm-10 libclang-common-10-dev libedit-dev && \
apt-get install -y --reinstall lsb-base lsb-release cmake

# ubuntu/18.04 base image
Expand All @@ -39,7 +42,8 @@ RUN apt-get update && \
cmake make bash wget unzip nano vim valgrind dh-make flex bison \
libpq-dev postgresql-server-dev-all \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl1.1 \
software-properties-common libyaml-dev apt-transport-https pkg-config zlib1g-dev && \
software-properties-common libyaml-dev apt-transport-https pkg-config zlib1g-dev \
llvm-10 libclang-common-10-dev libedit-dev && \
wget -q -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && \
Expand All @@ -61,7 +65,8 @@ RUN apt-get update && \
cmake make bash wget unzip nano vim valgrind dh-make flex bison \
libpq-dev postgresql-server-dev-all \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl1.1 \
software-properties-common libyaml-dev apt-transport-https pkg-config zlib1g-dev && \
software-properties-common libyaml-dev apt-transport-https pkg-config zlib1g-dev \
llvm-10 libclang-common-10-dev libedit-dev && \
wget -q -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && \
Expand All @@ -79,7 +84,8 @@ RUN apt-get update && \
apt-get install -y curl ca-certificates build-essential libsystemd-dev \
cmake make bash wget unzip nano vim valgrind dh-make flex bison \
libpq-dev postgresql-server-dev-all \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl1.1 libyaml-dev pkg-config zlib1g-dev && \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl1.1 libyaml-dev pkg-config zlib1g-dev \
llvm libclang-common-10-dev libedit-dev && \
apt-get install -y --reinstall lsb-base lsb-release

# ubuntu/20.04.arm64v8 base image
Expand All @@ -93,7 +99,8 @@ RUN apt-get update && \
apt-get install -y curl ca-certificates build-essential libsystemd-dev \
cmake make bash wget unzip nano vim valgrind dh-make flex bison \
libpq-dev postgresql-server-dev-all \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl1.1 libyaml-dev pkg-config zlib1g-dev && \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl1.1 libyaml-dev pkg-config zlib1g-dev \
llvm libclang-common-10-dev libedit-dev && \
apt-get install -y --reinstall lsb-base lsb-release

# ubuntu/22.04 base image
Expand All @@ -105,7 +112,8 @@ RUN apt-get update && \
apt-get install -y curl ca-certificates build-essential libsystemd-dev \
cmake make bash wget unzip nano vim valgrind dh-make flex bison \
libpq-dev postgresql-server-dev-all libpq5 \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl3 libyaml-dev pkg-config zlib1g-dev && \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl3 libyaml-dev pkg-config zlib1g-dev \
llvm libmlir-14-dev libedit-dev libpfm4-dev && \
apt-get install -y --reinstall lsb-base lsb-release

# ubuntu/22.04.arm64v8 base image
Expand All @@ -119,7 +127,8 @@ RUN apt-get update && \
apt-get install -y curl ca-certificates build-essential libsystemd-dev \
cmake make bash wget unzip nano vim valgrind dh-make flex bison \
libpq-dev postgresql-server-dev-all libpq5 \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl3 libyaml-dev pkg-config zlib1g-dev && \
libsasl2-2 libsasl2-dev openssl libssl-dev libssl3 libyaml-dev pkg-config zlib1g-dev \
llvm libmlir-14-dev libedit-dev libpfm4-dev && \
apt-get install -y --reinstall lsb-base lsb-release

# Common build for all distributions now
Expand All @@ -146,6 +155,7 @@ ARG FLB_OUT_KAFKA=On
ARG FLB_OUT_PGSQL=On
ARG FLB_JEMALLOC=On
ARG FLB_CHUNK_TRACE=On
ARG FLB_WAMRC=Off

ENV CFLAGS=$CFLAGS
RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
Expand All @@ -159,6 +169,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}" \
-DFLB_WAMRC="${FLB_WAMRC}" \
../

VOLUME [ "/output" ]
Expand Down

0 comments on commit 3af0c7c

Please sign in to comment.