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

Deprecated emscripten-build-parameter resulting in failing to call "ccall" #42

Open
gizmotic opened this issue Apr 22, 2022 · 2 comments

Comments

@gizmotic
Copy link

The current build of emscripten doesn't accept the deprecated build-parameter "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']".
I tried to fix it by using "EXPORTED_RUNTIME_METHODS=ccall" instead, but this results in an error when loading roms:

Uncaught TypeError: gbaninja.ccall is not a function (index.html, line 589):
return gbaninja.ccall("VBA_start", "int", [], []);

Any idea how to fix this?

@Zelif
Copy link

Zelif commented Aug 8, 2023

@gizmotic
Probs way too late here but thought I'd offer a fix.
I swapped over the ccall flag to the updated one you mentioned, and fixed the init code to load the module correctly.

Explanation:
Changes in how some modules are loaded had made it would pull the module incorrectly (multiple times) and thus was left with the ready promise in the global object. Just made sure it would only set it once, and when it finished loading set the global object.

You can test it out from the pull request mentioned.
Cheers for pointing out that the exported flag had changed that saved me a bunch of time I would have wasted.

@jackbonaguro
Copy link

@Zelif thank you so much, I just encountered this same issue and your fix worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants