sql-js / sql-js/sql.js

Error building in dev container: falling back to java version of closure compiler / google-closure-compiler returned non-zero exit status 254

Aperta
#613 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
13.7k
Fork
1.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'm on an ARM64 Mac Book Pro, running the DevContainer in VS Code.

After a fresh checkout, no pending changes, npm install and then npm run rebuild, I get this error:

building:WARNING: falling back to java version of closure compiler
Command '['/emsdk/node/20.18.0_64bit/bin/node', '--max_old_space_size=8192', '/emsdk/upstream/emscripten/node_modules/.bin/google-closure-compiler', '--platform=java', '--version']' returned non-zero exit status 254.
emcc: error: closure compiler (/emsdk/node/20.18.0_64bit/bin/node --max_old_space_size=8192 /emsdk/upstream/emscripten/node_modules/.bin/google-closure-compiler --platform=java --version) did not execute properly!
make: *** [Makefile:94: dist/sql-asm.js] Error 1

Here's the full log after running npm run rebuild:

node ➜ /workspaces/sql.js-with-sqlean (master) $ npm run rebuild

> sql.js@1.13.0 rebuild
> npm run clean && npm run build


> sql.js@1.13.0 clean
> make clean

rm -f out/* dist/* cache/*
rm -rf sqlite-src/

> sql.js@1.13.0 build
> make

mkdir -p cache
curl -LsSf 'https://sqlite.org/2025/sqlite-amalgamation-3490100.zip' -o cache/sqlite-amalgamation-3490100.zip
mkdir -p cache
curl -LsSf 'https://www.sqlite.org/contrib/download/extension-functions.c?get=25' -o cache/extension-functions.c
mkdir -p sqlite-src/sqlite-amalgamation-3490100
echo 'c68fa706d6d9ff98608044c00212473f9c14892f  ./cache/extension-functions.c' > cache/check.txt
sha1sum -c cache/check.txt
./cache/extension-functions.c: OK
cp 'cache/extension-functions.c' sqlite-src/sqlite-amalgamation-3490100/extension-functions.c
mkdir -p sqlite-src/sqlite-amalgamation-3490100
echo 'e7eb4cfb2d95626e782cfa748f534c74482f2c3c93f13ee828b9187ce05b2da7  ./cache/sqlite-amalgamation-3490100.zip' > cache/check.txt
sha3sum -a 256 -c cache/check.txt
./cache/sqlite-amalgamation-3490100.zip: OK
# We don't delete the sqlite_amalgamation folder. That's a job for clean
# Also, the extension functions get copied here, and if we get the order of these steps wrong,
# this step could remove the extension functions, and that's not what we want
unzip -u 'cache/sqlite-amalgamation-3490100.zip' -d sqlite-src/
Archive:  cache/sqlite-amalgamation-3490100.zip
  inflating: sqlite-src/sqlite-amalgamation-3490100/sqlite3.c  
  inflating: sqlite-src/sqlite-amalgamation-3490100/shell.c  
  inflating: sqlite-src/sqlite-amalgamation-3490100/sqlite3.h  
  inflating: sqlite-src/sqlite-amalgamation-3490100/sqlite3ext.h  
touch sqlite-src/sqlite-amalgamation-3490100
mkdir -p out
# Generate llvm bitcode
emcc -Oz -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_NORMALIZE -c sqlite-src/sqlite-amalgamation-3490100/sqlite3.c -o out/sqlite3.o
mkdir -p out
# Generate llvm bitcode
emcc -Oz -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_NORMALIZE -c sqlite-src/sqlite-amalgamation-3490100/extension-functions.c -o out/extension-functions.o
emcc -s RESERVED_FUNCTION_POINTERS=64 -s ALLOW_TABLE_GROWTH=1 -s EXPORTED_FUNCTIONS=@src/exported_functions.json -s EXPORTED_RUNTIME_METHODS=@src/exported_runtime_methods.json -s SINGLE_FILE=0 -s NODEJS_CATCH_EXIT=0 -s NODEJS_CATCH_REJECTION=0 -s STACK_SIZE=5MB -Oz -flto --closure 1 -s WASM=0 out/sqlite3.o out/extension-functions.o --pre-js src/api.js -o dist/sql-asm.js
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libGL-getprocaddr.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libGL-getprocaddr.a" for subsequent builds)
system_libs:INFO: compiled 4 inputs in 0.30s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libal.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libal.a" for subsequent builds)
system_libs:INFO: compiled 1 inputs in 0.12s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libhtml5.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libhtml5.a" for subsequent builds)
system_libs:INFO: compiled 5 inputs in 0.36s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libc_optz.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc_optz.a" for subsequent builds)
system_libs:INFO: compiled 7 inputs in 0.46s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libstubs.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libstubs.a" for subsequent builds)
system_libs:INFO: compiled 2 inputs in 0.12s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libnoexit.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libnoexit.a" for subsequent builds)
system_libs:INFO: compiled 1 inputs in 0.16s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libc.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a" for subsequent builds)
system_libs:INFO: compiled 1043 inputs in 7.77s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libdlmalloc.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libdlmalloc.a" for subsequent builds)
system_libs:INFO: compiled 2 inputs in 0.32s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libcompiler_rt.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libcompiler_rt.a" for subsequent builds)
system_libs:INFO: compiled 162 inputs in 1.62s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libc++-noexcept.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++-noexcept.a" for subsequent builds)
system_libs:INFO: compiled 57 inputs in 18.51s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a" for subsequent builds)
system_libs:INFO: compiled 16 inputs in 1.74s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/lto/libsockets.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libsockets.a" for subsequent builds)
system_libs:INFO: compiled 27 inputs in 0.79s
cache:INFO:  - ok
cache:INFO: generating system asset: symbol_lists/8108443b04583d75a36e7cbeb5b4b4fc329d6878.json... (this will be cached in "/emsdk/upstream/emscripten/cache/symbol_lists/8108443b04583d75a36e7cbeb5b4b4fc329d6878.json" for subsequent builds)
cache:INFO:  - ok
building:WARNING: falling back to java version of closure compiler
Command '['/emsdk/node/20.18.0_64bit/bin/node', '--max_old_space_size=8192', '/emsdk/upstream/emscripten/node_modules/.bin/google-closure-compiler', '--platform=java', '--version']' returned non-zero exit status 254.
emcc: error: closure compiler (/emsdk/node/20.18.0_64bit/bin/node --max_old_space_size=8192 /emsdk/upstream/emscripten/node_modules/.bin/google-closure-compiler --platform=java --version) did not execute properly!
make: *** [Makefile:94: dist/sql-asm.js] Error 1

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start with Makefile:94 and the emcc invocation shown in the npm run rebuild log; reproduce the closure compiler failure in the ARM64 dev container and inspect how that compiler is selected. Done means npm run rebuild completes and produces dist/sql-asm.js without the non-zero exit status.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
docker, javascript, node.js, sqlite, wasm
Ambito
build-system, developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.