help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs uses "global" compiler instead of embedded


From: Eli Zaretskii
Subject: Re: Emacs uses "global" compiler instead of embedded
Date: Thu, 29 Sep 2022 08:51:29 +0300

> From: Bartosz Bubak <bartosz.bubak@gmail.com>
> 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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]