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 08:51:29 +0300 Message-ID: <83sfkahgny.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18792"; 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 07:53:15 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 1odmTz-0004lA-E7 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 07:53:15 +0200 Original-Received: from localhost ([::1]:42606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odmTx-0004lR-UD for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 01:53:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odmSV-0004jN-BE for help-gnu-emacs@gnu.org; Thu, 29 Sep 2022 01:51:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37072) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odmSV-00089u-3o for help-gnu-emacs@gnu.org; Thu, 29 Sep 2022 01:51:43 -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=ZZDgz01ryR+3xy3m5Fb00WOXwdCDX4ZW+4Gwy6vkjx0=; b=pXxePaWvq5/M eJRc0wbGwFg61s5FBecN2c1RmaY5v7F/HsIiVRVBlUisup9oPiqbD+MQJkh0MKo+cnsBOaiQ+uuMP /su4GXk6sm5kuA0ACuRC49MPtwYW2HRcsuB5/lSKHwdhAGtqFRYLHj7vUBugHfmpxP5BTjHxyy5mS IhSYFxCpBkbfG+vUlW8ZrQUs+0Iw7vB1wn+TkZrPqZBbad30g1XDEltY8wDO6Esvhcg8A/DWMt5hj Fsl3H5A96lQbJANbuK3CtcvkoPfUSN5ue2UIP9bemlKM1ji/5/luHnresUkr5IuL7CYWW/egPx/rH qsjoCPf5IYa0hiWgXH3t1Q==; Original-Received: from [87.69.77.57] (port=4389 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 1odmSK-0005N2-5Y for help-gnu-emacs@gnu.org; Thu, 29 Sep 2022 01:51:38 -0400 In-Reply-To: (message from Bartosz Bubak on Wed, 28 Sep 2022 22:22:19 +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:139675 Archived-At: > From: Bartosz Bubak > Date: Wed, 28 Sep 2022 22:22:19 +0200 > > I am just starting my adventure with emacs, and I have already encountered > a rather unusual problem. As a beginner, I chose the easier option and > installed everything from the package (emacs-28.2-installer.exe). After > starting the editor, it turned out that the logs contain a lot of warnings > (errors?) caused by using the wrong compiler. I mean, emacs uses the > "global" gcc (along with the libraries) which I have in the PATH > environment variable, instead of which it has in the embedded package (the > /bin subdirectory). Interestingly, I have libgccjit-0.dll in the global > directory, but it doesn't seem to work properly. > > Warning (comp): c: /tools/emacs/share/emacs/28.2/lisp/org/org-entities.el: > Error: Internal native compiler error failed to compile > Warning (comp): C: \\ ProgramData \\ chocolatey \\ lib \\ mingw \\ tools \\ > install \\ mingw64 \\ bin \\ libgccjit-0.dll: error: error invoking gcc > driver > > Is it possible to somehow configure emacs to only use embedded libraries? Didn't you ask the same question on Reddit? I answered there that you need to tweak your PATH so that the "right" GCC and Binutils are found first when Emacs wants to native-compile some file. Type M-: (executable-find "gcc") RET M-: (executable-find "as") RET will tell you where Emacs find GCC and the Binutils it needs to invoke. > So far, the only workaround I have found is uninstalling the entire MinGW > or removing it from the system PATH. After MinGW is removed, everything > works fine as emacs and all the add-ons I downloaded. Btw, why do you at all have 2 GCC installations on your system? That is highly unusual, and requires a lot of careful setup to work without problems. I'm guessing that only one of these installations includes libgccjit DLL, is that right?