19

I just upgraded Emacs on my Windows 10 machine from 24.5 to 25.1. For Emacs 24.5 I had GnuTLS correctly setup and for 25.1 I did what I thought I remembered I did:

  1. Got prebuilt Emacs binaries from the GNU Emacs website's download page. I'm using 32 bit Windows, so I got the i686 version of Emacs.

  2. Got a copy of GnuTLS from ezwinports and extracted the zip file to the same directory as Emacs --the way the gnutls zip is organized means that this way both the dll's and the exe's for gnutls wind up in the same directory as the Emacs exe's. (I got version 3.3.11 this time; I don't remember what version of GnuTLS I had when I had version 24.5 of Emacs.)

That didn't work this time. gnutls-available-p returns nil, the package manager is only able to connect to http repositories and not https ones, eww can't handle https either.

How do I setup GnuTLS for Emacs 25.1? Am I misremembering what I did for 24.5? Maybe the binaries from the GNU Emacs website are compiled without GnuTLS and for 24.5 I actually got binaries from somewhere else...

  • I deleted my original answer, since it didn't address your Emacs version. In your question, you could maybe clarify that you copied the files into ./bin – henning Sep 21 '16 at 7:29
  • @henning: That's what the sentence "the way the gnutls zip is organized means that this way both the dll's and the exe's for gnutls wind up in the same directory as the Emacs exe's" was meant to convey, I'll try to reword it in a clearer way tomorrow. – Omar Sep 21 '16 at 8:50
  • It looks more like a problem on the Emacs 25.1 rather than the gnutls itself because today I've downloaded Emacs 25.1 and got the same problem. Emacs 24.1 calls gnutls with the options: --insecure -p 443 --protocols ssl3 whereas 25.1 calls it with: -x509cafile nil -p 443. It might have something to do with these different calling options. – Romario Sep 21 '16 at 15:49
  • 2
    I don't have the details to hand, but I briefly looked into this earlier. I think Emacs 25.1 is expecting libgnutls-30.dll but only libgnutls-28.dll is packaged by ezwinports at the moment. – Stuart Hickinbottom Sep 21 '16 at 17:09
29

@StuartHickinbottom explained what I was doing wrong: using libgnutls-28.dll when Emacs 25.1 requires the newer and incompatible libgnutls-30.dll. Then it was a matter of finding binaries of libgnutls-30.dll and other required libraries. Thankfully Phillip Lord has compiled Windows versions of all the GnuTLS libraries and dependencies and many other libraries you might want for Emacs! They are available here: get emacs-25-i686-deps.zip if you use 32-bit Windows and get emacs-25-x86_64-deps.zip if you use 64-bit; then unzip in the root folder of your Emacs installation (so that the bin folder of the zip files gets decompressed into the bin folder of your Emacs installation, etc.)

EDIT: I figured out how to find out which version of a library Emacs is expecting: look in the variable dynamic-library-alist.

  • 1
    Thanks for the edit -- I never knew about that variable but it makes tracking down this type of thing much easier. – Stuart Hickinbottom Sep 22 '16 at 8:25
  • Actually, I didn't compile the binaries, just zipped them. They should all work. And I need to improve the README. It's too complicated. – Phil Lord Dec 4 '16 at 14:08
  • Then I guess I meant "compiled" in the non-computer sense of put together a list of things from various sources, @PhilLord :) – Omar Dec 4 '16 at 17:27
  • confirmed to work for for Emacs 25.2 – Lorenzo Gatti May 10 '17 at 20:17
  • 1
    @feklee For Emacs-26, just unpack the zip and away you go -- at least that is the theory. Yeah, agreed, README needs updating. There isn't one at the moment. Me being rubbish. – Phil Lord Jan 20 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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