Skip to content

[NativeAOT] On Unix, if IlcInstructionSet=native is specified, the publish fails with 'Unable to load shared library 'jitinterface_arm64' or one of its dependencies.' #118999

@neon-sunset

Description

@neon-sunset

Description

As the title goes, if a build property <IlcInstructionSet>native</IlcInstructionSet> is defined, the build fails.

Reproduction Steps

  1. Create project with dotnet new console --aot
  2. Add <IlcInstructionSet>native</IlcInstructionSet>

Expected behavior

The project builds, resolving the available instruction sets from the current host.

Actual behavior

The build fails with

❯ dotnet publish
Restore complete (0.2s)
    info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
  BuildError failed with 2 error(s) (0.5s) → bin/Release/net10.0/osx-arm64/BuildError.dll
    EXEC : error Unable to load shared library 'jitinterface_arm64' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:
    /Users/arseniy/.nuget/packages/microsoft.dotnet.ilcompiler/10.0.0-rc.1.25414.111/build/Microsoft.NETCore.Native.targets(330,5): error MSB3073: The command ""/Users/arseniy/.nuget/packages/runtime.osx-arm64.microsoft.dotnet.ilcompiler/10.0.0-rc.1.25414.111/tools/ilc" @"obj/Release/net10.0/osx-arm64/native/BuildError.ilc.rsp"" exited with code 1.

Build failed with 2 error(s) in 0.8s

The build does not fail when specifying apple-m1 however.

Regression?

Yes, does not reproduce on .NET 8 and 9.

Known Workarounds

Specifying supported ISA extensions manually.

Configuration

Darwin Mac.lan 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041 arm64
❯ dotnet --info                                                                                     (base)
.NET SDK:
 Version:           10.0.100-rc.1.25414.111
 Commit:            f8a57b66e6
 Workload version:  10.0.100-manifests.2f8afce5
 MSBuild version:   17.15.0-preview-25414-111+f8a57b66e

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  15.6
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/10.0.100-rc.1.25414.111/

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
  Version:      10.0.0-rc.1.25414.111
  Architecture: arm64
  Commit:       f8a57b66e6

DYLD_PRINT_LIBRARIES.log

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions