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

ReferenceError: Can't find variable: IDBFS #9824

Open
andreyugolnik opened this issue Nov 12, 2019 · 4 comments
Open

ReferenceError: Can't find variable: IDBFS #9824

andreyugolnik opened this issue Nov 12, 2019 · 4 comments

Comments

@andreyugolnik
Copy link

@andreyugolnik andreyugolnik commented Nov 12, 2019

Hello,

After upgrading to emscripten to the version 1.39.2-fastcomp I got error:
ReferenceError: Can't find variable: IDBFS:

var profilePath = 'my_path';
FS.mkdir(profilePath);
FS.mount(IDBFS, {}, profilePath);

Mainstream version doesn't compile my code at all:

Fatal: local.get of unknown in arg0 of call to $emscripten_asm_const_int (used by EM_ASM* macros) in function $685.
This might be caused by aggressive compiler transformations. Consider using EM_JS instead.

OS: latest macOS.
Tested in browsers: latest Google Chrome and latest Safari.

@andreyugolnik

This comment has been minimized.

Copy link
Author

@andreyugolnik andreyugolnik commented Nov 12, 2019

Compilation flags:

-s WASM=0 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall','callMain']"
@kripken

This comment has been minimized.

Copy link
Member

@kripken kripken commented Nov 12, 2019

Sorry for the inconvenience, this changed in 1.39.1, see the changelog:

https://github.com/emscripten-core/emscripten/blob/incoming/ChangeLog.md#v1391-10302019

(In a build with ASSERTIONS, or at -O0, it should have shown you a useful error message. If you built in one of those modes and didn't see one, please let me know as it means something is broken in that helper code.)

@sbc100

This comment has been minimized.

Copy link
Collaborator

@sbc100 sbc100 commented Nov 12, 2019

For the upstream build failure we do want to look into that. If you can somehow produce a repro case for that that would be useful. Doing a debug build might give you a more useful error message than in function $685 so you can find out which EM_ASM macro is causing this issue.

@andreyugolnik

This comment has been minimized.

Copy link
Author

@andreyugolnik andreyugolnik commented Nov 12, 2019

@kripken thanks a lot, it helps.

@sbc100 thank you, I will try to rebuild game in debug mode a little bit later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
LLVM Upstream Backend
Awaiting triage
3 participants
You can’t perform that action at this time.