Skip to content
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

Update Alpine ARM docker image #51099

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

janvorli
Copy link
Member

The Alpine ARM docker image is used for cross compilation. There was a
breaking change in Alpine 3.13 - it uses a new MUSL that has 64 bit
time_t even on 32 bit platforms. Since the official support for Alpine
ARM was not announced yet, it was decided that we will support it only
on Alpine >= 3.13 instead of having to build and distribute two different
versions of runtime.

This change updates the docker image used to build Alpine ARM runtime to
a new version that uses Alpine 3.13 rootfs. It is also using Ubuntu
16.04 instead of 18.04 as a host to unify it with the one we use to
build for Alpine ARM64.

The Alpine ARM docker image is used for cross compilation. There was a
breaking change in Alpine 3.13 - it uses a new MUSL that has 64 bit
time_t even on 32 bit platforms. Since the official support for Alpine
ARM was not announced yet, it was decided that we will support it only
on Alpine >= 3.13 instead of having to build and distribute two different
versions of runtime.

This change updates the docker image used to build Alpine ARM runtime to
a new version that uses Alpine 3.13 rootfs. It is also using Ubuntu
16.04 instead of 18.04 as a host to unify it with the one we use to
build for Alpine ARM64.
@janvorli janvorli added this to the 6.0.0 milestone Apr 12, 2021
@janvorli janvorli requested a review from mthalman April 12, 2021 09:02
@janvorli janvorli self-assigned this Apr 12, 2021
@ghost
Copy link

ghost commented Apr 12, 2021

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

The Alpine ARM docker image is used for cross compilation. There was a
breaking change in Alpine 3.13 - it uses a new MUSL that has 64 bit
time_t even on 32 bit platforms. Since the official support for Alpine
ARM was not announced yet, it was decided that we will support it only
on Alpine >= 3.13 instead of having to build and distribute two different
versions of runtime.

This change updates the docker image used to build Alpine ARM runtime to
a new version that uses Alpine 3.13 rootfs. It is also using Ubuntu
16.04 instead of 18.04 as a host to unify it with the one we use to
build for Alpine ARM64.

Author: janvorli
Assignees: janvorli
Labels:

area-Infrastructure-coreclr

Milestone: 6.0.0

@janvorli
Copy link
Member Author

Ah, we'll also need to switch the testing OS for Alpine ARM to Alpine 3.13.

@janvorli
Copy link
Member Author

I have a pending PR dotnet/dotnet-buildtools-prereqs-docker#438 for creating Helix Alpine 3.13 ARM image. After that gets in and the related docker image is produced, I'll update this PR.

@janvorli janvorli requested a review from hoyosjs April 14, 2021 21:31
@janvorli
Copy link
Member Author

@hoyosjs can you please take a look?

Copy link
Member

@hoyosjs hoyosjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that question, looks good.

@@ -116,7 +116,7 @@ jobs:
targetRid: linux-musl-arm
platform: Linux_musl_arm
container:
image: ubuntu-18.04-cross-arm-alpine-20200818211451-14441ae
image: ubuntu-16.04-cross-arm-alpine-20210409142327-044d5b9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we downgraded to 16.04? This will go out of support this month.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the reason was that cross tools (e.g. crossgen targetting arm, but running on x64) would crash on 16.04 and we also use 16.04 on arm64 musl. I guess that when 16.04 goes out of support, we will need to change all 16.04 based images to 18.04 ones.
Ideally, we would run cross build on CentOS 7, but unfortunately that doesn't work due to some differences in default search paths for libs / headers that are compiled into the llvm tools. I have tried to make it work on CentOS 7 in the past, but I didn't have time to finish it. I'll try to dig out that experimental changes once I get some priority things off my table and see if I can make it work.

@janvorli janvorli merged commit cb9897b into dotnet:main Apr 15, 2021
@janvorli
Copy link
Member Author

/backport to release/5.0

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

@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: Update Alpine ARM docker image
Using index info to reconstruct a base tree...
M	eng/pipelines/common/platform-matrix.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/pipelines/common/platform-matrix.yml
Applying: Update helix queue for Alpine ARM to use Alpine 3.13
Using index info to reconstruct a base tree...
M	eng/pipelines/coreclr/templates/helix-queues-setup.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/pipelines/coreclr/templates/helix-queues-setup.yml
CONFLICT (content): Merge conflict in eng/pipelines/coreclr/templates/helix-queues-setup.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Update helix queue for Alpine ARM to use Alpine 3.13
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 15, 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.

2 participants