latex-lsp / tree-sitter-latex

LaTeX grammar for tree-sitter
MIT License
87 stars 21 forks source link

emcc command failed #109

Open insert-zkm opened 3 months ago

insert-zkm commented 3 months ago

Failed to bulid wasm for tree-sitter-latex with tree-sitter build-wasm. I get this error:

emcc command failed - emcc: error: '/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -fPIC -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN -Werror=implicit-function-declaration -I/emsdk/upstream/emscripten/cache/sysroot/include/SDL --sysroot=/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -Os -fno-exceptions -Isrc src/parser.c -c -o /tmp/emscripten_temp_2p2f7hq0/parser_1.o' failed (received SIGKILL (-9))

But i sucessfully generated .wasm file for tree-sitter-javascript

At the first run tree-sitter build-wasm it installed emscripten/emcc. Versions:

tree-sitter-cli: v0.20.8
tree-sitter:     v0.21.1
docker:          v26.0.0
node:            v20.12.0
npm:             v10.5.0

Same error after updating tree-sitter-cli to latest version v0.22.2:

root@knby:/home/zarik/git-projects/tree-sitter-latex# tree-sitter build -w -d -o . .
emcc: error: '/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -fPIC -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN -Werror=implicit-function-declaration --sysroot=/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -Os -fno-exceptions -fvisibility=hidden -I. parser.c -c -o /tmp/emscripten_temp_w52eg9rb/parser_1.o' failed (received SIGKILL (-9))
emcc command failed
WSL + Ubuntu
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

Keep getting this error after trying recommended emscripten version.

Also tried with podman on Windows with git bash(MSYS) and get same error.

$ tree-sitter build -w

Unable to find image 'emscripten/emsdk:3.1.37' locally
b67be19149ed: Download complete
2ab09b027e7f: Download complete
ac60c409dfbc: Download complete
3f25c71dba43: Download complete
d80f888e2693: Download complete
004c6c002196: Download complete
emcc: error: '/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -fPIC -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN -Werror=implicit-function-declaration --sysroot=/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -Os -fno-exceptions -fvisibility=hidden -I. parser.c -c -o /tmp/emscripten_temp_2wgd0h62/parser_1.o' failed (received SIGKILL (-9))
emcc command failed

Versions:

tree-sitter-cli: v0.22.2
tree-sitter:     v0.21.1
node:            v20.11.1
npm:             v10.2.4
podman:       v4.9.4