Skip to content

Conversation

@janvorli
Copy link
Member

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.

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.
@janvorli janvorli added this to the 6.0.0 milestone Mar 23, 2021
@janvorli janvorli requested a review from jkotas March 23, 2021 16:31
@janvorli janvorli self-assigned this Mar 23, 2021
@janvorli
Copy link
Member Author

cc: @mthalman

@mthalman
Copy link
Member

Can you clarify that this will cause the bits to no longer work on Alpine 3.12 ARM?

@janvorli
Copy link
Member Author

@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.

@mthalman
Copy link
Member

@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?

@janvorli
Copy link
Member Author

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.

@janvorli janvorli merged commit 5b77db9 into dotnet:main Mar 24, 2021
@janvorli janvorli deleted the fix-alpine3.13-build branch March 24, 2021 14:31
@janvorli
Copy link
Member Author

janvorli commented Apr 8, 2021

/backport to release/5.0

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2021

Started backporting to release/5.0: https://github.com/dotnet/runtime/actions/runs/730182542

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2021

@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 128

Please backport manually!

@ghost ghost locked as resolved and limited conversation to collaborators May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants