|
From: | Massimo Gaspari |
Subject: | [Help-gnutls] Re: gnutls 2.3.4 doesn't copile using MinGW |
Date: | Wed, 16 Apr 2008 20:18:29 +0200 |
User-agent: | Thunderbird 2.0.0.12 (Windows/20080213) |
Simon Josefsson wrote:Massimo Gaspari <address@hidden> writes: Up to now only the vasprintf seems to have problems. So It's not difficult to change the code.Yes, that is one solution, however doing it systematically for each and every symbol defined by gnulib is a lot of work. Maybe you could add '#define vasprintf gnutls_vasprintf' in your config.h when building GnuTLS? I'm not sure it will work, but something like that will be necessary to fully solve this problem. In my opinion it fixes the issue. Moreover if you use the following linkI edited the Makefile in doc/example changing LIBS = -lws2_32 to LIBS = -lws2_32 ../../gl/.libs/libgnu.a and this issue disappeared.I'm not sure if it will solve this, but I changed the order of libgnu.la in Makefile.am. Please test tomorrow's snapshot. http://hpux.cs.utah.edu/hppd/cgi-bin/wwwtar?/hpux/Gnu/gnutls-2.3.4/gnutls-2.3.4-src-11.11.tar.gz+gnutls-2.3.4/HPUX.Install+text you find some suggestion to get GnuTls compiled in HPUX for 2.3.4. There's the following comment * doc/examples/Makefile.in: - Use ../../gl/.libs/libgnu.la at the end of the libtool link line to link examples, rather than ../../gl/libgnu.la in the middle of the line. This avoids a missing rpl_strerror symbol when linking on the Itanium platform. So I'm not alone :-) I'll update the texinfo package. In the meantime I can skip the doc building using an empty Makefile all: check: (quick and dirty, but better than an error) So now I'm able to get gnutls compiled . Here's the full story I get gnutls-2.3.5.tar.bz2 then 1) libgpg-error ./configure --disable-shared --disable-rpath make make check make install 2) libgcrypt ./configure --disable-shared --disable-asm --enable-random=w32 --disable-dev-random make make check make install 3) GnuTLS Edit the sources changing any vasprintf to gnutls_vasprintf (stdio.in.h, vasprintf.c, asprintf.c and gnutls_str.c) Edit the config.h.in to have #define HAVE_ALLOCA 0 and #define HAVE_ALLOCA_H 0 ./configure --disable-shared --disable-rpath --disable-cxx --disable-guile Edit config.h to have #define HAVE_ALLOCA 0 (configure sets HAVE_ALLOCA 1) Edit Makefile in doc to do nothing Edit Makefile in doc/example adding ../../gl/libgnu.la to LIBS 4) make Yup, it does! The compilation ended without any error, just two warnings only. All other issues disappear. The warnings are /bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../lgl -I../lgl -I../includes -I../includes -I./x509 -I../libextra -I../lib/openpgp/ -I../lib/opencdk -I/usr/local/includ e -I./opencdk -I./minitasn1 -pipe -I/usr/local/include -Wno-pointer-sign -MT pkix_asn1_tab.lo -MD -MP -MF .deps/pkix_asn1_t ab.Tpo -c -o pkix_asn1_tab.lo pkix_asn1_tab.c libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../lgl -I../lgl -I../inc ludes -I../includes -I./x509 -I../libextra -I../lib/openpgp/ -I../lib/opencdk -I/usr/local/include -I./opencdk -I./minitasn1 -pipe -I/usr/local/include -Wno-pointer-sign -MT pkix_asn1_tab.lo -MD -MP -MF .deps/pkix_asn1_tab.Tpo -c pkix_asn1_tab.c -o p kix_asn1_tab.o pkix_asn1_tab.c:7: warning: 'pkix_asn1_tab' initialized and declared 'extern' mv -f .deps/pkix_asn1_tab.Tpo .deps/pkix_asn1_tab.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../lgl -I../lgl -I../includes -I../includes -I./x509 -I../libextra -I../lib/openpgp/ -I../lib/opencdk -I/usr/local/includ e -I./opencdk -I./minitasn1 -pipe -I/usr/local/include -Wno-pointer-sign -MT gnutls_asn1_tab.lo -MD -MP -MF .deps/gnutls_as n1_tab.Tpo -c -o gnutls_asn1_tab.lo gnutls_asn1_tab.c libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../lgl -I../lgl -I../inc ludes -I../includes -I./x509 -I../libextra -I../lib/openpgp/ -I../lib/opencdk -I/usr/local/include -I./opencdk -I./minitasn1 -pipe -I/usr/local/include -Wno-pointer-sign -MT gnutls_asn1_tab.lo -MD -MP -MF .deps/gnutls_asn1_tab.Tpo -c gnutls_asn1_tab. c -o gnutls_asn1_tab.o gnutls_asn1_tab.c:7: warning: 'gnutls_asn1_tab' initialized and declared 'extern' I think the compiler is right. The two variable are used in pkix_asn1_tab.c gnutls_global.c in both files you use the extern qualifier, but in pkix_asn1_tab.c you also assign a "value". Wouldn't it be better to remove the extern qualifier in pkix_asn1_tab.c? Ok is a very minor issue but avoid two warnings. So is this the end of the story? Unfortunately no!!When I did 'make check' I got ================== All 1 tests passed ================== make[3]: Leaving directory `/home/emasgas/gnutls-2.3.5/tests/userid' make[2]: Leaving directory `/home/emasgas/gnutls-2.3.5/tests/userid' Making check in pathlen make[2]: Entering directory `/home/emasgas/gnutls-2.3.5/tests/pathlen' make pathlen make[3]: Entering directory `/home/emasgas/gnutls-2.3.5/tests/pathlen' make[3]: Nothing to be done for `pathlen'. make[3]: Leaving directory `/home/emasgas/gnutls-2.3.5/tests/pathlen' make check-TESTS make[3]: Entering directory `/home/emasgas/gnutls-2.3.5/tests/pathlen' NOTE: you should run 'diskperf -y' to enable the disk statistics NOTE: you should run 'diskperf -y' to enable the disk statistics NOTE: you should run 'diskperf -y' to enable the disk statistics NOTE: you should run 'diskperf -y' to enable the disk statistics NOTE: you should run 'diskperf -y' to enable the disk statistics NOTE: you should run 'diskperf -y' to enable the disk statistics --- ./ca-no-pathlen.pem Mon Feb 25 16:20:41 2008 +++ new-ca-no-pathlen.pem Wed Apr 16 15:13:11 2008 @@ -3,8 +3,8 @@ Serial Number (hex): 00 Issuer: O=GnuTLS test certificate Validity: - Not Before: Fri Jan 26 10:00:04 UTC 2007 - Not After: Sat Jan 27 10:00:06 UTC 2007 + Not Before: Fri Jan 10:00:04 UTC 2007 + Not After: Sat Jan 10:00:06 UTC 2007 Subject: O=GnuTLS test certificate Subject Public Key Algorithm: RSA Modulus (bits 512): FAIL: pathlen =================================== 1 of 1 tests failed Please report to address@hidden =================================== make[3]: *** [check-TESTS] Error 1 make[3]: Leaving directory `/home/emasgas/gnutls-2.3.5/tests/pathlen' make[2]: *** [check-am] Error 2 make[2]: Leaving directory `/home/emasgas/gnutls-2.3.5/tests/pathlen' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/home/emasgas/gnutls-2.3.5/tests' make: *** [check-recursive] Error 1 Googling the internet I got the opinion that this may be related to isprint(), I'm not sure anyway. Is the following recommandation (from HPUX suggestions) relevat to the failure? * lib/x509/output.c: - The isprint() routine on Itanium platforms seemed to like printing 8-bit chars (possibly to do with the sign of the char?), so changed it to simply print any char between ' ' and '~'. Without this change, Itanium's "gmake check" fails one of the checks. Just for verification I repeated the whole process twice (from scratch) using CFLAGS=-O2 and CFLAGS= getting exactly the same results So the optimizer is not involved. I absolutely need your help to fix the latest issue. Massimo |
[Prev in Thread] | Current Thread | [Next in Thread] |