-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch Erlang build on Alpine #751
Conversation
66a7829
to
f086e28
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not an Alpine expert or user but the patches that avoid warnings on modern GCC look correct to me.
I don't love the patch management introduced here -- it's kind of heavy for what's a hopefully temporary patch (we don't want to make patching Erlang a habit, I hope). 🙈 😅 ❤️ Since you've submitted this upstream in erlang/otp#9212, perhaps we can instead lean on that pushed commit (erlang/otp@e2604aa) and download the patch during build? diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template
index cb0b8c4..877af1f 100644
--- a/Dockerfile-alpine.template
+++ b/Dockerfile-alpine.template
@@ -134,6 +134,11 @@ RUN set -eux; \
echo "$OTP_SOURCE_SHA256 *$OTP_PATH.tar.gz" | sha256sum -c -; \
tar --extract --file "$OTP_PATH.tar.gz" --directory "$OTP_PATH" --strip-components 1; \
\
+# https://github.com/erlang/otp/pull/9212
+ wget --output-document otp-9212.patch 'https://github.com/erlang/otp/commit/e2604aa7a92b3bb7c1293afd12705c7ce9c952a4.patch?full_index=1'; \
+ echo '35ec51529bdd6cab4b173b4e1fe844efa82f74eba76a99a74f746778d64dffa7 *otp-9212.patch' | sha256sum -c -; \
+ patch --input="$PWD/otp-9212.patch" --directory="$OTP_PATH" --strip=1; \
+ \
# Configure Erlang/OTP for compilation, disable unused features & applications
# https://erlang.org/doc/applications.html
# ERL_TOP is required for Erlang/OTP makefiles to find the absolute path for the installation # https://github.com/erlang/otp/pull/9212
wget --output-document otp-9212.patch 'https://github.com/erlang/otp/commit/e2604aa7a92b3bb7c1293afd12705c7ce9c952a4.patch?full_index=1'; \
echo '35ec51529bdd6cab4b173b4e1fe844efa82f74eba76a99a74f746778d64dffa7 *otp-9212.patch' | sha256sum -c -; \
patch --input="$PWD/otp-9212.patch" --directory="$OTP_PATH" --strip=1; \ ...
+ wget --output-document otp-9212.patch 'https://github.com/erlang/otp/commit/e2604aa7a92b3bb7c1293afd12705c7ce9c952a4.patch?full_index=1'
Connecting to github.com (140.82.116.4:443)
saving to 'otp-9212.patch'
otp-9212.patch 100% |********************************| 1749 0:00:00 ETA
'otp-9212.patch' saved
+ echo '35ec51529bdd6cab4b173b4e1fe844efa82f74eba76a99a74f746778d64dffa7 *otp-9212.patch'
+ sha256sum -c -
otp-9212.patch: OK
+ patch '--input=//otp-9212.patch' '--directory=/usr/local/src/otp-27.2' '--strip=1'
patching file erts/configure
Hunk #1 succeeded at 21677 (offset -56 lines).
Hunk #2 succeeded at 25867 (offset -56 lines).
patching file erts/configure.ac
Hunk #1 succeeded at 2439 (offset -4 lines).
Hunk #2 succeeded at 3134 (offset -4 lines).
+ cd /usr/local/src/otp-27.2
...
checking for working poll()... yes
... |
f086e28
to
942e3c7
Compare
@tianon - I've modified this PR to use your much simpler approach. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You applied it faster than I could get back around to the PR in my PTO backlog 😂 ❤️ 🚀
Changes: - docker-library/rabbitmq@dd27cf7: Merge pull request docker-library/rabbitmq#751 from docker-library/docker-library-rabbitmq-749 - docker-library/rabbitmq@942e3c7: Patch Erlang build on Alpine
Works around this issue: erlang/otp#9211
Fixes #752