all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Bartosz Bubak <bartosz.bubak@gmail.com>, Corwin Brust <corwin@bru.st>
Cc: 58318@debbugs.gnu.org
Subject: bug#58318: 28.2; Emacs installed from package won't work with MinGW
Date: Thu, 06 Oct 2022 08:44:41 +0300	[thread overview]
Message-ID: <835ygxsdyu.fsf@gnu.org> (raw)
In-Reply-To: <CAFH7cOoWpRiPb3QWSpdvm3gTMWAVO=mN8DgrxVVjZJewrXqReg@mail.gmail.com> (message from Bartosz Bubak on Wed, 5 Oct 2022 18:01:00 +0200)

> From: Bartosz Bubak <bartosz.bubak@gmail.com>
> Date: Wed, 5 Oct 2022 18:01:00 +0200
> 
> 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

Corwin, are you reading this?

I admit I don't have a clear idea of why the problem happens.  Is the
libgccjit and/or GCC and/or Binutils distributed by chocolatey somehow
incompatible with the ones you include in the installer?  Because if
they are compatible, just removing the GCC/Binutils stuff bundled with
the Emacs installer should have solved the issue (and then providing
an option in the installer not to install the bundled GCC would be a
way towards solving this).  And yet the OP seems to say (AFAIU) that
this didn't help, and only uninstalling the chocolatey GCC/Binutils
did.  We cannot possibly ask users to uninstall their existing
development environment when installing Emacs.

I think someone should try installing the chocolatey distribution and
see whether the binaries from the GNU FTP site can work with its
libgccjit.  Because I'm not sure I understand what happens in this
case, even though I asked several times.  If indeed there's
incompatibility, I'd be interested to know why (I have no idea how
chocolatey builds its GCC).  If that is not solvable, we should
probably say that people with chocolatey installation should not
install Emacs binaries with native-compilation enabled.





  reply	other threads:[~2022-10-06  5:44 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 16:01 bug#58318: 28.2; Emacs installed from package won't work with MinGW Bartosz Bubak
2022-10-06  5:44 ` Eli Zaretskii [this message]
2022-10-06 13:09   ` Corwin Brust
2022-10-06 13:30     ` Lars Ingebrigtsen
2022-10-06 14:43       ` Eli Zaretskii
2022-10-07 11:42         ` Lars Ingebrigtsen
2022-10-07 11:59           ` Eli Zaretskii
2022-10-07 12:04             ` Lars Ingebrigtsen
2022-10-07 12:12               ` Eli Zaretskii
2022-10-07 12:28                 ` Lars Ingebrigtsen
2022-10-07 12:35                 ` Andrea Corallo
2022-10-07 12:43                   ` Lars Ingebrigtsen
2022-10-07 12:54                   ` Eli Zaretskii
2022-10-07 13:02                     ` Lars Ingebrigtsen
2022-10-07 13:44                       ` Eli Zaretskii
2022-10-07 13:47                         ` Lars Ingebrigtsen
2022-10-07 13:04                     ` Andrea Corallo
2022-10-07 13:48                       ` Eli Zaretskii
2022-10-07 13:54                         ` Andrea Corallo
2022-10-07 14:03                           ` Eli Zaretskii
2022-10-07 14:35                             ` Andrea Corallo
2022-10-07 15:27                               ` Eli Zaretskii
2022-10-07 15:34                                 ` Corwin Brust
2022-10-07 15:43                                   ` Eli Zaretskii
2022-10-07 15:47                                     ` Corwin Brust
2022-10-07 19:11                                       ` Eli Zaretskii
2022-10-07 17:15                                     ` Andrea Corallo
2022-10-07 19:15                                       ` Eli Zaretskii
2022-10-07 15:49                                 ` Andrea Corallo
2022-10-07 15:52                               ` Corwin Brust
2022-10-07 19:14                                 ` Eli Zaretskii
2022-10-08 12:56                                   ` Lars Ingebrigtsen
2022-10-08 13:03                                     ` Eli Zaretskii
2022-10-08 13:10                                       ` Lars Ingebrigtsen
2022-10-08 14:28                                         ` Eli Zaretskii
2022-10-08 13:28                                   ` Andrea Corallo
2022-10-11 19:23                                     ` Andrea Corallo
2022-10-11 19:29                                       ` Eli Zaretskii
2022-10-11 20:45                                         ` Andrea Corallo
2022-10-12  5:21                                           ` Eli Zaretskii
2022-10-12  8:14                                             ` Andrea Corallo
2022-10-12 12:50                                               ` Eli Zaretskii
2022-10-12 14:55                                                 ` Andrea Corallo
2022-10-12 15:35                                                   ` Eli Zaretskii
2022-10-13 13:26                                                     ` Andrea Corallo
2022-10-06 14:41     ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=835ygxsdyu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=58318@debbugs.gnu.org \
    --cc=bartosz.bubak@gmail.com \
    --cc=corwin@bru.st \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.