Compiling GnuPG 1.4.5 for Windows on Windows

Carlo Luciano Bianco clbianco at tiscalinet.it
Thu Sep 7 00:19:14 CEST 2006


Il /06 set 2006/, *John Clizbe* ha scritto:

> C Yohman wrote:
>> How do I do this?
> 
> Not exactly a GnuPG-Users level question, Unless you have a
> specific requirement to build your own binaries, you will find it
> much easier sticking to the prebuilt installer.

I absolutely agree on this point.

[...]
> First thing you need is a build environment.
> 
> 1) Go to the MinGW project at Sourceforge. Install the following
> packages at a minimum:
>      a) gcc-core-3.4.5-20060117-1.tar.gz
>      b) binutils-2.17.50-20060824-1.tar.gz
>      c) mingw-runtime-3.10.tar.gz
>      d) w32api-3.7.tar.gz
>      e) mingw-utils-0.3.tar.gz
> 
>      The current version numbers may differ from those above

Note: mingw-runtime-3.10 will not work (i.e. GnuPG will not build at 
all), unless you apply a small patch to random.c. You have to rename 
"times.h" into "time.h" in line 49 (see point 4.3 of my tutorial and 
also the message by Joe Vender on gnupg-devel mailing list:

<http://lists.gnupg.org/pipermail/gnupg-devel/2006-June/022975.html>

If you do not want to patch the source files, you must use MinGW 
Runtime 3.9... :-/

... until a couple of "ifdef"s will be added to random.c in the 
official source tarball. ;-)

[...]
> 3) Now head to the GnuWin32 project (also at SourceForge).
> Download and install into the MinGW root:
>      a) bzip2-1.0.3-1-bin.zip
>      b) bzip2-1.0.3-1-lib.zip
>      c) gettext-0.14.4-bin.zip
>      d) gettext-0.14.4-dep.zip
>      e) gettext-0.14.4-lib.zip
>      f) libiconv-1.9.2-1-bin.zip
>      g) libiconv-1.9.2-1-lib.zip
>      h) readline-5.0-bin.zip
>      i) readline-5.0-lib.zip
>      j) zlib-1.2.3-bin.zip
>      k) zlib-1.2.3-lib.zip
> 
>      The current version numbers may differ from those above.
>      Alternatively, you could download the source and build these
>      yourself using your just installed MinGW/MSYS software.

It is better to avoid readline, because it may give problems. That's 
why I took it away completely from the new versions of my tutorial.

By the way, not all libraries are required. If you are performing a 
"minimal" build (like in this case) and you are interested to English 
language only, only bzip2 is really required.

> 4) Goto http://curl.haxx.se/download.html and download and install
> the current curl (7.15.4) IIRC. Can't help with the exact file to
> download as I built (openssl and) curl myself

I have built openssl myself too, and I just realized (thanks to Joe 
Vender for pointing this out to me) that things goes a bit different 
for those who downloaded the pre-built openssl libraries... :-/

I will have to heavily rewrite the curl-relevant part of the tutorial 
(i.e. point 3.4). Anyway, I hope libcurl is still optional for 
keyserver helpers, isn't it?

> You may find detailed step-by-step instructions at Carlo Bianco's
> "Building GnuPG for Win32 using MinGW" page, but he takes extra
> steps that IMO are unnecessary.

Do you mean in the "Minimal" build or in the "Complete" one?

> The only one I've ever used is patching the one
> test under make check.

Which is actually the only one "extra" step in the minimal build... ;-)

... and which I hope someday will be included in the official tarball, 
allowing me to remove 2 images from my tutorial! ;-))

-- 
                      |  ICQ UIN: 109517158
 Carlo Luciano Bianco |  Home page: <http://clbianco.altervista.org/>
______________________|________________________________________________
GnuPG RSAv4 4096 - Fingerprint:FA68CF697EA63865AAFA805F68703AD40609D743




More information about the Gnupg-users mailing list