-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix Alpine 3.13 ARM build #50105
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
Fix Alpine 3.13 ARM build #50105
Conversation
Alpine 3.13 is the first version of Alpine Linux that uses 64 bit time_t on both 64 and 32 bit platforms. That breaks the build as we assumed that 32 bit platforms use always 32 bit time_t. This change fixes it by making the PAL time_t type always 64 bit. Everything still works fine on non-Alpine ARM / x86 Linuxes, since it only changes the time_t type size outside of PAL.
|
cc: @mthalman |
|
Can you clarify that this will cause the bits to no longer work on Alpine 3.12 ARM? |
|
@mthalman this change only makes compilation work on Alpine 3.13. If someone builds on Alpine <= 3.12 after my change, things will work as before. |
Those two sentences don't seem compatible. How can it only make compilation work on Alpine 3.13 but also allow it to be built on Alpine <= 3.12? |
|
I am not sure why it sounds contradictory to you. Let me try to express it in a simpler way. With my change, runtime can be built on any Alpine version. |
|
/backport to release/5.0 |
|
Started backporting to release/5.0: https://github.com/dotnet/runtime/actions/runs/730182542 |
|
@janvorli backporting to release/5.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix Alpine 3.13 ARM build
error: sha1 information is lacking or useless (src/coreclr/pal/inc/pal.h).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix Alpine 3.13 ARM build
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
Alpine 3.13 is the first version of Alpine Linux that uses 64 bit time_t
on both 64 and 32 bit platforms. That breaks the build as we assumed
that 32 bit platforms use always 32 bit time_t.
This change fixes it by making the PAL time_t type always 64 bit.
Everything still works fine on non-Alpine ARM / x86 Linuxes, since
it only changes the time_t type size outside of PAL.