1.3.1 cross compile error

venona at gmx.ch venona at gmx.ch
Sun Mar 23 07:21:02 CET 2003


On Sat, 22 Mar 2003 10:50:10 +0200, "Greg Kempe" <surprisinglysore at ananzi.co.za> wrote:

> What sort of setup are you using to cross compile GPG? Any tips for
> doing it?

I installed Debian Potato on my laptop PC and the following deb packages from
the installation CD: binutils, bison, flex, gawk, gcc2.95, patch, make, m4.

The deb packages in CD of the following softwares: autoconf, automake, zlib
were older than required, so I obtained their source code and installed "manually"
(./configure => make => make install). Autogen.sh says that it requires 2.52 or
newer of autoconf and 1.6 or newer of automake. The version of the deb package in CD
of zlib is 1.1.3, which has security hole. So I used the source of 1.1.4,
or you may use the option --with-included-zlib in autogen.sh.

The installation CD automatically installed gettext 0.10.35 from the deb package.
But autogen.sh requires 0.10.38 or newer, so I obtained the deb package of 0.10.40
from http://packages.debian.org/stable/devel/ and installed it. When I deleted
0.10.35 and installed 0.10.40 from the source, the system did not recognize
the latter, so I installed it from deb package.

Then I obtained the following files and unpacked them in the same directory
(I chose /usr/src/).
ftp://ftp.gnupg.org/people/werner/cpd/binutils-2.9.1.tar.gz
ftp://ftp.gnupg.org/people/werner/cpd/gcc-core-2.95.2.tar.gz
ftp://ftp.gnupg.org/people/werner/cpd/mingw32-cpd-0.3.1.tar.gz

I ran ./Configure (the letter C is capital) => make => make install in mingw32-cpd-
0.3.1 directory with default setting. The configure script asked the destination
directory of mingw32 and the directory of source files of binutils and gcc.
I only hit ENTER at each question.

The installation of mingw32 ended successfully. When I typed "mingw32 --version"
in the window of xterm, it showed "0.3.1".

Then I unpacked gnupg-1.3.1.tar.gz and moved to gnupg-1.3.1 directory.
When I did not set the option --disable-regex in autogen.sh, "make" failed
when precessing regcomp.c.

When I set --disable-regex AND modified the 1365th line of trustdb.c from
#ifdef DISABLE_REGEXP to #ifdef DISABLE_REGEX (the last letter P being
deleted), I could build gpg.exe successfully. I set the option in the 71th line
of autogen.sh.

When I did not modify trustdb.c, "make" failed while processing this file.

David Show says that #ifdef DISABLE_REGEXP of trustdb.c is a typo
(see http://lists.gnupg.org/pipermail/gnupg-devel/2003-March/013496.html).

After "make" ended I ran "mingw32 strip g10/gpg.exe" to remove symbols.
It reduced the size of gpg.exe considerably (2MB => 600KB).

Other executables gpgv.exe and gpgsplit.exe were generated in g10 directory and
tools directory respectively. I ran "mingw32 strip" for these 2 files also.

But I still cannot build gpgkeys_hkp.exe for unknown reason :-)

I hope this helps you.





More information about the Gnupg-devel mailing list