Skip to content
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

Web export fails due to Uncaught LinkError #1553

Closed
2shady4u opened this issue Aug 18, 2024 · 3 comments · Fixed by #1603
Closed

Web export fails due to Uncaught LinkError #1553

2shady4u opened this issue Aug 18, 2024 · 3 comments · Fixed by #1603
Labels
bug This has been identified as a bug platform:web

Comments

@2shady4u
Copy link
Contributor

Godot version

v4.3-stable

godot-cpp version

4.3

System information

Windows 10

Issue description

Exporting to web fails because of following error:

TypeError: a.default.detectStore(...) is undefined h1-check.js:1:1301
Uncaught (in promise) LinkError: imported function 'env._ZNSt3__29to_stringEx' signature mismatch

I have tried exporting with both threads enabled and disabled and I get the same issue.
I used Firefox, Chrome and Vivaldi and all of them report the same error.

My build system uses Emscripten v3.1.39 and can be found here:
https://github.com/2shady4u/godot-sqlite

Steps to reproduce

  • Run the minimal reproduction project
  • Open the 'Web Developer Tools' in your browser.
  • Observe the error.

Minimal reproduction project

demo.zip

@2shady4u
Copy link
Contributor Author

I have tried re-compiling my binaries using Emscripten 3.1.64 (as found here), but I get the exact same error...

@Faless Faless added bug This has been identified as a bug platform:web labels Sep 2, 2024
@Faless
Copy link
Contributor

Faless commented Sep 2, 2024

Possibly related issue: godotengine/godot#96492 .

We should test if this is a regression from godotengine/godot#93853

@Nihlus
Copy link

Nihlus commented Sep 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug platform:web
Projects
None yet
3 participants