Skip to content

Conversation

shawa
Copy link
Contributor

@shawa shawa commented Nov 25, 2022

This PR (attempts) to add support for Elixir by adding the dependency on the official Elixir tree-sitter grammar.

I've been unable to build this on any machine for some reason, it looks like Emscripten is failing on the linker step. I'd appreciate any insight and testing!

The output is below; yarn was failing to even run yarn add -D due to the preinstall step:

$ make web-tree-sitter
/Users/shawa/Projects/cursorless/vscode-parse-tree/.make-work/tree-sitter
/Users/shawa/Projects/cursorless/vscode-parse-tree/.make-work/tree-sitter
Unable to find image 'emscripten/emsdk:2.0.24' locally
2.0.24: Pulling from emscripten/emsdk
345e3491a907: Pull complete
57671312ef6f: Pull complete
5e9250ddb7d0: Pull complete
859aa499d6fa: Pull complete
04e009ac95c8: Pull complete
5bfdbd9279e5: Pull complete
ac435eb7f4a4: Pull complete
Digest: sha256:81ec54b7a096d28f24d906955dbf98ff336cca47658d980c243baa36f6484f9f
Status: Downloaded newer image for emscripten/emsdk:2.0.24
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libGL.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libGL.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libal.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libal.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libhtml5.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libhtml5.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libc.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libc.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libcompiler_rt.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libcompiler_rt.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libc++-noexcept.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libc++-noexcept.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libc++abi-noexcept.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libc++abi-noexcept.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libdlmalloc.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libdlmalloc.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libc_rt_wasm.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libc_rt_wasm.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libsockets.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libsockets.a" for subsequent builds)
cache:INFO:  - ok
emcc: error: undefined exported symbol: "___cxa_atexit" [-Wundefined] [-Werror]
make: *** [vendor/web-tree-sitter/0.20.4/README.md] Error 1
error Command failed with exit code 2.

This PR (attempts) to add support for Elixir by adding the dependency on the
official Elixir tree-sitter grammar.

I've been unable to build this on any machine for some reason, it looks like
Emscripten is failing on the linker step. I'd appreciate any insight and
testing!

The output is below; yarn was failing to even run `yarn add -D` due to the
preinstall step:

```
$ make web-tree-sitter
/Users/shawa/Projects/cursorless/vscode-parse-tree/.make-work/tree-sitter
/Users/shawa/Projects/cursorless/vscode-parse-tree/.make-work/tree-sitter
Unable to find image 'emscripten/emsdk:2.0.24' locally
2.0.24: Pulling from emscripten/emsdk
345e3491a907: Pull complete
57671312ef6f: Pull complete
5e9250ddb7d0: Pull complete
859aa499d6fa: Pull complete
04e009ac95c8: Pull complete
5bfdbd9279e5: Pull complete
ac435eb7f4a4: Pull complete
Digest: sha256:81ec54b7a096d28f24d906955dbf98ff336cca47658d980c243baa36f6484f9f
Status: Downloaded newer image for emscripten/emsdk:2.0.24
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libGL.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libGL.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libal.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libal.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libhtml5.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libhtml5.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libc.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libc.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libcompiler_rt.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libcompiler_rt.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libc++-noexcept.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libc++-noexcept.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libc++abi-noexcept.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libc++abi-noexcept.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libdlmalloc.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libdlmalloc.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libc_rt_wasm.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libc_rt_wasm.a" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/pic/libsockets.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libsockets.a" for subsequent builds)
cache:INFO:  - ok
emcc: error: undefined exported symbol: "___cxa_atexit" [-Wundefined] [-Werror]
make: *** [vendor/web-tree-sitter/0.20.4/README.md] Error 1
error Command failed with exit code 2.
```
@shawa shawa marked this pull request as draft November 25, 2022 18:03
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@pokey pokey marked this pull request as ready for review November 30, 2022 06:26
@pokey pokey merged commit 7ce3e30 into cursorless-dev:main Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants