Skip to content

Commit b957ccb

Browse files
committed
Backport Erlang time64 patch
This is currently causing build failures on 32bit architectures for 4.0 (where we updated to Ubuntu 24.04): /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" This is the same patch applied by Debian and Ubuntu to fix the same problem (and applied there in both Erlang 25 and 26, as we have here, so I've applied it across both for simplicity/consistency).
1 parent a1177f4 commit b957ccb

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

3.12/ubuntu/Dockerfile

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.13/ubuntu/Dockerfile

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

4.0-rc/ubuntu/Dockerfile

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-ubuntu.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ RUN set -eux; \
161161
echo "$OTP_SOURCE_SHA256 *$OTP_PATH.tar.gz" | sha256sum --check --strict -; \
162162
tar --extract --file "$OTP_PATH.tar.gz" --directory "$OTP_PATH" --strip-components 1; \
163163
\
164+
{{ if .otp.version | startswith("25.") or startswith("26.") then ( -}}
165+
# backport https://github.com/erlang/otp/pull/7952 (applied upstream in OTP 27+) to fix time64 compilation issues on 32bit architectures
166+
# see also https://bugs.debian.org/1067701, https://salsa.debian.org/erlang-team/packages/erlang/-/blob/89c4e190c6d1d7ee0133d9a8d6bf651ff1861e46/debian/patches/time64.patch
167+
wget --output-document otp-time64.patch 'https://github.com/erlang/otp/pull/7952.patch?full_index=1'; \
168+
echo 'd1a0c0433a9a08c83171bedd438dd59bb336b40ec75f59edfc3a647b8b0c612d *otp-time64.patch' | sha256sum --check --strict -; \
169+
patch --input="$PWD/otp-time64.patch" --directory="$OTP_PATH" --strip=1; \
170+
rm otp-time64.patch; \
171+
\
172+
{{ ) else "" end -}}
164173
# Configure Erlang/OTP for compilation, disable unused features & applications
165174
# https://erlang.org/doc/applications.html
166175
# ERL_TOP is required for Erlang/OTP makefiles to find the absolute path for the installation

0 commit comments

Comments
 (0)