-
Notifications
You must be signed in to change notification settings - Fork 547
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
[BUG] wasm-ld : error : --shared-memory is disallowed by libskia.SkOpts.o because it was not compiled with 'atomics' or 'bulk-memory' features. #2614
Comments
Thanks for reporting this. I believe it is because we are including the wrong build of libSkiaSharp in your multi-threading blazor app. I have some PRs to fix it, but for now, adding this to the csproj will/should fix it. I just typed this, so let me know: <ItemGroup>
<!-- remove all previous native files -->
<NativeFileReference Remove="@(SkiaSharpStaticLibrary)" />
<!-- include the multi-threaded build if WasmEnableThreads=true -->
<NativeFileReference Include="$(SkiaSharpStaticLibraryPath)\3.1.34\mt\*.a" Condition="'$(WasmEnableThreads)' == 'True'" />
<!-- otherwise use the single threaded build -->
<NativeFileReference Include="$(SkiaSharpStaticLibraryPath)\3.1.34\st\*.a" Condition="'$(WasmEnableThreads)' != 'True'" />
</ItemGroup> |
Thanks for the quick reply! Also just want to say thanks for all the work you guys are doing on this, I've tried to work with SKIA natively previously so I have a lot of respect for anybody capable to deal with it efficiently and Im super stoked for all the possibilities this enables. Kudos! |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
How are you currently running things? I have a new project and added: <WasmEnableThreads>true</WasmEnableThreads>
<WasmBuildNative>true</WasmBuildNative> But I am getting errors:
|
Seems that most of this does not work in .NET 8 Blazor, and things are coming to .NET 9. I will fix this so we are ready for net9.0 |
Description
Hey! Im trying to use SkiaSharp in combination with
<WasmEnableThreads>true</WasmEnableThreads>
, but I get the following error(s):I do get the
-msimd128
flag passed way down the end though.It seems like a similar issue has been solved previously (#2286), although I have not been able to get it working either on net7 + 2.88.4 or on the latest net8 RC1 and 2.88.6-preview, so Im not sure this is a regression. As it seems like others are also still running into this I'm guessing this never worked completely in the first place? Is there some flag I need to pass in
<EmccExtraCFlags>
or<EmccExtraLDFlags>
?My IDE is Rider.
Code
Expected Behavior
No response
Actual Behavior
No response
Version of SkiaSharp
Other (Please indicate in the description)
Last Known Good Version of SkiaSharp
Other (Please indicate in the description)
IDE / Editor
Other (Please indicate in the description)
Platform / Operating System
macOS
Platform / Operating System Version
No response
Devices
No response
Relevant Screenshots
No response
Relevant Log Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: