dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.36k stars 188 forks source link

[NativeAOT-LLVM] Building on Windows 11 ARM64 fails: "The command ""\tools\\ilc" @"obj\Debug\net8.0\wasi-wasm\native\ConsoleApp.ilc.rsp"" exited with code 3. #2579

Open ChristianWeyer opened 1 month ago

ChristianWeyer commented 1 month ago

I am running on Windows 11 ARM64.

When using e.g. https://github.com/SteveSandersonMS/MinimalDotNetWasmNativeAOT and trying to compile it, I get this error:

MSBuild version 17.9.8+b34f75857 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
  StandaloneLibrary -> C:\Users\christianweyer\sources\MinimalDotNetWasmNativeAOT\StandaloneLibrary\bin\Debug\net8.0\wasi-wasm\StandaloneLibrary.dll
  Generating native code
  The system cannot find the path specified.
C:\Users\christianweyer\.nuget\packages\microsoft.dotnet.ilcompiler.llvm\8.0.0-preview.7.23503.1\build\Microsoft.NETCore.Native.targets(328,5): error MSB3073: The command ""\to 
ols\\ilc" @"obj\Debug\net8.0\wasi-wasm\native\StandaloneLibrary.ilc.rsp"" exited with code 3. [C:\Users\christianweyer\sources\MinimalDotNetWasmNativeAOT\StandaloneLibrary\Stan 
daloneLibrary.csproj]
  ConsoleApp -> C:\Users\christianweyer\sources\MinimalDotNetWasmNativeAOT\ConsoleApp\bin\Debug\net8.0\wasi-wasm\ConsoleApp.dll
  Generating native code
  The system cannot find the path specified.
C:\Users\christianweyer\.nuget\packages\microsoft.dotnet.ilcompiler.llvm\8.0.0-preview.7.23503.1\build\Microsoft.NETCore.Native.targets(328,5): error MSB3073: The command ""\to 
ols\\ilc" @"obj\Debug\net8.0\wasi-wasm\native\ConsoleApp.ilc.rsp"" exited with code 3. [C:\Users\christianweyer\sources\MinimalDotNetWasmNativeAOT\ConsoleApp\ConsoleApp.csproj] 

Build FAILED.

C:\Users\christianweyer\.nuget\packages\microsoft.dotnet.ilcompiler.llvm\8.0.0-preview.7.23503.1\build\Microsoft.NETCore.Native.targets(328,5): error MSB3073: The command ""\to 
ols\\ilc" @"obj\Debug\net8.0\wasi-wasm\native\StandaloneLibrary.ilc.rsp"" exited with code 3. [C:\Users\christianweyer\sources\MinimalDotNetWasmNativeAOT\StandaloneLibrary\Stan 
daloneLibrary.csproj]
C:\Users\christianweyer\.nuget\packages\microsoft.dotnet.ilcompiler.llvm\8.0.0-preview.7.23503.1\build\Microsoft.NETCore.Native.targets(328,5): error MSB3073: The command ""\to
ols\\ilc" @"obj\Debug\net8.0\wasi-wasm\native\ConsoleApp.ilc.rsp"" exited with code 3. [C:\Users\christianweyer\sources\MinimalDotNetWasmNativeAOT\ConsoleApp\ConsoleApp.csproj] 
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:02.99

The same works fine on a Windows 11 X64 machine.

Anything I could do about this? Thanks!

SingleAccretion commented 1 month ago

We don't have a Windows ARM64 hosted compiler yet (we only have a Windows x64 one). And apparently the x64 emulation has problems.

Anything I could do about this?

You could wait for us to add it, or try adding it yourself (see https://github.com/dotnet/runtimelab/blob/feature/NativeAOT-LLVM/docs/workflow/building/coreclr/nativeaot.md#building-for-web-assembly - the goal would be to have ./build clr.wasmjit+clr.aot building, working, and being published).

ChristianWeyer commented 1 month ago

You could wait for us to add it, or try adding it yourself (see https://github.com/dotnet/runtimelab/blob/feature/NativeAOT-LLVM/docs/workflow/building/coreclr/nativeaot.md#building-for-web-assembly - the goal would be to have ./build clr.wasmjit+clr.aot building, working, and being published).

What do you think when it will be done by you? ;-)

SingleAccretion commented 1 month ago

What do you think when it will be done by you? ;-)

CC @yowl.

I myself don't have a Windows ARM64 machine to test on. Theoretically, it should not be a lot of work (the Windows build is already set up).

yowl commented 1 month ago

I don't either unfortunately. If I was going to do it, I would likely just take my best shot, disable all the other builds in the yml and see what happens.

ChristianWeyer commented 1 month ago

I don't either unfortunately. If I was going to do it, I would likely just take my best shot, disable all the other builds in the yml and see what happens.

😇 https://learn.microsoft.com/en-us/windows/arm/create-arm-vm