emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.79k stars 3.31k forks source link

Compiling Godot engine from source using emscripten and scons #22485

Open kalio12 opened 2 months ago

kalio12 commented 2 months ago

Version: most recent

Hey guys, im attempting to compile the godot engine from source using emscripten and scons, but i am getting the following error. I am using the following command: scons platform=web target=template_release

error: failure to execute js library "/home/XXXX/godot/platform/web/js/libs/library_godot_audio.js": SyntaxError: Unexpected token '?', 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: "SyntaxError: Unexpected token '?'" | SyntaxError: Unexpected token '?' at Object.load (eval at load (/usr/share/emscripten/src/compiler.js:38:8), :206:14) at runJSify (eval at load (/usr/share/emscripten/src/compiler.js:38:8), :75:20) at Object. (/usr/share/emscripten/src/compiler.js:81:3) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) at internal/main/run_main_module.js:17:47 em++: error: '/usr/bin/node /usr/share/emscripten/src/compiler.js /tmp/tmpw9npogwl.json' failed (returned 1) scons: *** [bin/godot.web.template_release.wasm32.js] Error 1 scons: building terminated because of errors.

Does anyone know what is causing this?

juj commented 2 months ago

Try https://github.com/godotengine/godot/issues if people there may have experienced this issue.