unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: MSYS2 PATH problems with native compilation
Date: Wed, 08 Dec 2021 14:34:10 +0200	[thread overview]
Message-ID: <83a6hbxol9.fsf@gnu.org> (raw)
In-Reply-To: <87ee6o9l0a.fsf@telefonica.net> (message from Óscar Fuentes on Tue, 07 Dec 2021 22:13:09 +0100)

> 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	other threads:[~2021-12-08 12:34 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 15:04 msys2 build path problems + copy-paste english results in chinese characters arthur miller
2021-12-01 15:55 ` Lars Ingebrigtsen
2021-12-01 18:32   ` Arthur Miller
2021-12-01 18:50     ` Lars Ingebrigtsen
2021-12-01 22:42       ` Arthur Miller
2021-12-01 16:46 ` Eli Zaretskii
2021-12-01 18:25   ` Arthur Miller
2021-12-01 18:44     ` Eli Zaretskii
2021-12-01 22:39       ` Arthur Miller
2021-12-01 23:01         ` Óscar Fuentes
2021-12-02  7:19           ` Eli Zaretskii
2021-12-02  9:42             ` Óscar Fuentes
2021-12-02 10:05               ` Eli Zaretskii
2021-12-02 15:40                 ` Óscar Fuentes
2021-12-02 18:05                   ` Eli Zaretskii
2021-12-05  8:43                     ` Arthur Miller
2021-12-06  0:38             ` MSYS2 PATH problems with native compilation (was: msys2 build path problems + copy-paste english results in chinese characters) Óscar Fuentes
2021-12-06 14:32               ` Eli Zaretskii
2021-12-06 22:48                 ` MSYS2 PATH problems with native compilation Óscar Fuentes
2021-12-07 13:20                   ` Eli Zaretskii
2021-12-07 16:09                     ` Óscar Fuentes
2021-12-07 17:07                       ` Eli Zaretskii
2021-12-07 21:13                         ` Óscar Fuentes
2021-12-08 12:34                           ` Eli Zaretskii [this message]
2021-12-02  7:17         ` msys2 build path problems + copy-paste english results in chinese characters Eli Zaretskii
     [not found]           ` <AM9PR09MB4977B43C2FC19514E4385B5E966C9@AM9PR09MB4977.eurprd09.prod.outlook.com>
2021-12-05 10:17             ` Eli Zaretskii
2021-12-05 10:57               ` Arthur Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a6hbxol9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).