Some MinGW/MSYS building observations for GnuPG 1.4.0

Joe Vender jvender at owensboro.net
Sat Dec 18 12:49:51 CET 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

For those who are trying to build GnuPG 1.4.0 using MinGW/MSYS
as per instructions provided at

http://clbianco.altervista.org/gnupg/eng/gnupg.html

and running into make failure with a message about "undefined
reference to vasprintf", here's what I've found.

The MinGW/MSYS Windows port of gettext-0.14.1-lib.zip contains a
version of libintl.h which includes a bunch of redefinitions for
the *printf functions

Basically,

#undef vasprintf
#define vasprintf libintl_vasprintf
extern int vasprintf (char **, const char *, va_list);

and something similar for a bunch of other *printf functions.

These redefinitions aren't present in the
libintl-0.11.5-2-lib.zip version of libintl.h, but since the
gettext-0.14.1-lib.zip version of libintl.h is newer than the
libintl-0.11.5-2-lib.zip version, during the build system setup,
the gettext verion overwrites the libintl version when setting
up the build system as per Carlo's instructions.

On my Windows98 machine, the libintl.h header file is found in
"C:\MinGW\include"

Under MinGW/MSYS on Windows (for me at least on Windows98 and
the build system as described on Carlo's page), if these *printf
redefinitions in libintl.h are commented out before doing a
"./configure && make" on GnuPG 1.4.0, not only does this solve
the error messages, "undefined reference to vasprintf", which
result in failure of "make", but it also solves all of the
warning messages which I was getting, "warning: libintl_printf
is an unrecognized format function".


Of course, commenting this code out isn't the proper way to
handle this, since this will impact the gettext stuff somewhere.
I'm not suggesting this course of action for anyone to build a
set of binaries to be trusted. Suggestions would be helpful.
Perhaps an

#ifdef vasprintf
   #undef vasprintf
#endif

code block before the vasprintf function declaration in
strgutil.c? Something similar for the printf function? Thanks.
I'm not a programmer, just tinkering and learning.

Regards,
Joe Vender

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32) - GPGshell v3.30

iQEVAwUBQcQYnibIfMqPbtHmAQgWHgf+NVCDJ5fpe34s+MElbH2YrF/gibBi9sfp
+WpBysz7aRXz3rt4c8K7ZhO6WpB5euNOsrfk4gzL1ukHjEnanQ1CLp0jVNxD9njI
QrtYo0d0ukjMs9mbVicsC6sRF3611E6W6d5PNCQXsZkCtQ7MOCMhdnRn6CAVppsz
16snw5WKVEjpWRVjw2ry2rN8kvcahP1ilkISKGoGzCo38OZGrQKOUI9bZs+UOyhi
lkibCNE/aMeZKAj6RUZ8q0at5dZMplJ6xbuSEzQSvCjHMAfEbfnoD3gc6ncLxIL6
aRhTnbIwZfkbiJQ/xYqYdju3sY9w3PPzbPNngzXKRHJnj56j41pZ3g==
=KRwL
-----END PGP SIGNATURE-----



More information about the Gnupg-devel mailing list