From 35e51e06f4c4e4b0a64c5756e44d8768395e70e7 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 28 Feb 2024 08:51:03 -0800 Subject: [PATCH] Disable usage of sys_siglist function to workaround issues on alpine (#854) Motivation: When we try to use our static compiled version on alpine it fails due missing sys_siglist. We can workaround this by letting apr use its own implementation. Modifications: Use ac_cv_have_decl_sys_siglist=no when compiling APR. Result: netty-tcnative-boringssl-static should be useable on alpine. Fixes https://github.com/netty/netty-tcnative/issues/853 --- docker/Dockerfile.centos6 | 1 + docker/Dockerfile.cross_compile_aarch64 | 6 +++--- pom.xml | 10 +++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile.centos6 b/docker/Dockerfile.centos6 index 281389b80..39294471f 100644 --- a/docker/Dockerfile.centos6 +++ b/docker/Dockerfile.centos6 @@ -30,6 +30,7 @@ RUN yum install -y \ tar \ unzip \ wget \ + which \ zip RUN mkdir $SOURCE_DIR diff --git a/docker/Dockerfile.cross_compile_aarch64 b/docker/Dockerfile.cross_compile_aarch64 index cd23486d3..5df88d316 100644 --- a/docker/Dockerfile.cross_compile_aarch64 +++ b/docker/Dockerfile.cross_compile_aarch64 @@ -18,7 +18,7 @@ RUN yum install -y http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-g # Install requirements RUN set -x && \ yum -y install epel-release && \ - yum -y install wget tar git make autoconf automake libtool openssl-devel ninja-build gcc-c++ patch unzip zip + yum -y install wget tar git make autoconf automake libtool openssl-devel ninja-build gcc-c++ patch unzip zip which # Install Java RUN yum install -y java-1.8.0-openjdk-devel golang @@ -39,7 +39,7 @@ 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 && \ - 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_file__dev_zero=yes ac_cv_func_setpgrp_void=yes apr_cv_tcp_nodelay_with_cork=yes ac_cv_sizeof_struct_iovec=8 && \ + 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 && \ gcc -Wall -O2 -DCROSS_COMPILE gen_test_char.c -s -o gen_test_char && \ @@ -52,7 +52,7 @@ 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 && \ - CC=aarch64-none-linux-gnu-gcc CFLAGS='-O3 -fno-omit-frame-pointer -fPIC' ./configure --prefix=/opt/apr-$APR_VERSION-share --host=aarch64-none-linux-gnu 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 && \ + CC=aarch64-none-linux-gnu-gcc CFLAGS='-O3 -fno-omit-frame-pointer -fPIC' ./configure --prefix=/opt/apr-$APR_VERSION-share --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 && \ gcc -Wall -O2 -DCROSS_COMPILE gen_test_char.c -s -o gen_test_char && \ diff --git a/pom.xml b/pom.xml index d6eea6959..a2a5d14b1 100644 --- a/pom.xml +++ b/pom.xml @@ -663,6 +663,7 @@ + @@ -673,7 +674,7 @@ + See https://stackoverflow.com/a/1605497/1074097 + --> - + + @@ -700,7 +705,6 @@ -