From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MSYS2 PATH problems with native compilation Date: Wed, 08 Dec 2021 14:34:10 +0200 Message-ID: <83a6hbxol9.fsf@gnu.org> References: <83a6hks26v.fsf@gnu.org> <83pmqgqi6e.fsf@gnu.org> <87czmghqui.fsf@telefonica.net> <834k7rqxru.fsf@gnu.org> <87a6hebma1.fsf_-_@telefonica.net> <83lf0x248u.fsf@gnu.org> <875ys1bb9f.fsf@telefonica.net> <83mtlczh4m.fsf@gnu.org> <87ilw09z1y.fsf@telefonica.net> <83wnkgxs19.fsf@gnu.org> <87ee6o9l0a.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32942"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?iso-8859-1?Q?=D3scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 08 13:37:20 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muwCF-0008Ne-GY for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 13:37:19 +0100 Original-Received: from localhost ([::1]:56172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muwCE-0005WQ-At for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 07:37:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muw9W-00024z-LQ for emacs-devel@gnu.org; Wed, 08 Dec 2021 07:34:32 -0500 Original-Received: from [2001:470:142:3::e] (port=55484 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muw9V-0006MQ-Lq; Wed, 08 Dec 2021 07:34:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=h3dsxriFiUS0SW8HyZC4IDDWKJxBJwbBKEt/I1JzzWw=; b=KvfTELlx4UQpYXtHFkBz b4tymEdP0BJeX7hRcEPybS80INhN70BnBPjFQUa65s07R1KMx+FQpkOlJWLdFOKDwBCVtXy3WvDTD 7yKUCtY8lwnpAiVXh1zwccdEeeOM2djldvdtUYwxESewrBSAMH75spkS6IUu+nOnU80m5Boil3PzQ FJEGwyHMqOZcHN3Wpig4Ituj9oGnYJtwfH1wud/d/bumpwSre5k9seW921WT7FcR2MrrmoouWtN6S ayDkwlS1FzojKJZDI9pZyxZbG8dU3swZ+1uR7j6tstRP4WHxJMgMsV60ieWFnP+Jn3qYHShjiD5zU FMP+4572DPd8Rw==; Original-Received: from [87.69.77.57] (port=3429 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muw9U-0008J0-Oy; Wed, 08 Dec 2021 07:34:29 -0500 In-Reply-To: <87ee6o9l0a.fsf@telefonica.net> (message from =?iso-8859-1?Q?=D3scar?= Fuentes on Tue, 07 Dec 2021 22:13:09 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281339 Archived-At: > From: Óscar Fuentes > 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.