Skip to content

Fix build failures when building non-portable TargetRid that is different from the SDK's non-portable rid. - #8902

Merged
akoeplinger merged 1 commit into
dotnet:release/11.0.1xxfrom
tmds:nativeaot_unknown_rid
Sep 7, 2026
Merged

akoeplinger merged 1 commit into
dotnet:release/11.0.1xxfrom
tmds:nativeaot_unknown_rid

Conversation

@tmds

@tmds tmds commented Sep 1, 2026

Copy link
Copy Markdown
Member

The compilation fails when when usings a non-portable SDK (e.g. rhel.10-x64) to build a different non-portable RID (e.g. centos.10-x64).

The root cause is that ILCompiler's SingleEntry.targets is not able to determine the host package and target OS for the unknown that is being built RID.

This change passes that information from arcade to SingleEntry.targets.

@dotnet-policy-service
dotnet-policy-service Bot requested review from a team September 1, 2026 05:06
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@tmds

tmds commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

The compilation fails when when usings a non-portable SDK (e.g. rhel.10-x64) to build a different non-portable RID (e.g. centos.10-x64).

This regressed in #7300.

@mthalman @jkotas @akoeplinger ptal.

The changes include comments that describe why what rid gets used where.

@tmds tmds changed the title Fix build failures when building non-portable TargetRid that is diffeent from the SDK's non-portable rid. Fix build failures when building non-portable TargetRid that is different from the SDK's non-portable rid. Sep 1, 2026
@akoeplinger

Copy link
Copy Markdown
Member

/cc @am11 @jkoritzinsky @tannergooding

jkoritzinsky
jkoritzinsky previously approved these changes Sep 2, 2026
@akoeplinger

Copy link
Copy Markdown
Member

/azp run dotnet-unified-build-full

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@am11

am11 commented Sep 3, 2026

Copy link
Copy Markdown
Member

/azp run dotnet-unified-build-full

It would be useful to have at least one community platform coverage in this pipeline. e.g. freebsd-arm64 covers both "different OS" and "different arch" w.r.t host to avoid regressions from such changes in VMR (saves cycles).

@am11

am11 commented Sep 3, 2026

Copy link
Copy Markdown
Member

I've triggered it here https://github.com/filipnavara/dotnet-riscv/actions/runs/33807980599, need to check two things: 1) it is green 2) download artifacts and check (with file) if crossgen2, ilc and other AOT published binaries are valid riscv64 ELF.

BTW, preview7 slipped through some "only affects community platform" because "official platform once again got away with LKG package fallback.." and failed the preview release https://github.com/filipnavara/dotnet-riscv/actions/runs/31601669575. (not the first time this pain is shared: #7677)

@am11

am11 commented Sep 4, 2026

Copy link
Copy Markdown
Member
  1. it is green 2) download artifacts and check (with file) if crossgen2, ilc and other AOT published binaries are valid riscv64 ELF.

Both checked, LGTM! 👍

@akoeplinger

Copy link
Copy Markdown
Member

@tmds we needed to get the net12 PR in first, please fix the conflicts here, thanks :)

…rent from the SDK's non-portable rid.

The compilation fails when when usings a non-portable SDK (e.g. rhel.10-x64)
to build a different non-portable RID (e.g. centos.10-x64).

The root cause is that ILCompiler's SingleEntry.targets is not able to determine the host package
and target OS for the unknown that is being built RID.

This change passes that information from arcade to SingleEntry.targets.
@tmds
tmds force-pushed the nativeaot_unknown_rid branch from 676afe9 to 0288d9c Compare September 7, 2026 04:17
@tmds
tmds requested review from a team as code owners September 7, 2026 04:17
@tmds
tmds changed the base branch from main to release/11.0.1xx September 7, 2026 04:18
@tmds
tmds dismissed jkoritzinsky’s stale review September 7, 2026 04:18

The base branch was changed.

@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team September 7, 2026 04:21
@tmds

tmds commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

The .NET 12 PR (#8312) moved additional logic from src/sdk/Directory.Build.targets into src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetingPacks.BeforeCommonTargets.targets.

To minimize changes for .NET 11, I've updated this PR to target the .NET 11 branch (release/11.0.1xx) with the exact changes that were already reviewed, approved and validated.

I will make a separate PR for main based on the changes made in #8312.

@akoeplinger can this be merged into the .NET 11 branch? Is release/11.0.1xx the proper target?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants