> From: Juan José García-Ripoll > <juanjose.garciarip...@gmail.com> > Date: Sat, 30 Sep 2023 20:26:57 +0200 > > Eli Zaretskii <e...@gnu.org> writes: > >> 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.
I don't know where did you see the recommendation to keep GCC out of the global PATH. IMO, it is incorrect: the GCC driver gcc.exe and the Binutils programs (as.exe, ld.exe, collect2.exe, etc.) should be on system-wide PATH. Otherwise, you don't have what we consider a working development environment, where the compiler can be invoked by Emacs without knowing in which directory it lives. The treesit-install-language-grammar command relies on this assumption, which is why it didn't work for you. FWIW, I use MSYS on my Windows system, with GCC and Binutils on the system-wide PATH, and I have yet to see any problems. What you should NOT have on PATH are MSYS executables, those that depend on the MSYS DLL, but GCC and Binutils are MinGW programs, not MSYS programs, and live in a separate directory in the MinGW/MSYS installation (or at least they should be in separate directories). > 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. No, I think it would be a mistake for Emacs to install a development environment, especially since it is quite large. So we won't be doing that in Emacs.