[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tree-sitter on Windows
From: |
Eli Zaretskii |
Subject: |
Re: tree-sitter on Windows |
Date: |
Sat, 30 Sep 2023 18:27:12 +0300 |
> From: Juan José García-Ripoll
> <juanjose.garciaripoll@gmail.com>
> Date: Sat, 30 Sep 2023 17:01:39 +0200
>
> Bare Emacs, 29.1 as downloaded by Scoop
> (treesit-available-p)
> => t
> (treesit-language-available-p 'python t)
> => (nil not-found ("libtree-sitter-python" "libtree-sitter-python.dll")
> "No such file or directory")
>
> I try then to activate a language mode such as python-ts-mode Warning
> (treesit): Cannot activate tree-sitter, because language grammar for
> python is unavailable (not-found): (libtree-sitter-python
> libtree-sitter-python.dll) No such file or directory
So far, it's expected if you don't have libtree-sitter-python.dll
installed.
> I then try to install using treesit-install-language-grammar and provide
> as C and C++ compiler "/msys64/ucrt64/usr/bin/gcc.exe" It fails with
>
> Warning (treesit): Error encountered when installing language grammar:
> (treesit-error Command: /msys64/ucrt64/bin/gcc.exe -fPIC -c -I. parser.c
> Error output: )
What followed the "Error output:" part? It is important to understand
whether the error was from the compiler or from some other part of the
installation process.
Also, "/msys64/ucrt64/usr/bin/gcc.exe" is not a full Windows file
name: it lacks the drive letter. You need to specify the full
absolute file name, including the drive letter. Or, if gcc.exe is on
PATH, I think you could simply say "gcc".
> Next thing I tried was using treesitter-langs from MELPA. This downloads
> DLLs but they have the wrong name: e.g. python.dll. I tried renaming
> them in-place, but still does not load them. I moved them to
> ~/.emacs.d/tree-sitter, and still does not load. In all cases from d),
> there is no meaningful error message
This seems to indicate those DLLs are incompatible with your Emacs
binary or something.
> The only solution I have been able to find is to rebuild the libraries
> as described in my previous email.
How is that different from what treesit-install-language-grammar does?