Skip to content

"ReferenceError: makeGetSlabs is not defined" while compiling to js #15355

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

Open
viraptor opened this issue Oct 25, 2021 · 1 comment
Open

"ReferenceError: makeGetSlabs is not defined" while compiling to js #15355

viraptor opened this issue Oct 25, 2021 · 1 comment

Comments

@viraptor
Copy link

While trying to compile https://github.com/inolen/ioq3 with the new emscripten (2.0.32), I got:

error: failure to process js library "/home/viraptor/Projects/quakejs/ioq3/code/sys/sys_common.js": ReferenceError: makeGetSlabs is not defined,
error: use -s VERBOSE to see more details
Internal compiler error in src/compiler.js!
Please create a bug report at https://github.com/emscripten-core/emscripten/issues/
with a log of the build and the input files used to run. Exception message: "ReferenceError: makeGetSlabs is not defined" | In the following macro:

 makeGetSlabs('bufp', 'i8', true) 

ReferenceError: makeGetSlabs is not defined
    at eval (eval at <anonymous> (eval at load (/home/viraptor/Projects/emsdk/upstream/emscripten/src/compiler.js:38:8)), <anonymous>:1:2)
    at eval (eval at load (/home/viraptor/Projects/emsdk/upstream/emscripten/src/compiler.js:38:8), <anonymous>:21:19)
    at String.replace (<anonymous>)
    at processMacros (eval at load (/home/viraptor/Projects/emsdk/upstream/emscripten/src/compiler.js:38:8), <anonymous>:18:15)
    at Object.load (eval at load (/home/viraptor/Projects/emsdk/upstream/emscripten/src/compiler.js:38:8), <anonymous>:213:21)
    at JSify (eval at load (/home/viraptor/Projects/emsdk/upstream/emscripten/src/compiler.js:38:8), <anonymous>:75:20)
    at Object.<anonymous> (/home/viraptor/Projects/emsdk/upstream/emscripten/src/compiler.js:98:3)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
@sbc100
Copy link
Collaborator

sbc100 commented Oct 26, 2021

It looks like this function function was renamed in #13292.

You should be able to replace that call with getHeapForType('i8'). If this function has widespread usage then we could a in a compatibility shim for the old runtime function. In future we will have a more rigorous plan when we rename runtime functions this: #15242

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

2 participants