emacs-devel
[Top][All Lists]
Advanced

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

Re: MSYS2 PATH problems with native compilation


From: Eli Zaretskii
Subject: Re: MSYS2 PATH problems with native compilation
Date: Wed, 08 Dec 2021 14:34:10 +0200

> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Tue, 07 Dec 2021 22:13:09 +0100
> 
> gcc.exe, ld.exe, as.exe etc are on the same directory as emacs.exe. This
> is no coincidence, is how packages are installed on MSYS2/Mingw-w64,
> which follows a similar approach to GNU/Linux.

So the only thing that's missing is that this directory is not on
PATH, and telling your users to add it to PATH would solve it cleanly
and easily.

(Btw, I don't believe libgccjit DLL is invoking gcc.exe, I think it
invokes cc1.exe directly.)

> > And if they _are_
> > installed in the same directory, then what is again the problem of
> > adding that single directory to the system-wide PATH?
> 
> You say that adding PATH automatically from emacs is a no-no, but you
> are fine with forcing the user to set PATH globally (thus affecting the
> whole system) ??

Of course!  Because the latter will be done by the user, who is
supposed to know his/her needs and the setup of his/her system, and is
therefore capable of changing PATH in ways that will not interfere
with whatever the user does on that system.  Whereas changing PATH
from a program which knows nothing about that stuff is likely to cause
trouble.

> > So why on Earth not tell your users to add that single bin/ directory
> > to system-wide PATH, and be done with that?
> 
> I have no method for telling the users, apart from patching Emacs to
> show a prominent message.

Aren't there MinGW64 installation instructions somewhere?
Instructions that aren't related to Emacs alone, but are general.
That's the place to tell them.  Seriously, installing programs and not
putting their directory on PATH is at least weird if not downright
wrong.

> Transiently setting PATH while generating .eln is a fix. What do you
> have against it?

I already told you: it will cause some uses of native-compilation
work, but others, the ones which don't start sub-processes, will
still fail.

And this is not an Emacs problem anyway, it's a MinGW64 problem:
MinGW64 installation instructions should tell users to add the MinGw64
bin/ directory to PATH.



reply via email to

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