[gnutls-devel] Guile bindings for GnuTLS don't build as shared library on MinGW

Eli Zaretskii eliz at gnu.org
Thu Dec 11 18:19:52 CET 2014


> From: ludo at gnu.org (Ludovic Courtès)
> Cc: gnutls-devel at lists.gnutls.org
> Date: Wed, 10 Dec 2014 18:45:39 +0100
> 
> >   /bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -I../../lib/includes  -I../../lib/includes     -I../../extra/includes  -I../..  -I. -Id:/usr/include -Wno-strict-prototypes  -I../../gl -I../../gl -Id:/usr/include/guile/2.0 -Id:/usr/include   -O2 -g3 -MT guile_gnutls_v_2_la-utils.lo -MD -MP -MF .deps/guile_gnutls_v_2_la-utils.Tpo -c -o guile_gnutls_v_2_la-utils.lo `test -f 'utils.c' || echo './'`utils.c
> >   libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../lib/includes -I../../lib/includes -I../../extra/includes -I../.. -I. -Id:/usr/include -Wno-strict-prototypes -I../../gl -I../../gl -Id:/usr/include/guile/2.0 -Id:/usr/include -O2 -g3 -MT guile_gnutls_v_2_la-utils.lo -MD -MP -MF .deps/guile_gnutls_v_2_la-utils.Tpo -c utils.c  -DDLL_EXPORT -DPIC -o .libs/guile_gnutls_v_2_la-utils.o
> 
> So it builds both the static and the PIC version.

Not sure I follow you here.  The above is just one command, and it
builds only the static version.  The -DPIC is ignored on Windows,
right?

> The command line lacks -no-undefined compared to the other one you
> posted, which may be the explanation.  Could you try:
> 
>   make clean -C guile
>   make -C guile LDFLAGS=-no-undefined
> 
> ?

Yes, it solves the problem, thanks.

Now, as long as I have your attention: having succeeded in building
the Guile extensions, I've run the related tests, and saw these two
problems:

  . anonymous-auth.scm, session-record-port.scm, x509-auth.scm, and
    openpgp-auth.scm tests all fail because they use primitive-fork,
    which isn't supported on Windows.  Is there any chance these tests
    could be rewritten to not use that API?

  . openpgp-keyring.scm fails because it doesn't open
    openpgp-keyring.gpg, a binary file, in binary mode.  Here's the
    patch to fix that:

--- guile/tests/openpgp-keyring.scm~0	2014-07-29 22:22:47 +0300
+++ guile/tests/openpgp-keyring.scm	2014-12-11 08:16:15 +0200
@@ -49,7 +49,7 @@
   ;; Return true if FILE contains a valid keyring encoded in FORMAT.
   (let ((raw-keyring (make-u8vector (file-size file))))
 
-    (uniform-vector-read! raw-keyring (open-input-file file))
+    (uniform-vector-read! raw-keyring (open-input-file file #:binary #t))
 
     (let ((keyring (import-openpgp-keyring raw-keyring format))
           (null-id (make-u8vector 8 0)))



More information about the Gnutls-devel mailing list