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.help Subject: Re: Emacs uses "global" compiler instead of embedded Date: Thu, 29 Sep 2022 19:34:39 +0300 Message-ID: <83h70qf8bk.fsf@gnu.org> References: <83ill6hfa5.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28929"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 29 20:19:33 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1ody8C-0007Q1-CV for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 20:19:32 +0200 Original-Received: from localhost ([::1]:33368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ody8A-00056s-UR for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 14:19:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odwUu-00006r-9P for help-gnu-emacs@gnu.org; Thu, 29 Sep 2022 12:34:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odwUs-0003eM-IV for help-gnu-emacs@gnu.org; Thu, 29 Sep 2022 12:34:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ag+GdJeZW8nc0k7zzREYyxeGQscnSlk7TjSaO/RKE6g=; b=BMrLcl84GAOt e1xgolC7B3hrck5d4Sa7IVeL+A8OrnBjPQ5mj5iq6V+VcRlSNwWg5Z/MDTQTsk4AU3A2pmLSsgAaB isGocybHYhUFRMW918odn6vlIzeiX1JS24ED1tKxx+A5AssnedqlZv2OY1XCpwzWIT4viJjxCSoZM draw1FYo/ULc0EfZdZWxpRX2onINyCh1AgrFSC/HVmSrEJeH+0xp36kqW+GAafS+DyR/i81QhlysX 8JDqZXKi/s5SUCA64c6wXg6SfTr873uOcR+0VXP1IX7+DXamQp4oKjlw38/WSxX0/dlTC5OZrFCQq x2q7RttBRgQARzGorGK54A==; Original-Received: from [87.69.77.57] (port=4392 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 1odwUr-0003SU-Vi for help-gnu-emacs@gnu.org; Thu, 29 Sep 2022 12:34:50 -0400 In-Reply-To: (message from Bartosz Bubak on Thu, 29 Sep 2022 18:12:53 +0200) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139681 Archived-At: > From: Bartosz Bubak > Date: Thu, 29 Sep 2022 18:12:53 +0200 > Cc: help-gnu-emacs@gnu.org > > > M-: (executable-find "gcc") RET > "c:/ProgramData/chocolatey/bin/gcc.exe > > M-: (executable-find "as") RET > "c:/ProgramData/chocolatey/bin/as.exe" > > This is problem, it should be: > C:\Program Files\Emacs\emacs-28.2\bin\gcc.exe > C:\Program Files\Emacs\emacs-28.2\bin\as.exe > > On the other hand, I don't want all the rest of the tools in the system to > use this installation, so changing global PATH is pointless. > > That's what I'm explaining from the beginning, I have only one MinGW > instance, in chocolatey. > The second is installed and configured automatically by the emacs installer > and that is what emacs should use. > Not my "main" in the system. Didn't you say that if you remove the GCC installation in C:\Program Files\Emacs\emacs-28.2\, everything starts working? > In my opinion, the problem is that emacs does not consider local folders > when it looks for the compiler. It doesn't, and it shouldn't. > Should look in: > 1) Local directories, > if not found > 2) Global system configuration > And it does the opposite, only when gcc is missing in global configuration > it uses local. AFAIU, it isn't Emacs that looks for GCC, it's libgccjit DLL. So maybe just removing libgccjit DLL that came with Emacs will solve your problem.