You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a GDExtension project that statically links with a relatively large speech recognition library. It works fine on desktop platforms but fails to load in Web exports, showing a LinkError from the WASM runtime.
Uncaught (in promise) LinkError: imported function 'env.strtoll' signature mismatch
This issue also presents when using symbols from std::chrono in the extension, even though none of them are exported or made available to other modules. The problem is described in #94537 (comment), and I am experiencing more or less the same thing.
Steps to reproduce
Extract MRP
Clone godot-cpp into the extracted folder using the 4.3 branch
If you want to test the full project or the MRP does not work for whatever reason, the full source code is available at https://github.com/Nihlus/gdvosk. Binaries can be downloaded from the workflows as artifacts. I had some trouble running the MRP due to what appears to be another Godot bug regarding stack smashing on my system, so YMMV.
The text was updated successfully, but these errors were encountered:
I believe I found the problem - there's a compilation flag mismatch between godot-cpp and godot proper, meaning that -sWASM_BIGINT is not present (among a number of other flags). This flag changes the representation of 64-bit integers in the compiled code, resulting in types like long long having different signatures between the builds.
The solution is to add this flag to the compilation, but there should probably be a review of the rest of the flags as well. There's also some discrepancies when using the CMake support in godot-cpp, but that's probably better as a separate issue.
Tested versions
System information
Godot v4.3.stable - Linux Mint 22 (Wilma) - X11 - Vulkan (Forward+) - dedicated Radeon RX Vega (RADV VEGA10) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)
Issue description
I have a GDExtension project that statically links with a relatively large speech recognition library. It works fine on desktop platforms but fails to load in Web exports, showing a LinkError from the WASM runtime.
This issue also presents when using symbols from
std::chrono
in the extension, even though none of them are exported or made available to other modules. The problem is described in #94537 (comment), and I am experiencing more or less the same thing.Steps to reproduce
Minimal reproduction project (MRP)
minimal-repro.zip
If you want to test the full project or the MRP does not work for whatever reason, the full source code is available at https://github.com/Nihlus/gdvosk. Binaries can be downloaded from the workflows as artifacts. I had some trouble running the MRP due to what appears to be another Godot bug regarding stack smashing on my system, so YMMV.
The text was updated successfully, but these errors were encountered: