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

Ludovic Courtès ludo at gnu.org
Wed Dec 10 18:45:39 CET 2014


Eli Zaretskii <eliz at gnu.org> skribis:

>> From: ludo at gnu.org (Ludovic Courtès)
>> Cc: gnutls-devel at lists.gnutls.org
>> Date: Tue, 09 Dec 2014 21:20:44 +0100
>> 
>> Could you post config.log, to check what Libtool thinks of shared
>> library support?
>
> Attached below.  Excerpts which looked relevant to me:

OK, everything seems normal here.

>   $ cd guile/
>   $ make -W ../config.h V=1
>   Making all in modules
>   make[1]: Entering directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile/modules'
>   make[1]: Nothing to be done for `all'.
>   make[1]: Leaving directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile/modules'
>   Making all in src
>   make[1]: Entering directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile/src'
>   make  all-am
>   make[2]: Entering directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile/src'
>   /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.

>   mv -f .deps/guile_gnutls_v_2_la-utils.Tpo .deps/guile_gnutls_v_2_la-utils.Plo
>   /bin/sh ../../libtool  --tag=CC    --mode=link gcc  -Wno-strict-prototypes  -I../../gl -I../../gl -Id:/usr/include/guile/2.0 -Id:/usr/include   -O2 -g3  -module -g3 -o guile-gnutls-v-2.la -rpath d:/usr/lib/guile/2.0 guile_gnutls_v_2_la-core.lo  guile_gnutls_v_2_la-errors.lo guile_gnutls_v_2_la-utils.lo ../../lib/libgnutls.la ../../gl/libgnu.la  -Ld:/usr/lib -lguile-2.0 -lgc   -lintl  -lregex
>   libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32 shared libraries
>   libtool: link: rm -fr  .libs/guile-gnutls-v-2.a .libs/guile-gnutls-v-2.la .libs/guile-gnutls-v-2.lai

Here it chooses to build the static library.

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

?

>> The ‘-module’ option is used to create “a library that can be dlopened”
>> (info "(libtool) Link mode"), and is a prerequisite when leaving out the
>> ‘lib’ prefix.
>
> How is this “library that can be dlopened” different from a "normal"
> shared library?

I think some OSes view shared libraries as something different from
dlopenable modules (early OS X had .dylib for the former and .so for the
latter, IIRC.)  There’s also the “dlpreopening” concept for OSes lacking
dlopen–which may be irrelevant nowadays (info "(libtool) Dlpreopening").

Thanks,
Ludo’.



More information about the Gnutls-devel mailing list