unoplatform / Uno.Wasm.Bootstrap

A simple nuget package to run C# code in a WASM-compatible browser
Other
367 stars 57 forks source link

ninja: build stopped: subcommand failed (FAILED: icall-table.json) #647

Open nor0x opened 1 year ago

nor0x commented 1 year ago

Current behavior

After updating my WebAssembly application from .net5 to .net6 i encounter a build issue in the ninja step.

...
[00:00:02.6956496] [824/835] MONO_PATH= /var/folders/37/2_8cj06d6xxc3kb5x3rktlz40000gn/T/dotnet-runtime-wasm-linux-633c7b6-0cee4aaff9c-3338312971-Release/runtimes/browser-wasm/native/cross/browser-wasm/mono-aot-cross --print-icall-table > icall-table.json (TaskId:135)
[00:00:02.6956765] FAILED: icall-table.json  (TaskId:135)
[00:00:02.6956791] MONO_PATH= /var/folders/37/2_8cj06d6xxc3kb5x3rktlz40000gn/T/dotnet-runtime-wasm-linux-633c7b6-0cee4aaff9c-3338312971-Release/runtimes/browser-wasm/native/cross/browser-wasm/mono-aot-cross --print-icall-table > icall-table.json (TaskId:135)
...

ninja: build stopped: subcommand failed. (TaskId:135)

System.Exception: Failed to run emscripten.

here is the full output (diagnostic verbosity) output.log

I noticed in the logs that mono-aot-cross is used even-though i have set <WasmShellMonoRuntimeExecutionMode>Interpreter</WasmShellMonoRuntimeExecutionMode>

Expected behavior

No response

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

haven't found a workaround yet - it works fine on Windows and the Ubuntu-latest hosted agent though

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

Affected platforms

WebAssembly

IDE

Visual Studio for Mac, Rider macOS

IDE version

No response

Relevant plugins

SkiaSharp.Views.Uno

Anything else we need to know?

No response

jeromelaban commented 1 year ago

It looks like you're trying to build with Wasm AOT on macOS, this is not supported at this time by the .NET SDK. Looks like we'll need to add a proper error message.

jeromelaban commented 1 year ago

Also, can you provide the full binlog file? It may help to troubleshoot the reason for the cross compiler to kick in.

nor0x commented 1 year ago

thanks for the quick response! is there a different way to disable aot? I already have

<WasmShellMonoRuntimeExecutionMode>Interpreter</WasmShellMonoRuntimeExecutionMode>

in my .csproj file. I will prepare the binlog file

jeromelaban commented 1 year ago

No, setting this mode should be enough. This would mean that for some reason, the AOT compiler is still incorrectly being used.