Re: Does Emacs use -ltree-sitter? yes
Tomas Nordin <[email protected]> Thu, 02 Jul 2026 20:35:57 +0000
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
Eli Zaretskii <[email protected]> writes: >> From: Tomas Nordin <[email protected]> >> Date: Wed, 01 Jul 2026 22:02:18 +0000 >> >> I just built and installed tree-sitter library from a clone of >> https://github.com/tree-sitter/tree-sitter.git by running make and make >> install. >> >> It installs to /usr/local/{lib,include}, for example >> >> /usr/local/lib/libtree-sitter.so.0.27 >> >> When re-building emacs on that, I get an error >> >> ./temacs: error while loading shared libraries: libtree-sitter.so.0.27: cannot open shared object file: No such file or directory >> >> I tried git clean -fdx but got the failure repeated. Should I provide a >> flag to include that /usr/local/lib location? I don't build in any >> special way, no special configuration flags. > > If your linker does not by default look in /usr/local/lib, then yes, > you need to configure Emacs with 'LDFLAGS=-L/usr/local/lib' and > probably the same for CFLAGS. What do the below commands produce? > > $ gcc -print-file-name=libtree-sitter.so.0.27 > $ gcc -print-file-name=libtree-sitter.so > > If GCC knows how to find it, you should see a full absolute file name > in response, not just the basename. It shows only the basename. For some reason I tried with just ./configure 'LDFLAGS=-L/usr/local/lib' and it was enough it seems, built fine. Thanks.