To use native compilation, you need to make sure that the gcc toolchain that is compatible with the build of Emacs you are running is first in the PATH that Emacs sees. It took me a lot of PATH reordering, and occasional repeated reordering after system updates mess it up again, to get this working.
On Tue, 4 Feb 2025 at 09:26, Bo Johansson <bo.johans...@brosarp.nu> wrote: > > Hej! > I have updated my MSYS. I am using Windows 11. > > $ uname -a gives: MSYS_NT-10.0-26100 BOS3 3.5.7-2644508f.x86_64 2025-01-30 > 09:08 UTC x86_64 Msys > > The emacs was also updated. The new version is: GNU Emacs 29.4 (build 1, > x86_64-w64-mingw32) of 2025-02-01 > > I have now got a lot of "Warning (comp): collect2.exe: error: ld returned 1 > exit status, ... . > > By adding (setq native-comp-async-report-warnings-errors 'silent) to my > ~/.emacs.d/init.el file, I have stopped the buffer with the warnings to > pop-up. > > Attached to this mail is the content of the *Async-native-compile-log* buffer > after the start of my emacs. > > Do I have a problem in my system? Can I do something to correct it? > > Best regards > Bo Johansson