0

I installed emacs 29.1 through git for Windows SDK which installs a subset of MSYS2 with the package manager pacman.

pacman -S mingw-w64-x86_64-emacs

When I start this emacs up, it gives this message:

gnutls.c: [1] (Emacs) GnuTLS library not found

Most things work fine but it cannot communicate with package repositories (melpa, gnu, etc.). I think it doesn't matter but I do have installed GnuTLS in MSYS2.

Is this fixable or should I go with another emacs installation? (e.g., Windows installer for emacs)?

1 Answer 1

1

I had something similar happen when I followed these instructions to install the Git for Windows executables inside my MSYS2 installation. This works by adding the lines

[git-for-windows]
Server = https://wingit.blob.core.windows.net/x86-64

to /etc/pacman.conf, which appears to shadow the original MSYS2 GnuTLS library with one from Git for Windows. This happens in MSYS2's MINGW64 environment. Emacs installed in that environment can't find the GnuTLS library even after installing the libgnutls-devel package.

However, even after installing the Git for Windows executables in the MINGW64 environment, the UCRT64 environment is still pristine. Emacs installed into that environment doesn't produce the errors, and can contact the gnu, melpa, etc repositories just fine. My solution is to launch Emacs from the UCRT64 environment with runemacs, then work in the MINGW64 environment otherwise.

This may or may not help you, as I suspect the Git for Windows SDK comes with the MSYS and MINGW64 environments only. If you don't need the entire SDK, but just want to use the MSYS2 tools, following the instructions referenced above could meet your needs.

Incidentally, I've had a bit of trouble with the Emacs installation from GNU, here. Two or three times a day, at seemingly random times, it crashes. The MSYS2 Emacs hasn't crashed on me yet.

1
  • So there is some configuration in the UCRT64 environment that makes it work differently for emacs than MINGW64? Indeed I did install SDK for the real git but maybe that pacman configuration might help. Will look into it.
    – hatmatrix
    Dec 8, 2023 at 4:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.