Building 1.3.92 (and maybe 1.4.0) for Win32

Carlo Luciano Bianco clbianco at tiscalinet.it
Thu Nov 18 20:08:02 CET 2004


Zuxy <zuxy.meng at gmail.com> wrote:

Well. first of all thanks a lot for the reply and for your help!

> vasprintf is defined for Win32 in util\strgutil.c. Did you
> accidentally modify the #ifdef _WIN32 and #endif pair around its
> definition?

No, the only modifications I did are the three described on my page
(enabling gettext, LDAP, and fixing paths) and are all in the "configure"
script only. 

When I build the "legacy" way (i.e. with the included simple-gettext)
everything goes right. But if I modify configure to link with the external
gettext and libiconv, I get the error. 

"configure" finds both gettext and libiconv without problems, BTW...

Now I tried also to check the libutil.a:

------------------------------------------------
$ strings -a util/libutil.a | grep "vas"
_libintl_vasprintf
_libintl_vasprintf
vasprintf() failed
_vasprintf
------------------------------------------------

So it seems that the vasprintf function has been correctly compiled in the
library... Can this be a gcc problem not finding it when linking? And what
is _libintl_vasprintf? Should it be used instead of plain _vasprintf? 

> Now there are too many possible combinations of compiler/shell/library
> when you port gnupg to Win32.

Yes, I agree... There are even four different ports of libiconv with
different names.... 

> I myself currently use
> MSYS+MinGW+zlib+libbzip2+libiconv+libgw32c to build gpg under Windows

I use the same + gettext, but not libgw32c... It was not required up to
1.2.6, beside for the dlopen() funcion... Or am I missing something? 

> (all libs statically linked except libiconv), but people can also
> build it natively with just MSYS+MinGW, or cross-build it with
> MinGW-CPD. For the developers of GnuPG, it might be best to avoid any
> unnecessary asumption of the building enviroments other than Linux. I
> guess that's why they include zlib and simplified regex and gettext
> within the package.

I fully agree, that's why I try to set up a MinGW environment as much
"standard and clean" as possible. If this is possible, then maybe many
"#ifdef _WIN32" could be removed from GnuPG souce code, simplifying very
much the developers' work! I do not want to ask them to make more
assumptions on the building environments, but to make less! ;-) 

-- 
| Carlo Luciano Bianco | ICQ UIN: 109517158                              |
|______________________| Home page: <http://web.tiscali.it/clbianco/>    |
|GPG DSA/ElG 1024/4096:|_________________________________________________|
|KeyID:0x5324A0DA - Fingerprint:8B00C61034120506111B143DEDBF71B45324A0DA |




More information about the Gnupg-devel mailing list