From 53a12c266a4bd3c1e5ade9907336cf52f694cc6b Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Mon, 25 Oct 2021 16:46:01 -0700 Subject: [PATCH] Use libucontext in 2.7 to fix alpine based builds on arm32v6/7 and s390x - Same as alpine uses on all arches (https://git.alpinelinux.org/aports/commit/main/ruby/APKBUILD?h=3.14-stable&id=5ed0f177e21cb9582f05a4088209ada9b143ef80) --- 2.6/alpine3.13/Dockerfile | 1 + 2.6/alpine3.14/Dockerfile | 1 + 2.7/alpine3.13/Dockerfile | 2 ++ 2.7/alpine3.14/Dockerfile | 2 ++ 3.0/alpine3.13/Dockerfile | 1 + 3.0/alpine3.14/Dockerfile | 1 + Dockerfile.template | 4 ++++ 7 files changed, 12 insertions(+) diff --git a/2.6/alpine3.13/Dockerfile b/2.6/alpine3.13/Dockerfile index 1c1feafe1..11f9f1d73 100644 --- a/2.6/alpine3.13/Dockerfile +++ b/2.6/alpine3.13/Dockerfile @@ -51,6 +51,7 @@ RUN set -eux; \ libffi-dev \ libxml2-dev \ libxslt-dev \ + libucontext-dev \ linux-headers \ make \ ncurses-dev \ diff --git a/2.6/alpine3.14/Dockerfile b/2.6/alpine3.14/Dockerfile index 5a86b5609..a882629e1 100644 --- a/2.6/alpine3.14/Dockerfile +++ b/2.6/alpine3.14/Dockerfile @@ -51,6 +51,7 @@ RUN set -eux; \ libffi-dev \ libxml2-dev \ libxslt-dev \ + libucontext-dev \ linux-headers \ make \ ncurses-dev \ diff --git a/2.7/alpine3.13/Dockerfile b/2.7/alpine3.13/Dockerfile index 38cc86ca7..6a9bba400 100644 --- a/2.7/alpine3.13/Dockerfile +++ b/2.7/alpine3.13/Dockerfile @@ -51,6 +51,7 @@ RUN set -eux; \ libffi-dev \ libxml2-dev \ libxslt-dev \ + libucontext-dev \ linux-headers \ make \ ncurses-dev \ @@ -97,6 +98,7 @@ RUN set -eux; \ \ autoconf; \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ + export LIBS='-lucontext'; \ ./configure \ --build="$gnuArch" \ --disable-install-doc \ diff --git a/2.7/alpine3.14/Dockerfile b/2.7/alpine3.14/Dockerfile index 31be848cb..9c0b3c6d9 100644 --- a/2.7/alpine3.14/Dockerfile +++ b/2.7/alpine3.14/Dockerfile @@ -51,6 +51,7 @@ RUN set -eux; \ libffi-dev \ libxml2-dev \ libxslt-dev \ + libucontext-dev \ linux-headers \ make \ ncurses-dev \ @@ -97,6 +98,7 @@ RUN set -eux; \ \ autoconf; \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ + export LIBS='-lucontext'; \ ./configure \ --build="$gnuArch" \ --disable-install-doc \ diff --git a/3.0/alpine3.13/Dockerfile b/3.0/alpine3.13/Dockerfile index ba573d215..0edbbe0d2 100644 --- a/3.0/alpine3.13/Dockerfile +++ b/3.0/alpine3.13/Dockerfile @@ -51,6 +51,7 @@ RUN set -eux; \ libffi-dev \ libxml2-dev \ libxslt-dev \ + libucontext-dev \ linux-headers \ make \ ncurses-dev \ diff --git a/3.0/alpine3.14/Dockerfile b/3.0/alpine3.14/Dockerfile index e574b85d6..bb1a25d50 100644 --- a/3.0/alpine3.14/Dockerfile +++ b/3.0/alpine3.14/Dockerfile @@ -51,6 +51,7 @@ RUN set -eux; \ libffi-dev \ libxml2-dev \ libxslt-dev \ + libucontext-dev \ linux-headers \ make \ ncurses-dev \ diff --git a/Dockerfile.template b/Dockerfile.template index 534cf98cd..edd463b72 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -76,6 +76,7 @@ RUN set -eux; \ libffi-dev \ libxml2-dev \ libxslt-dev \ + libucontext-dev \ linux-headers \ make \ ncurses-dev \ @@ -165,6 +166,9 @@ RUN set -eux; \ \ autoconf; \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ +{{ if is_alpine and env.version == "2.7" then ( -}} + export LIBS='-lucontext'; \ +{{ ) else "" end -}} ./configure \ --build="$gnuArch" \ --disable-install-doc \