Skip to content

Work around arm64 forwarder Linker bug #62585

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

Merged
merged 9 commits into from
Jul 30, 2025
Merged

Conversation

wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented Jul 7, 2025

There appears to be a new Linker bug in producing pure Arm64 Forwarders, as https://learn.microsoft.com/en-us/windows/arm/arm64x-build#building-an-arm64x-pure-forwarder-dll doesn't work out of the box. @lextm provided us with this workaround as a temporary measure.

Revert once https://developercommunity.visualstudio.com/t/LINK-:-error-LNK2001:-unresolved-extern/10932429 is fixed

@github-actions github-actions bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jul 7, 2025
@wtgodbe wtgodbe closed this Jul 8, 2025
@wtgodbe wtgodbe deleted the wtgodbe/InstallerWorkaround branch July 8, 2025 16:51
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview7 milestone Jul 8, 2025
@wtgodbe wtgodbe restored the wtgodbe/InstallerWorkaround branch July 29, 2025 22:49
@wtgodbe wtgodbe reopened this Jul 29, 2025
@wtgodbe wtgodbe marked this pull request as ready for review July 30, 2025 04:01
@Copilot Copilot AI review requested due to automatic review settings July 30, 2025 04:01
@wtgodbe wtgodbe requested a review from a team as a code owner July 30, 2025 04:01
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a workaround for a linker bug that prevents building pure ARM64 forwarders on Windows. The changes modify the build process to ignore linker errors and force building despite unresolved symbols, allowing the build to complete successfully despite the underlying tool issue.

Key changes:

  • Add error handling to ignore linker failures during the build process
  • Include /FORCE:UNRESOLVED flag to bypass unresolved symbol errors in ARM64X linking
  • Ensure build script always exits successfully regardless of intermediate failures

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
build.proj Adds error handling to continue build execution despite linker failures
build.cmd Adds /FORCE:UNRESOLVED flag to ARM64X link commands to bypass symbol resolution errors
all.cmd Forces successful exit code to prevent build failures from propagating

@wtgodbe
Copy link
Member Author

wtgodbe commented Jul 30, 2025

/backport to release/10.0-preview7

Copy link
Contributor

Started backporting to release/10.0-preview7: https://github.com/dotnet/aspnetcore/actions/runs/16622977684

Copy link
Contributor

@wtgodbe backporting to "release/10.0-preview7" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Work around arm64 forwarder Linker bug
Applying: Add msbuild dependencies to fix SourceBuild prebuilts
Using index info to reconstruct a base tree...
M	eng/Version.Details.xml
M	eng/Versions.props
Falling back to patching base and 3-way merge...
Auto-merging eng/Version.Details.xml
CONFLICT (content): Merge conflict in eng/Version.Details.xml
Auto-merging eng/Versions.props
CONFLICT (content): Merge conflict in eng/Versions.props
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Add msbuild dependencies to fix SourceBuild prebuilts
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@wtgodbe wtgodbe merged commit 9fd8cd6 into main Jul 30, 2025
30 checks passed
@wtgodbe wtgodbe deleted the wtgodbe/InstallerWorkaround branch July 30, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants