-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm] problem with native linking against skiasharp and emscripten 3.1.56 #109289
Comments
I tried various version of llvm to test assumption of this being related to the recent llvm bump to 19.1.0. The problem exists on 19.1.0, 19.0.x alpha (same commit as emsdk) and even with 16.x after our emscripten bump to 3.1.56. So it looks unrelated. |
Later I was trying to find which part of When I removed code guarded by
Which lead me to the zlib linking, which I think is the issue here. What is happening here is that this line
is being inlined and the same issue as with the I wonder if we compile and/or link against two different zlib versions. I will dig deeper. |
The
and there's redefining macro with only 2 parameters
and function with same parameters as the redefining macro
in our
It looks like possibly wrong function was inlined, maybe wasm-ld or wasm-opt issue? |
Put NativeFileReference files after the runtime libs. This server as a workaround of dotnet#109289
Got more details today. I checked the
I don't know (yet) the linking custom section format. I speculate that the object file contain Next I checked that
and that
In our runtime libs, the
Don't have complete image yet. So far I suspect, that Playing with these I found a workaround, which we might be able to use. I changed the order of linked libs, so that native reference libs are added after runtime libs. That worked for me locally. Testing that in #109232 |
I can confirm that changing the native libraries order is fixing the issue for my scenario. The following target hacks its way through for rc2: <Target Name="Issue109289_Workaround" AfterTargets="_BrowserWasmWriteRspForLinking" Condition=" $(NETCoreSdkVersion.Contains('rc.2')) ">
<ItemGroup>
<_WasmLinkStepArgs Remove="@(_EmccLinkStepArgs)" />
<_EmccLinkStepArgs Remove=""%(_WasmNativeFileForLinking.Identity)"" />
<_WasmLinkDependencies Remove="@(_WasmNativeFileForLinking)" />
<_SkiaSharpToReorder Include="@(_WasmNativeFileForLinking)" Condition="$([System.String]::Copy('%(FullPath)').Contains('SkiaSharp'))" />
<_WasmNativeFileForLinking Remove="@(_SkiaSharpToReorder)" />
<_WasmNativeFileForLinking Include="@(_SkiaSharpToReorder)" />
<_EmccLinkStepArgs Include=""%(_WasmNativeFileForLinking.Identity)"" />
<_WasmLinkDependencies Include="@(_WasmNativeFileForLinking)" />
<_WasmLinkStepArgs Include="@(_EmccLinkStepArgs)" />
</ItemGroup>
</Target> |
So the "wrong" (note: |
* Add dotnet/runtime#109289 workaround * Add target framework version condition
* Add dotnet/runtime#109289 workaround * Add target framework version condition
* [wasm] Re-enable skiasharp WBT tests * Disable Debug/AOT combination That would trigger build error, because we don't support that combination anymore * Change order of native libs Put NativeFileReference files after the runtime libs. This server as a workaround of #109289 * Update llvm, emsdk and icu deps * Revert "Change order of native libs" This reverts commit e320fd6.
* [wasm] Re-enable skiasharp WBT tests * Disable Debug/AOT combination That would trigger build error, because we don't support that combination anymore * Change order of native libs Put NativeFileReference files after the runtime libs. This server as a workaround of dotnet#109289 * Update llvm, emsdk and icu deps * Revert "Change order of native libs" This reverts commit e320fd6.
Application referencing skiasharp packages in Debug configuration are triggering these errors during runtime in chrome:
It is also reproducible on CI, #109232 is now triggering this problem.
The text was updated successfully, but these errors were encountered: