Building GnuTLS 3.0.9 on MS-Windows

Eli Zaretskii eliz at gnu.org
Sun Jan 8 12:12:36 CET 2012


> Date: Sun, 08 Jan 2012 11:48:01 +0100
> From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
> CC: gnutls-devel at gnu.org
> 
> Hi Eli, thanks for the information.

You are welcome.

> > This happens because no -I flag points to the ../../../lib
> > directory, where the headers live.
> 
> 
> I see there is however a "-I./../../", isn't ../../ the same as ../../../lib in your build?

Yes, it is.  It sounds like I reached the wrong conclusion.  the real
reason is the same as for one of the other problems: the trailing
slash in "-I./../../".  So probably removing that slash will do the
trick.

> > My analysis of this was that it is impossible to build both static 
> > and dynamic libraries on Windows in the same build.  If that is true,
> > then the `configure' script should be modified to not try that by
> > default; the default should probably build only the dynamic 
> > libraries. In any case, configuring with ./configure
> > --build=i686-pc-mingw32 --prefix=/d/usr --disable-shared succeeds and
> > produces a static library libgnutls.a (but not before bumping into a
> > couple of more problems, described below).
> 
> 
> According to libtool documentation this should have been done by libtool.
> 
> "By default, this macro turns on shared libraries if they are
>  available, and also enables static libraries if they don't
>  conflict with the shared libraries."
> 
> Thus it looks like a libtool bug. However I'd suggest you use the alternative
> option of building a shared libgnutls instead so you can replace it in
> case of important security fixes (e.g. now the one with DTLS).

Sorry, I'm not following: which "alternative option"?

> > Problem #3: The linker fails in src/: CC     udp-serv.o udp-serv.c:
> > In function `udp_server': udp-serv.c:107: warning: implicit
> > declaration of function `usleep' CC     common.o CC     p11common.o 
> > CCLD   gnutls-serv.exe udp-serv.o(.text+0x417): In function
> > `udp_server': d:/usr/eli/utils/gnutls-3.0.9/src/udp-serv.c:107:
> > undefined reference to `usleep'
> 
> 
> I'll add the gnulib usleep module for that. 

That one is currently useless: it has a 1-sec granularity.  I will
take this up with gnulib folks, then.

> You should try 3.0.11 because not only tests were fixed but also
> some internal library fixes (for openpgp) were done to make it work
> in windows.

OK.  But it sounds like trying 3.0.12, when it is available, would be
even better, as it is supposed to include a few other fixes you
mentioned above.

> > CCLD   gnutls-serv.exe Info: resolving _nettle_arcfour_crypt by
> > linking to __imp__nettle_arcfour_crypt (auto-import)
> > (there were a lot of these in many places).  I understand that this 
> > means the linker resolved a function by linking against a DLL, but 
> > perhaps some compiler or linker switch could prevent these warnings 
> > from being emitted in the first place.
> 
> 
> I don't know what this warning means or does. How would you fix it?

I don't know.  I will try to find out and get back to you.

> Thank you for this information. I've updated the git with your suggested fixes.

Thanks!




More information about the Gnutls-devel mailing list