-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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 build on arm64 machines #37374
Fix build on arm64 machines #37374
Conversation
Building ASP.NET Core on an arm64 machine leads to a dependency error because crossgen2 is not listed in eng/Dependencies.props.
This might be a valid problem to fix @omajid but I'm not seeing any difference in the Could you please describe in more detail what fails without this fix❔ |
|
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.
ok
From the CI build log:
That means the CI leg is running on an x64 machine but cross compiling for arm64. So it ends up using the x64 crossgen (which is present in eng/Dependencies.props) for processing artifacts. I am building on arm64 hardware and targeting arm64, not cross compiling on x64. Without this change, this is how the build fails on my machine:
That's because
They seem necessary to support building for arm64 in CI (which runs on an x64 machine but builds for arm64). I am not sure if they are quite correct. They seem to mix CI limitations (eg, "when building for
Looking at the lines in aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj , I can see some failure scenarios:
Seems like the right thing to do, if we want to support building ASP.NET Core on those platforms. |
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.
Thanks very much for the added information @omajid❔ Let's at least cover all available variants of the crossgen2
package in this PR.
I'm not positive how best to handle the code in Microsoft.AspNetCore.App.Runtime.csproj but that can wait. Likely we should make some of that understand the actual OS architecture. Could you please open an issue listing the potential problems you see there❔ (mention me in it so I don't miss it 😄)
Add all arm/arm64 variants Co-authored-by: Doug Bunting <[email protected]>
Add all win variants for crossgen2 Co-authored-by: Doug Bunting <[email protected]>
Is this interesting to consider for |
Let's do it. ARM64 hardware is only going to get more common during the life of .NET 6, and I can imagine people building the branch/tags and being confused. |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1321679215 |
@Pilchie can you do the needful please❔ GitHub hasn't fixed their collaborator lookups |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1321947322 |
@Pilchie backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix build on an arm64 machine
Applying: Update eng/Dependencies.props
Applying: Update eng/Dependencies.props
error: sha1 information is lacking or useless (eng/Dependencies.props).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 Update eng/Dependencies.props
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! |
I'll take this. |
- backport of dotnet#37374, `cherry-pick` of 64f0642 Add more `crossgen2` dependencies (dotnet#37374) * Fix build on an arm64 machine * Building ASP.NET Core on an arm64 machine leads to a dependency error because `crossgen2` is not listed in eng/Dependencies.props. * Add all arm/arm64 variants * Add all win variants for `crossgen2` Co-authored-by: Doug Bunting <[email protected]>
- backport of #37374, `cherry-pick` of 64f0642 Add more `crossgen2` dependencies (#37374) * Fix build on an arm64 machine * Building ASP.NET Core on an arm64 machine leads to a dependency error because `crossgen2` is not listed in eng/Dependencies.props. * Add all arm/arm64 variants * Add all win variants for `crossgen2` Co-authored-by: Doug Bunting <[email protected]> Co-authored-by: Omair Majid <[email protected]>
A little late to the party here, but thanks for backporting it to release/6.0! I ran into this bug while building source-build (including ASP.NET Core) on arm64, and it's definitely affecting us (Red Hat) for 6.0. We are carrying a patch locally for 6.0 to bypass this, so it's great to see an official fix landing. |
Hi @omajid. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
Building ASP.NET Core on an arm64 machine using
./build.sh -arch arm64
leads to a dependency error because crossgen2 is not listed in eng/Dependencies.props.