From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bartosz Bubak Newsgroups: gmane.emacs.bugs Subject: bug#58318: 28.2; Emacs installed from package won't work with MinGW Date: Wed, 5 Oct 2022 18:01:00 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000079bd3205ea4baf1d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23124"; mail-complaints-to="usenet@ciao.gmane.io" To: 58318@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 05 22:37:37 2022 Return-path: Envelope-to: geb-bug-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 1ogB97-0005rS-6A for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Oct 2022 22:37:37 +0200 Original-Received: from localhost ([::1]:43040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogB95-0004fl-Sk for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Oct 2022 16:37:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogB5o-0002Ye-A4 for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 16:34:19 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogB5f-0002nK-Rr for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 16:34:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogB5f-00035s-MX for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 16:34:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bartosz Bubak Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Oct 2022 20:34:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58318 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166500199611796 (code B ref -1); Wed, 05 Oct 2022 20:34:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Oct 2022 20:33:16 +0000 Original-Received: from localhost ([127.0.0.1]:58195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogB4t-000345-Iq for submit@debbugs.gnu.org; Wed, 05 Oct 2022 16:33:16 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1og6pt-0004OI-Su for submit@debbugs.gnu.org; Wed, 05 Oct 2022 12:01:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og6ps-0008EK-WF for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 12:01:29 -0400 Original-Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]:44566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1og6pe-0007x5-65 for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 12:01:28 -0400 Original-Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-132b8f6f1b2so4792289fac.11 for ; Wed, 05 Oct 2022 09:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=oX9Apyq9vYMFCxDjYHO1cTWPk6tvTeHSugVW73M83r0=; b=lWKfz5e7Y7WXcnOzvGy/D+Hz+b+jIOZZcO8qVtvP/4RHaDU1z4VKAz3C4Zqpi4xLze s6ggK80GEh0CWNGzLclhygVwv0LpMzk/rzoVP4XmjLLqQrux4WprpfSk2+sNPgafsin1 fv6HsHHQBXZArYa0+K98ChMtVdJuOgvBTdoWmvCpcUk993AQ7EmT6pJC3wdPHTwUZGoJ Ui0ZeO0/cu7Ypvu5iqDRtvLT4HRm9vCT7rh+8bN4+7wXLStRS6tR9Urew1ukwiTL2qu1 J84TL0XxJnx0w5Gd5eUJWeZVgMoOyf3CGC4nbKwDV7eDO2v/gn2lnn9fJvheWLY9UIEC HJcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=oX9Apyq9vYMFCxDjYHO1cTWPk6tvTeHSugVW73M83r0=; b=MDJKPjQ+QJm4D+4cHldal+AHTCLVDWYn4iSJzpEuB/y7iVYCoVCuUtJwRr77wZzWor kIlFhwXA09rMFWsXQcKS2fmJ76pz0SjNj8loogjI3QI7W83Spoc8w5QhQspjeuKFL1/E v2dtgOp6ZHB2idT6EBx4g2rqWeGIm0ZwjYh+9NUCV82kZC465MmB0b/j83L7dEycv/0c /v20chj0bmw+QdP70A40gNTsHpJ+OER3pFbMAfGH2Fk9ijfMjI8Me+k+x8iGhyERi4CA oECo/lo2HH7lgcGSpa8wlUoGK+FEZSUfpaQ6fimVETvEdho5drlJ967qBx40BEKjSYK0 0ChA== X-Gm-Message-State: ACrzQf03wKRX6FMfQPPT1+4T4FCI54C+FAeEDDngWccKgUY1STz0ab3E kOcaFNVVJobdaLiSdwPfJfa0AI3Umj+Z9euwKBfG2Ld4isY= X-Google-Smtp-Source: AMsMyM4oU2jCiR+tcrLFFJjD9Ns+u5VIEPLpGlhppARvD2ZVek0WtZcm5qrpdqGSs+8FM4W+4y/9s7tRz2X5ua7iTps= X-Received: by 2002:a05:6870:e750:b0:132:9b8a:7b1e with SMTP id t16-20020a056870e75000b001329b8a7b1emr144002oak.67.1664985670989; Wed, 05 Oct 2022 09:01:10 -0700 (PDT) Received-SPF: pass client-ip=2001:4860:4864:20::2e; envelope-from=bartosz.bubak@gmail.com; helo=mail-oa1-x2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 05 Oct 2022 16:33:13 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244576 Archived-At: --00000000000079bd3205ea4baf1d Content-Type: text/plain; charset="UTF-8" When installing Emacs using the installer (emacs-28.2-installer.exe), by default it adds the compiler and libraries (gcc and libgccjit) to the ./bin directory without prompting the user for his opinion. The problem appears when another compiler is already installed in the system, eg. from MinGW. Emacs then tries to use the libraries from PATH instead of those installed in its subdirectories: 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 When I tried to find a solution to the problem, I found something like this: M-: (executable-find "gcc") RET "c:/ProgramData/chocolatey/bin/gcc.exe M-: (executable-find "as") RET "c:/ProgramData/chocolatey/bin/as.exe" etc, etc But should be: C:\Program Files\Emacs\emacs-28.2\bin\gcc.exe C:\Program Files\Emacs\emacs-28.2\bin\as.exe The only solution I have found so far is to uninstall the "global" MinGW, then emacs uses the embedded libraries and everything is fine. In GNU Emacs 28.2 (build 2, x86_64-w64-mingw32) of 2022-09-13 built on AVALON Windowing system distributor 'Microsoft Corp.', version 10.0.22000 System Description: Microsoft Windows 10 Pro (v10.0.2009.22000.978) Configured using: 'configure --with-modules --without-dbus --with-native-compilation --without-compress-install CFLAGS=-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM ZLIB (NATIVE_COMP present but libgccjit not available) Important settings: value of $LANG: PLK locale-coding-system: cp1250 Major mode: Org Minor modes in effect: override-global-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail org-mobile ffap tmm diary-lib diary-loaddefs cal-iso face-remap org-agenda org-refile org-clock mule-util cal-move org-element avl-tree generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message rfc822 mml mml-sec epa derived mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi dired-aux dired dired-loaddefs which-key lsp-pyright lsp-mode comp comp-cstr warnings lsp-protocol yasnippet xref project tree-widget wid-edit spinner pcase network-stream puny nsm rmc markdown-mode color thingatpt lv inline imenu ht filenotify f f-shortdoc shortdoc s ewoc epg rfc6068 epg-config dash compile text-property-search org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint ansi-color ring org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 time-date ol rx org-keys oc org-compat advice org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs command-log-mode cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core finder-inf edmacro kmacro wombat-theme info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 497677 139781) (symbols 48 38406 9) (strings 32 164117 43025) (string-bytes 1 4805171) (vectors 16 75523) (vector-slots 8 1608377 199020) (floats 8 434 411) (intervals 56 3060 1085) (buffers 992 27)) --00000000000079bd3205ea4baf1d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When installing Emacs using the inst= aller (emacs-28.2-installer.exe),
by default it adds the comp= iler and libraries (gcc and libgccjit)
to the ./bin directory wit= hout prompting the user for his opinion.

The probl= em appears when another compiler is already installed in the
syst= em, eg. from MinGW. Emacs then tries to use the libraries from PATH
instead of those installed in its subdirectories:

Warning (comp): c: /tools/emacs/share/emacs/28.2/lisp/org/org-entities.e= l:
Error: Internal native compiler error failed to compile
<= div>Warning (comp): C: \\ ProgramData \\ chocolatey \\ lib \\ mingw \\ tool= s \\
install \\ mingw64 \\ bin \\ libgccjit-0.dll: error: error i= nvoking gcc
driver

When I tried to find = a solution to the problem, I found something like
this:

M-: (executable-find "gcc") RET
"c= :/ProgramData/chocolatey/bin/gcc.exe
M-: (executable-find "a= s") RET
"c:/ProgramData/chocolatey/bin/as.exe"
etc, etc

But=C2=A0 should be:
C:\= Program Files\Emacs\emacs-28.2\bin\gcc.exe
C:\Program Files\Emacs= \emacs-28.2\bin\as.exe

The only solution I have fo= und so far is to uninstall the "global"
MinGW, then ema= cs uses the embedded libraries and everything is fine.

=

In GNU Emacs 28.2 (build 2, x86_64-w64-mingw32)
=C2=A0of 2022-09-13 built on AVALON
Windowing system distribut= or 'Microsoft Corp.', version 10.0.22000
System Descripti= on: Microsoft Windows 10 Pro (v10.0.2009.22000.978)

Configured using:
=C2=A0'configure --with-modules --without= -dbus --with-native-compilation
=C2=A0--without-compress-install = CFLAGS=3D-O2'

Configured features:
A= CL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_B= ARS
XPM ZLIB

(NATIVE_COMP present but li= bgccjit not available)

Important settings:
=C2=A0 value of $LANG: PLK
=C2=A0 locale-coding-system: cp1250=

Major mode: Org

Minor mo= des in effect:
=C2=A0 override-global-mode: t
=C2=A0 gl= obal-eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 ele= ctric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 = file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
= =C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: = t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode= : t

Load-path shadows:
None found.
=

Features:
(shadow sort mail-extr emacsbug sen= dmail org-mobile ffap tmm diary-lib
diary-loaddefs cal-iso face-r= emap org-agenda org-refile org-clock
mule-util cal-move org-eleme= nt avl-tree generator ol-eww eww xdg
url-queue mm-url ol-rmail ol= -mhe ol-irc ol-info ol-gnus nnselect
gnus-search eieio-opt speedb= ar ezimage dframe gnus-art mm-uu mml2015
mm-view mml-smime smime = dig gnus-sum shr kinsoku svg dom gnus-group
gnus-undo gnus-start = gnus-dbus dbus xml gnus-cloud nnimap nnmail
mail-source utf7 netr= c nnoo parse-time gnus-spec gnus-int gnus-range
message rfc822 mm= l mml-sec epa derived mm-decode mm-bodies mm-encode
mail-parse rf= c2231 mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus= -util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
mail-utils = mm-util mail-prsvr ol-docview doc-view jka-compr image-mode
exif = ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi dired-aux dired
dire= d-loaddefs which-key lsp-pyright lsp-mode comp comp-cstr warnings
lsp-protocol yasnippet xref project tree-widget wid-edit spinner pcase
network-stream puny nsm rmc markdown-mode color thingatpt lv inline<= /div>
imenu ht filenotify f f-shortdoc shortdoc s ewoc epg rfc6068 epg-= config
dash compile text-property-search org ob ob-tangle ob-ref = ob-lob
ob-table ob-exp org-macro org-footnote org-src ob-comint o= rg-pcomplete
pcomplete comint ansi-color ring org-list org-faces = org-entities
noutline outline org-version ob-emacs-lisp ob-core o= b-eval org-table
oc-basic bibtex iso8601 time-date ol rx org-keys= oc org-compat advice
org-macs org-loaddefs format-spec find-func= cal-menu calendar
cal-loaddefs command-log-mode cl-extra help-mo= de use-package
use-package-ensure use-package-delight use-package= -diminish
use-package-bind-key bind-key easy-mmode use-package-co= re finder-inf
edmacro kmacro wombat-theme info package browse-url= url url-proxy
url-privacy url-expand url-methods url-history url= -cookie url-domsuf
url-util mailcap url-handlers url-parse auth-s= ource cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cac= he json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile= cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric= uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel d= os-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/comm= on-win tool-bar dnd fontset image
regexp-opt fringe tabulated-lis= t replace newcomment text-mode lisp-mode
prog-mode register page = tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll= -bar mouse jit-lock font-lock syntax font-core
term/tty-colors fr= ame minibuffer cl-generic cham georgian utf-8-lang
misc-lang viet= namese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932= hebrew greek romanian slovak czech european ethiopic indian
cyri= llic chinese composite emoji-zwj charscript charprop case-table
e= pa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
=
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads w32notify w32 lcms2 mul= ti-tty
make-network-process native-compile emacs)

<= /div>
Memory information:
((conses 16 497677 139781)
=C2=A0(symbols 48 38406 9)
=C2=A0(strings 32 164117 43025)
=C2=A0(string-bytes 1 4805171)
=C2=A0(vectors 16 75523)
=C2=A0(vector-slots 8 1608377 199020)
=C2=A0(floats 8 434 = 411)
=C2=A0(intervals 56 3060 1085)
=C2=A0(buffers 992 = 27))

--00000000000079bd3205ea4baf1d--