Skip to content

Commit

Permalink
Patch APR in docker image thats is used to cross-compile to remove li… (
Browse files Browse the repository at this point in the history
#891)

…bcrypt dependency.

Motivation:

We don't need to depend on libcrypt when cross-compiling. We already
don't depend on it when we don't cross-compile

Modifications:

Patch APR as part of the docker image creation and so remove libcrypt
dependency

Result:

Fixes #888
  • Loading branch information
normanmaurer authored Oct 24, 2024
1 parent 7dd0ab8 commit 80952b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/Dockerfile.cross_compile_aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ RUN set -x && \
mv gcc-arm-$GCC_VERSION-x86_64-aarch64-none-linux-gnu /
ENV PATH="/gcc-arm-$GCC_VERSION-x86_64-aarch64-none-linux-gnu/bin:${PATH}"

# Copy over patch we need to apply to apr to not link against libcrypt
COPY patches/apr_crypt.patch $SOURCE_DIR

# Cross compile Apache Apr for aarch64 - static
RUN set -x && \
wget --no-check-certificate https://downloads.apache.org//apr/apr-$APR_VERSION.tar.gz && \
tar xvf apr-$APR_VERSION.tar.gz && \
pushd apr-$APR_VERSION && \
patch -p0 < $SOURCE_DIR/apr_crypt.patch && \
./buildconf && \
CC=aarch64-none-linux-gnu-gcc CFLAGS='-O3 -fno-omit-frame-pointer -fPIC ' ./configure --disable-shared --prefix=/opt/apr-$APR_VERSION-static --host=aarch64-none-linux-gnu ac_cv_have_decl_sys_siglist=no ac_cv_file__dev_zero=yes ac_cv_func_setpgrp_void=yes apr_cv_tcp_nodelay_with_cork=yes ac_cv_sizeof_struct_iovec=8 && \
make || true && \
pushd tools && \
Expand Down

0 comments on commit 80952b2

Please sign in to comment.