You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are errors in JS library code we now have an option to save the
preprocessed output to a temp location. From there lookup the error
message and corresponding line number.
For example:
```
$ emcc ~/test//hello.c
error: /usr/local/google/home/sbc/dev/wasm/emscripten/src/lib/libcore.js: failure to execute js library "/usr/local/google/home/sbc/dev/wasm/emscripten/src/lib/libcore.js":
error: /usr/local/google/home/sbc/dev/wasm/emscripten/src/lib/libcore.js: use -sVERBOSE to see more details
Internal compiler error JS compiler
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: "/usr/local/google/home/sbc/dev/wasm/emscripten/src/lib/libcore.preprocessed.js:1087
ds = fd
^^^^^^^
SyntaxError: Invalid shorthand property initializer
at new Script (node:vm:117:7)
at createScript (node:vm:269:10)
at Module.runInContext (node:vm:300:10)
at runInMacroContext (file:///usr/local/google/home/sbc/dev/wasm/emscripten/src/utility.mjs:324:13)
at Object.load (file:///usr/local/google/home/sbc/dev/wasm/emscripten/src/modules.mjs:291:9)
at Module.runJSify (file:///usr/local/google/home/sbc/dev/wasm/emscripten/src/jsifier.mjs:354:18)
at file:///usr/local/google/home/sbc/dev/wasm/emscripten/tools/compiler.mjs:97:17
```
Building with -sVERBOSE then generates:
```
$ emcc ~/test//hello.c -sVERBOSE
processing system library: /usr/local/google/home/sbc/dev/wasm/emscripten/src/lib/libint53.js
processing system library: /usr/local/google/home/sbc/dev/wasm/emscripten/src/lib/libcore.js
error: /usr/local/google/home/sbc/dev/wasm/emscripten/src/lib/libcore.js: failure to execute js library "/usr/local/google/home/sbc/dev/wasm/emscripten/src/lib/libcore.js":
error: /usr/local/google/home/sbc/dev/wasm/emscripten/src/lib/libcore.js: See preprocessed source in /tmp/emcc-jscompiler-3XmDDr/libcore.js
Internal compiler error JS compiler
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: "/tmp/emcc-jscompiler-3XmDDr/libcore.js:1087
ds = fd
^^^^^^^
SyntaxError: Invalid shorthand property initializer
at new Script (node:vm:117:7)
at createScript (node:vm:269:10)
at Module.runInContext (node:vm:300:10)
at runInMacroContext (file:///usr/local/google/home/sbc/dev/wasm/emscripten/src/utility.mjs:324:13)
at Object.load (file:///usr/local/google/home/sbc/dev/wasm/emscripten/src/modules.mjs:291:9)
at Module.runJSify (file:///usr/local/google/home/sbc/dev/wasm/emscripten/src/jsifier.mjs:354:18)
at file:///usr/local/google/home/sbc/dev/wasm/emscripten/tools/compiler.mjs:97:17
```
No you can open the file mentioned in the error message
(/tmp/emcc-jscompiler-3XmDDr/libcore.js) and go to line 1087.
Without this change the file referenced in the error message will always
be non-existant, and we would instead dump the whole file (which could
be huge) to stderr.
0 commit comments