lovasoa / highs-js

Javascript linear programming library
https://lovasoa.github.io/highs-js/
MIT License
51 stars 14 forks source link

Devcontainer based build causes error at emcc step #14

Closed fuglede closed 2 years ago

fuglede commented 2 years ago

If I build the package in a VS Code remote container using a fresh build of the included Dockerfile, I get the following error:

building:ERROR: Closure compiler run failed:

building:ERROR: Unknown language `ECMASCRIPT_NEXT_IN' specified.

emcc: error: closure compiler failed (rc: 255): /usr/local/bin/node --max_old_space_size=8192 /usr/share/emscripten/node_modules/.bin/google-closure-compiler --compilation_level ADVANCED_OPTIMIZATIONS --language_in ECMASCRIPT_NEXT_IN --language_out NO_TRANSPILE --emit_use_strict=false --externs /usr/share/emscripten/src/closure-externs/closure-externs.js --externs /usr/share/emscripten/src/closure-externs/node-externs.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/tls.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/string_decoder.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/https.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/assert.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/url.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/vm.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/domain.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/events.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/path.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/readline.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/child_process.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/net.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/fs.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/tty.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/core.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/zlib.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/process.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/cluster.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/repl.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/querystring.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/os.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/punycode.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/http.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/dgram.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/buffer.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/util.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/stream.js --externs /usr/share/emscripten/third_party/closure-compiler/node-externs/dns.js --externs /usr/share/emscripten/src/closure-externs/v8-externs.js --externs /usr/share/emscripten/src/closure-externs/spidermonkey-externs.js --js_output_file /tmp/emscripten_temp_myw5jxjk/highs.js.pp.js.jso.js.jso.js.jso.js.jso.js.cc.js --js /tmp/emscripten_temp_myw5jxjk/highs.js.pp.js.jso.js.jso.js.jso.js.jso.js the error message may be clearer with -g1 and EMCC_DEBUG=2 set

If I remove --closure 1 from the arguments passed to emcc in build.sh, the build passes, a highs.js is produced, and npm test reports that all tests can be run successfully.

lovasoa commented 2 years ago

Hmm, you should probably report this to emscripten. It's emscripten that passes the flags to the closure compiler.

lovasoa commented 2 years ago

looks like the problem was fixed in emscripten long ago, but not in the debian package https://github.com/emscripten-core/emscripten/blob/main/tools/building.py#L842