[Help-gnutls] Re: Build gnutls on windows

Simon Josefsson jas at extundo.com
Mon Aug 22 20:26:07 CEST 2005

Martin Lambers <marlam at marlam.de> writes:

> On Mon, 22. Aug 2005, 09:27:24 -0700, venkat akella wrote:
>>  I am trying to build the gnutls-1.2.6 on windows using MingW/Msys
>> environment. But getting some compilation errors saying that termios.h
>> is not found.
> This is because the gnulib getpass module does not compile with

Right.  I am working on this now.  Thanks for the report.

> I was able to compile and install at least the library and include files 
> with the Debian mingw32 packages (cross compiling):
> $ ./configure --disable-random-device --disable-pseudo-random-device \
>         --prefix=$HOME/install/i586-mingw32msvc --without-pic \
>         --host=i586-mingw32msvc # this is for cross compilation
> $ make
> [this fails at the getpass module]
> $ cd crypto
> $ make
> $ cd ../includes
> $ make install
> $ cd ../lib
> $ make install
> I did not yet experience any problems with the resulting library, the
> programs I linked it with work OK.
> The gnutls tools seem to use getpass() and mmap(), both of which are not
> available on Win32 AFAIK. Maybe there are other problems.

I'll try to fix getpass.  There is no reason for the tool to use mmap
to read keys/certificates; a patch to fix this would be appreciated.

However, both termios.h and mmap are POSIX.  POSIX is a loose
requirement for running the GnuTLS tools.  If it is simple/clean to
work around non-implemented POSIX functionality for platform such as
Mingw32, GnuTLS may do it, but we won't pollute the GnuTLS code with
workaround for all kind of systems.  People have tried that
programming approach in the past, and it leads to poor maintainability
and poor quality.  The best way to deal with this is to write a gnulib
portability module to re-implement the missing POSIX functionality for
your system.  Adding such code to GnuTLS is not a problem.

In general, I appreciate to hear about build problems.


More information about the Gnutls-help mailing list