help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tree-sitter on Windows


From: Juan José García-Ripoll
Subject: Re: tree-sitter on Windows
Date: Sat, 30 Sep 2023 20:26:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:
>> 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".

It does not matter whether I give it a full path. I only have one hard
disk and in both cases the outcome is the same: it fails with no message
in "Error Output".

>> 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?

If you look at the code, I had to set PATH to point to
c:/msys64/ucrt64/bin, including the full set of files of the UCRT
version of Mingw into the path, at least temporarily. Adding this path
to the global path of Windows is not recommended, as one has instead
different shells or different scripts to activate those
sub-distributions.

Other software packages such as pdf-tools take care of this by
installing a minimal MINGW distribution during the building of the
software. Maybe that's something to consider.

Best,

-- 
Juan José García Ripoll
http://juanjose.garciaripoll.com
http://quinfog.hbar.es




reply via email to

[Prev in Thread] Current Thread [Next in Thread]