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

Massimo Gaspari massimo.gaspari at alice.it
Sun Apr 13 22:41:59 CEST 2008


Simon Josefsson wrote:


Thank you very much for your reply. And thank you in advance for any 
further help.
>> 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?
>   

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

I don't need and I prefer static libraries only.

I used

--disable-dev-random

because otherwise (please correct me if I'm wrong) I need /dev/random without that option
(Windows XP and/or Vista). Is it correct?  Can I use /dev/random on Windows platform as well?
Or is  --disable-dev-random needed on Windows?
As you know I'm a GnuTls beginner. So please be patient.. :-)

Just to tell you the whole story, the libgpgcrypt was configured using

./configure --disable-shared --disable-rpath

But I don't think libgpg-error is involved in the reported issue.
>> 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
>>     
>
>   
> 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
>   
I re-tried to compile gnutls and after the error message I made " touch 
lib/libgnutls-26.def" . Then I got the following error message

libtool: link: ranlib .libs/libgnutls-openssl.a
libtool: link: rm -fr .libs/libgnutls-openssl.lax
libtool: link: ( cd ".libs" && rm -f "libgnutls-openssl.la" && cp -p 
"../libgnutls-openssl.la" "libgnutls-openssl.la" )
make[3]: *** No rule to make target `libgnutls-openssl-26.def', needed 
by `all-am'.  Stop.
make[3]: Leaving directory `/home/Massimo/gnutls-2.3.4/libextra'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/Massimo/gnutls-2.3.4/libextra'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Massimo/gnutls-2.3.4'
make: *** [all] Error 2


I made "touch libextra/libgnutls-openssl-26.def". Then the same for 
libgnutls-extra-26.def, after another  "touch" I got

/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99 -pipe 
-I/usr/local/include -O2 -Wno-pointer-sign   -o gnutls-serv.exe 
serv-gaa.o serv.o common.o select.o ../lib/libgnutls.la -L/usr/local/lib 
-lgcrypt -lgpg-error  ../gl/libgnu.la -lws2_32
libtool: link: gcc -std=gnu99 -pipe -I/usr/local/include -O2 
-Wno-pointer-sign -o gnutls-serv.exe serv-gaa.o serv.o common.o 
select.o  ../lib/.libs/libgnutls.a -L/usr/local/lib ../gl/.libs/libgnu.a 
/usr/local/lib/libgcrypt.a /usr/local/lib/libgpg-error.a -lws2_32
C:/msys/1.0/local/lib/libgcrypt.a(libgcrypt_la-missing-string.o):missing-string.c:(.text+0x30): 
multiple definition of `_vasprintf'
../lib/.libs/libgnutls.a(vasprintf.o):vasprintf.c:(.text+0x0): first 
defined here
collect2: ld returned 1 exit status
make[3]: *** [gnutls-serv.exe] Error 1
make[3]: Leaving directory `/home/Massimo/gnutls-2.3.4/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/Massimo/gnutls-2.3.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Massimo/gnutls-2.3.4'
make: *** [all] Error 2

This time "touch" can't help :-).

Any other suggestion?

Nevertheless during compilation I got the followin warnings

libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. 
-I../../lgl -I../../lgl -I../../libextra -I../../lib/minitasn1 
-I../../libextra/openpgp/ -I../../libextra/opencdk -I../../lib 
-I../../includes -I../../includes -I/usr/local/include -pipe 
-I/usr/local/include -O2 -Wno-pointer-sign -MT x509.lo -MD -MP -MF 
.deps/x509.Tpo -c x509.c -o x509.o
x509.c: In function '_gnutls_x509_crt_cpy':
x509.c:95: warning: implicit declaration of function 'alloca'
x509.c:95: warning: incompatible implicit declaration of built-in 
function 'alloca'
x509.c: In function 'gnutls_x509_crt_get_fingerprint':
x509.c:1965: warning: incompatible implicit declaration of built-in 
function 'alloca'
x509.c: In function 'gnutls_x509_crt_get_key_id':
x509.c:2160: warning: incompatible implicit declaration of built-in 
function 'alloca'
mv -f .deps/x509.Tpo .deps/x509.Plo


The same warning is present for other files as well. Do you need a full 
list?

I was unable to find a new daily snapshot. May be it isn't available 
yet. I'm going to try as soon as the new snapshot is available.

Max






More information about the Gnutls-help mailing list