Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error: multiple definition of tree_sitter_html_external_scanner_create #27

Open
milahu opened this issue Feb 20, 2024 · 0 comments

Comments

@milahu
Copy link

milahu commented Feb 20, 2024

helper functions should be static
to avoid the downstream build error multiple definition of ...
when building one binary from multiple parsers

build.log
/nix/store/xdqs45iclhp9dz8zz9pvn5zivjbhid1a-binutils-2.40/bin/ld: /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-vue/src/scanner.o: in function `tree_sitter_html_external_scanner_create':
scanner.cc:(.text+0xaf0): multiple definition of `tree_sitter_html_external_scanner_create'; /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-html/src/scanner.o:scanner.c:(.text+0x5b0): first defined here
/nix/store/xdqs45iclhp9dz8zz9pvn5zivjbhid1a-binutils-2.40/bin/ld: /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-vue/src/scanner.o: in function `tree_sitter_html_external_scanner_serialize':
scanner.cc:(.text+0xb20): multiple definition of `tree_sitter_html_external_scanner_serialize'; /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-html/src/scanner.o:scanner.c:(.text+0xac0): first defined here
/nix/store/xdqs45iclhp9dz8zz9pvn5zivjbhid1a-binutils-2.40/bin/ld: /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-vue/src/scanner.o: in function `tree_sitter_html_external_scanner_destroy.localalias':
scanner.cc:(.text+0xc40): multiple definition of `tree_sitter_html_external_scanner_destroy'; /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-html/src/scanner.o:scanner.c:(.text+0xf00): first defined here
/nix/store/xdqs45iclhp9dz8zz9pvn5zivjbhid1a-binutils-2.40/bin/ld: /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-vue/src/scanner.o: in function `tree_sitter_html_external_scanner_deserialize':
scanner.cc:(.text+0xe20): multiple definition of `tree_sitter_html_external_scanner_deserialize'; /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-html/src/scanner.o:scanner.c:(.text+0xba0): first defined here
/nix/store/xdqs45iclhp9dz8zz9pvn5zivjbhid1a-binutils-2.40/bin/ld: /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-vue/src/scanner.o: in function `tree_sitter_html_external_scanner_scan':
scanner.cc:(.text+0x1850): multiple definition of `tree_sitter_html_external_scanner_scan'; /build/tmpxyj0x25atree_sitter_language/vendor/tree-sitter-html/src/scanner.o:scanner.c:(.text+0x5c0): first defined here

grantjenks/py-tree-sitter-languages#55
tree-sitter/tree-sitter-html#64

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

No branches or pull requests

1 participant