Open zotanmew opened 1 day ago
Problem seems to be stack size. Running https://github.com/yaegashi/muslstack on wasm-opt seems to solve the issue:
apk add go
go install github.com/yaegashi/muslstack@latest
~/go/bin/muslstack -s 0x800000 /usr/share/dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.56.Sdk.linux-musl-x64/9.0.0/tools/bin/wasm-opt
# rerun publish
I've patched this in our downstream dotnet-sdk dockerfile: https://iceshrimp.dev/iceshrimp/Iceshrimp.NET/commit/1511692b1e7c113e2448c1eabe39848e4c7aab2d
Might be a good idea to build emscripten with a higher stack-size=
, so this is not necessary anymore.
Describe the bug
Publish fails at the wasm-opt stage of blazor WASM AOT compilation with error message:
Workaround: publish with
-p:EmccLinkOptimizationFlag="-O0"
This problem does not occur on glibc-based linux-x64 systems.
Copying the dotnet.native.wasm from the failed build on a musl system to a glibc system & invoking wasm-opt manually also does not reproduce the issue.
To Reproduce
To prove it works on glibc:
Further technical details