Mailing List Archive

Problem building for win32
Hello,

has anybody tried to build gnupg-0.9.3 for Win32.
I got the ming32 packet from Werner Kochs page and built it under linux.
A hello-world .exe runs, but I didn't test more.
Now I am stuck with building gnupg (see below).

Has anybody a detailed explanation how to build gnupg for Win32?
Or still better a working visual c++ project?

Thanks for any hints,

Juergen

[root@lisa-t7 gnupg-0.9.3]# which gcc
/usr/local/i386--mingw32/bin/gcc
[root@lisa-t7 gnupg-0.9.3]# ./configure --target=i386--ming32
creating cache ./config.cache
checking whether use of /dev/random is requested... yes
checking whether use of extensions is requested... yes
checking whether assembler modules are requested... yes
checking whether memory debugging is requested... no
checking whether memory guard is requested... no
checking whether included zlib is requested... no
checking host system type... configure: error: can not guess host type; you must
specify one
[root@lisa-t7 gnupg-0.9.3]#
Re: Problem building for win32 [ In reply to ]
>
> has anybody tried to build gnupg-0.9.3 for Win32.
> I got the ming32 packet from Werner Kochs page and built it under linux.
> A hello-world .exe runs, but I didn't test more.
> Now I am stuck with building gnupg (see below).
>
> Has anybody a detailed explanation how to build gnupg for Win32?
> Or still better a working visual c++ project?
>

I have been thinking a lot about doing it with VC++ 6.0 but i'm not really
sure if its allowed with the gnu liscense and stuff.

John
Re: Problem building for win32 [ In reply to ]
John Fernandes <ronnyf@giasbm01.vsnl.net.in> writes:

> I have been thinking a lot about doing it with VC++ 6.0 but i'm not really
> sure if its allowed with the gnu liscense and stuff.

It is allowed. But don't do it - it will be a headache as you can't
use the Makefile and configure stuff and have to edit many thinks
manually. It works for one release but wnats to maintain this. The
cross compiler works just fine (Although I should update it to use
egcs with some builtin mingw32 support).


--
Werner Koch at guug.de www.gnupg.org keyid 621CC013
Re: Problem building for win32 [ In reply to ]
Werner Koch wrote
> The cross compiler works just fine (Although I should update it to use
> egcs with some builtin mingw32 support).


First Problem is,

there is a typo in http://www.roads.lut.ac.uk/lists/g10/1999/02/0022.html
Correct is "./configure --target=i386--mingw32" (the typo was i386--ming32)

What about putting the way to build for win32 on the gnupg docu page ?


Then I tried


[root@lisa-t7 gnupg-0.9.3]# make
make all-recursive
make[1]: Entering directory `/opt/gnupg-0.9.3'
Making all in intl
make[2]: Entering directory `/opt/gnupg-0.9.3/intl'
make[2]: *** No rule to make target `all-', needed by `all'. Stop.
make[2]: Leaving directory `/opt/gnupg-0.9.3/intl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/gnupg-0.9.3'
make: *** [all-recursive-am] Error 2

[changed "all: all-" to "all: all-no"]


i386--mingw32-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl -g -O2
-Wall -Wcast-align -Wshadow -Wstrict-prototypes -c ttyio.c
ttyio.c:31: windows.h: No such file or directory

[set symlink to windows.h from mingw32-cpd-0.1]

In file included from /usr/local/include/windows.h:57,
from ttyio.c:32:
/usr/local/include/Windows32/Sockets.h:95: warning: redefinition of `u_char'
/usr/include/sys/types.h:33: warning: `u_char' previously declared here
/usr/local/include/Windows32/Sockets.h:96: warning: redefinition of `u_short'
/usr/include/sys/types.h:34: warning: `u_short' previously declared here
/usr/local/include/Windows32/Sockets.h:97: warning: redefinition of `u_int'
/usr/include/sys/types.h:35: warning: `u_int' previously declared here
/usr/local/include/Windows32/Sockets.h:98: warning: redefinition of `u_long'
/usr/include/sys/types.h:36: warning: `u_long' previously declared here
/usr/local/include/Windows32/Sockets.h:123: conflicting types for `fd_set'
/usr/include/sys/select.h:48: previous declaration of `fd_set'
/usr/local/include/Windows32/Sockets.h:792: conflicting types for `select'
/usr/include/sys/select.h:76: previous declaration of `select'
/usr/local/include/Windows32/Sockets.h:813: conflicting types for `gethostname'
/usr/include/unistd.h:662: previous declaration of `gethostname'

[gave up]
Re: Problem building for win32 [ In reply to ]
"Juergen_Weber"@Schwaebisch-Hall.de writes:

> What about putting the way to build for win32 on the gnupg docu page ?

As said before: When I make changes to GnuPG I don't care very much
about windows so it obvious that you will have some problems. I'm
going to fix this when I find some spare time.

You should use --disable-nls, disable the socket stuff, watch for
duplicate open of files, chmod, chdir etc. issue.

Please do not send me patches now. I have enough work to do for the
1.0 release :-). A Windoze version will come when we have solved all
the real problems.

--
Werner Koch at guug.de www.gnupg.org keyid 621CC013