Skip to content

Unable to load GDExtension in Web export due to LinkError with env.strtoll #96492

Closed
godotengine/godot-cpp
#1603
@Nihlus

Description

@Nihlus

Tested versions

  • Reproducible in 4.3.stable.official.77dcf97d8

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.

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

  1. Extract MRP
  2. Clone godot-cpp into the extracted folder using the 4.3 branch
  3. build with scons
  4. export a web version of the project
  5. run it
  6. observe error in dev console

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions