Several problems with building GnuPG 2 for Windows

Laila Vrazda lailavrazda1979 at gmail.com
Tue Feb 19 17:11:34 CET 2013


The build of npth dies with the following:

libtool: compile:  x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2
-MT npth.lo -MD -MP -MF .deps/npth.Tpo -c npth.c -o npth.o
In file included from npth.c:39:0:
npth.h:50:8: error: redefinition of 'struct timespec'
 struct timespec {
        ^
In file included from npth.h:33:0,
                 from npth.c:39:
/home/kineta/win64-build/cross/x86_64-w64-mingw32/include/sys/types.h:89:8:
note: originally defined here
 struct timespec {
        ^

A workaround is to comment out lines 50-53 in the file w32/npth.h.

After that, one of the tests fails to compile:

make[2]: Entering directory `/home/kineta/gpg2-build/npth-0.91/tests'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I..  -I../w32   -g -O2 -MT
t-mutex.o -MD -MP -MF .deps/t-mutex.Tpo -c -o t-mutex.o t-mutex.c
mv -f .deps/t-mutex.Tpo .deps/t-mutex.Po
/bin/sh ../libtool --tag=CC   --mode=link x86_64-w64-mingw32-gcc  -g -O2
-o t-mutex.exe t-mutex.o ../w32/libnpth.la
libtool: link: x86_64-w64-mingw32-gcc -g -O2 -o t-mutex.exe t-mutex.o
../w32/.libs/libnpth.a
../w32/.libs/libnpth.a(npth.o): In function `npth_connect':
/home/kineta/gpg2-build/npth-0.91/w32/npth.c:1676: undefined reference to
`__imp_connect'
../w32/.libs/libnpth.a(npth.o): In function `npth_accept':
/home/kineta/gpg2-build/npth-0.91/w32/npth.c:1688: undefined reference to
`__imp_accept'
...
/home/kineta/gpg2-build/npth-0.91/w32/npth.c:1978: undefined reference to
`__WSAFDIsSet'
/home/kineta/gpg2-build/npth-0.91/w32/npth.c:1979: undefined reference to
`__WSAFDIsSet'
/home/kineta/gpg2-build/npth-0.91/w32/npth.c:1984: undefined reference to
`__imp_WSACloseEvent'
collect2: error: ld returned 1 exit status
make[2]: *** [t-mutex.exe] Error 1

I think it just needs to link with ws2_32. Unfortunately, I know next to
nothing about autotools internals, so I can't fix it for now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20130219/b97307aa/attachment.htm>


More information about the Gnupg-devel mailing list