[Help-gnutls] Re: gnutls 2.3.4 doesn't copile using MinGW

Simon Josefsson simon at josefsson.org
Sun Apr 13 12:48:36 CEST 2008


Massimo Gaspari <massimo.gaspari at alice.it> writes:

> Hi all,
>
> I am trying to get gntls compiled on a Windows XP SP2 with mingw (Gcc
> 4.2.1 , + Msys 1.0).

Hi!  I haven't tried that, but it should be possible.  I use MinGW under
Debian.

> I compiled without issues zlib 1.2.3 , libgpg-error 1.6 and libgcrypt
> 1.4.0. The latest one using
>
> ./configure --disable-shared --disable-asm --disable-dev-random

I didn't use any parameter when building under debian.  Did you run into
problems that lead you to use these?

In particular, do you want --disable-shared?  Building a DLL should be
possible.

> Now gnutls. I used
>
> ./configure --disable-shared --disable-rpath --disable-cxx --disable-guile
>
> and then make. But the compilation stopped with
>
>
> libtool: link: ( cd ".libs" && rm -f "libgnutls.la" && cp -p 
> "../libgnutls.la" "libgnutls.la" )
> make[3]: *** No rule to make target `libgnutls-26.def', needed by
...
>
> Any suggestion? Does gnutls compile on MinGW? Any help will be appreciated.
...
> checking if gcc/ld supports -Wl,--output-def... yes

I think this is the problem: we check if -Wl,--output-def works, and
enable the *.def stuff if it is, but if --disable-shared is used, I
suspect that the linker won't output a *.def file, so the build fails.

To work around the problem, just 'touch lib/libgnutls-26.def' to create
a zero size dummy file.  Then re-run make.

You could try and remove --disabled-shared, then a shared library will
be built and the *.def file will be generated via --output-def.

However, building only static libraries should be supported too, so we
should fix this.  We probably shouldn't even attempt to use --output-def
if we aren't building shared libraries.  I've installed the following
patches.  Could you try tomorrow's daily snapshot?

http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=commitdiff;h=e33b897e0cb313ad21f116f02cfa5d40a825a645
http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=commitdiff;h=547af300bec94d0093813a8440870358940e159b
http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=commitdiff;h=f270fe0568186ca666e244cd88893c7cdb47467a

Thanks,
/Simon





More information about the Gnutls-help mailing list