From 1336cbc0cb4a55295f1426fe0b1e423f2a799595 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 1 Apr 2025 14:01:15 -0700 Subject: [PATCH] Force alignment on arm32 This fixes our test failures on Debian-based arm32v7, and fixes *most* of our test failures on Alpine-based arm32v{6,7}, leaving the notable `t/restart.t` which we've had issues with prior. --- 1/alpine/Dockerfile | 4 ++++ 1/debian/Dockerfile | 4 ++++ Dockerfile.template | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/1/alpine/Dockerfile b/1/alpine/Dockerfile index 03bba50..0a9db48 100644 --- a/1/alpine/Dockerfile +++ b/1/alpine/Dockerfile @@ -55,6 +55,10 @@ RUN set -eux; \ cd /usr/src/memcached; \ \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ +# https://github.com/memcached/memcached/issues/1220#issuecomment-2770251664: on arm32, we need to override the upstream alignment check (which fails to detect the need for alignment on arm32v6+ on our hardware for some reason, which then causes us to fail the tests 😭) + case "$gnuArch" in \ + arm-*abihf) export ac_cv_c_alignment=need ;; \ + esac; \ ./configure \ --build="$gnuArch" \ --enable-extstore \ diff --git a/1/debian/Dockerfile b/1/debian/Dockerfile index f3c6173..1087936 100644 --- a/1/debian/Dockerfile +++ b/1/debian/Dockerfile @@ -58,6 +58,10 @@ RUN set -eux; \ cd /usr/src/memcached; \ \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ +# https://github.com/memcached/memcached/issues/1220#issuecomment-2770251664: on arm32, we need to override the upstream alignment check (which fails to detect the need for alignment on arm32v6+ on our hardware for some reason, which then causes us to fail the tests 😭) + case "$gnuArch" in \ + arm-*abihf) export ac_cv_c_alignment=need ;; \ + esac; \ ./configure \ --build="$gnuArch" \ --enable-extstore \ diff --git a/Dockerfile.template b/Dockerfile.template index 9ced64b..122f8cc 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -91,6 +91,10 @@ RUN set -eux; \ cd /usr/src/memcached; \ \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ +# https://github.com/memcached/memcached/issues/1220#issuecomment-2770251664: on arm32, we need to override the upstream alignment check (which fails to detect the need for alignment on arm32v6+ on our hardware for some reason, which then causes us to fail the tests 😭) + case "$gnuArch" in \ + arm-*abihf) export ac_cv_c_alignment=need ;; \ + esac; \ ./configure \ --build="$gnuArch" \ --enable-extstore \