[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter integration on feature/tree-sitter
From: |
Eli Zaretskii |
Subject: |
Re: Tree-sitter integration on feature/tree-sitter |
Date: |
Sat, 14 May 2022 22:09:59 +0300 |
> From: Daniel Martín <mardani29@yahoo.es>
> Cc: Emacs Devel <emacs-devel@gnu.org>
> Date: Sat, 14 May 2022 20:50:39 +0200
>
> The problem I tried to solve was this linker error:
>
> ld: library not found for -ltree-sitter
>
> The reason is that the custom library directory on my system,
> /opt/homebrew/Cellar/, needs to be set via -L, but setting
> TREE_SITTER_LIBS overrided that. Pkg-config already provides the
> necessary linker flags to use the library.
>
> With my change, I get the following in config.log:
>
> TREE_SITTER_LIBS='-L/opt/homebrew/Cellar/tree-sitter/0.20.6/lib -ltree-sitter'
>
> which is similar, for example, to how Jansson is linked:
>
> JSON_LIBS='-L/opt/homebrew/Cellar/jansson/2.14/lib -ljansson'
>
> and all compiles and links successfully.
The compiler and linker switches for linking against the library are
supposed to come from pkg-config (which gets them from tree-sitter.pc
file that is part of the tree-sitter library's installation).
> N.B: I don't know if this would work on MS-Windows. Perhaps MS-Windows
> loads tree-sitter dynamically and will need a special case that just
> unsets TREE_SITTER_LIBS.
Don't worry about Windows, we will figure this out when there's a
first Emacs user who wants to build that branch on Windows. And
initially, there's nothing wrong with linking against the library
statically even on Windows: the resulting binary will work.
- Re: Tree-sitter integration on feature/tree-sitter, (continued)
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/14
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/14
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/17
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/18
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/18
- Re: Tree-sitter integration on feature/tree-sitter, Stephen Leake, 2022/05/08
- Re: Tree-sitter integration on feature/tree-sitter, Daniel Martín, 2022/05/14
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/09
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/09
- Message not available
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/10
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/10
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/10
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/10
- Re: Tree-sitter integration on feature/tree-sitter, Stefan Monnier, 2022/05/10
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/10
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/10
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/11