Bootstrap is failing on platform without AOT support

Open
#116,929 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
build-system

Research direction

Start with build.sh's --bootstrap flow and Build.proj, then trace how PublishSingleFile handles the bootstrap artifacts under artifacts/bootstrap/illumos-x64/host/. Reproduce the NETSDK1084 failure in the provided illumos cross-build and verify that --use-bootstrap completes on a platform without AOT support while using the bootstrapped single-file host.

Written by the indexing model from the issue text.

Description

area-Infrastructure

On platforms where AOT is not supported, --use-bootstrap fails with error like: https://github.com/dotnet/runtime/pull/105403#issuecomment-2994802484.

This is because PublishSingleFile is not respecting bootstrapped singlefile:

$ ls artifacts/bootstrap/illumos-x64/host/
apphost  singlefilehost

Repro:

$ git clone https://github.com/gwr/dotnet-runtime runtime --branch illumos5 --single-branch --depth 1
$ docker run --rm -v$(pwd)/runtime:/runtime -e ROOTFS_DIR=/crossrootfs/x64 \
    -it mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-illumos

$ /runtime/build.sh clr+libs+packs -c Debug -os illumos -cross -gcc --bootstrap
...
Cleaning up artifacts from bootstrap build...
  Determining projects to restore...
  Tool 'coverlet.console' (version '6.0.4') was restored. Available commands: coverlet
  Tool 'dotnet-reportgenerator-globaltool' (version '5.4.3') was restored. Available commands: reportgenerator
  Tool 'microsoft.dotnet.xharness.cli' (version '10.0.0-prerelease.25255.1') was restored. Available commands: xharness
  Tool 'microsoft.visualstudio.slngen.tool' (version '12.0.15') was restored. Available commands: slngen
  
  Restore was successful.
  All projects are up-to-date for restore.
  Determining projects to restore...
/runtime/.dotnet/sdk/10.0.100-preview.6.25302.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(188,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'illumos-x64'. [/runtime/Build.proj]
/runtime/.dotnet/sdk/10.0.100-preview.6.25302.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(188,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'illumos-x64'. [/runtime/Build.proj]
/runtime/.dotnet/sdk/10.0.100-preview.6.25302.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(188,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'illumos-x64'. [/runtime/Build.proj]
/runtime/.dotnet/sdk/10.0.100-preview.6.25302.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(188,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'illumos-x64'. [/runtime/Build.proj]
/runtime/.dotnet/sdk/10.0.100-preview.6.25302.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(188,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'illumos-x64'. [/runtime/Build.proj]
/runtime/.dotnet/sdk/10.0.100-preview.6.25302.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(188,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'illumos-x64'. [/runtime/Build.proj]
/runtime/.dotnet/sdk/10.0.100-preview.6.25302.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(188,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'illumos-x64'. [/runtime/Build.proj]
/runtime/.dotnet/sdk/10.0.100-preview.6.25302.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(188,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'illumos-x64'. [/runtime/Build.proj]
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/runtime

All issues in dotnet/runtime

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.