Problem compiling gnutls

B. Scott Michel scottm at aero.org
Mon Aug 13 23:10:06 CEST 2012


On 8/10/2012 10:42 PM, Vincent Torri wrote:
> the correct fix is to check if these functions are available in
> configure.ac and declare/define them conditionally in the cpp file

Amazingly insightful answer.

I can successfully compile 3.0.17 using the mingw-64 compiler without
issues. I haven't tried 3.0.22 yet. I do all of my work under MSys. I
try to avoid cygwin; see below.

configure (and configure.ac) look for vasprintf. The scripts do not look
for asprintf, specifically. Two reasons why you might have problems:

a) cygwin: The mingw-64 toolchain may be picking up a header from
cygwin. This header's declarations for asprintf and vasprintf differ
from what gnutls' replacement thinks it should be.

b) You didn't specify "--host=x86_64-w64-mingw32" as an argument to
configure.

Both (a) and (b) are related -- if you didn't give "--host" to
configure, then it is possible for toolchains to pick up headers they're
not supposed to find. You might also need to unset your settings for CC
and CFLAGS as well.

Hope this helps you get a little farther.


-scooter






More information about the Gnutls-devel mailing list