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

Eli Zaretskii eliz at gnu.org
Wed Dec 10 18:13:52 CET 2014


> 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:

  config.log:2483:configure:10311: checking for shared library run path origin
  config.log-2484-configure:10324: result: done
  --
  config.log:56715:configure:40384: checking whether the gcc linker (/d/usr/bin/ld) supports shared libraries
  config.log-56716-configure:41541: result: yes
  --
  config.log:56729:configure:43227: checking if libtool supports shared libraries
  config.log-56730-configure:43229: result: yes
  config.log:56731:configure:43232: checking whether to build shared libraries
  config.log-56732-configure:43253: result: yes
  --
  config.log:57485:configure:43696: checking whether the g++ linker (/d/usr/bin/ld) supports shared libraries
  config.log-57486-configure:44698: result: yes
  --
  config.log:57503:configure:45499: checking whether the g++ linker (/d/usr/bin/ld) supports shared libraries
  config.log-57504-configure:45538: result: yes
  --
  configure:53733: summary of build options:

    version:              3.3.10 shared 69:2:41
    Host/Target system:   i686-pc-mingw32
    Build system:         i686-pc-mingw32
    Install prefix:       d:/usr
    Compiler:             gcc
    CFlags:               -O2 -g3
    Library types:        Shared=yes, Static=no
    Local libopts:        yes
    Local libtasn1:       no
    Use nettle-mini:      no

  configure:53755: External hardware support:

    /dev/crypto:          no
    Hardware accel:       x86
    Padlock accel:        yes
    PKCS#11 support:      yes
    TPM support:          no

  configure:53785: Optional features:
  (note that included applications might not compile properly
  if features are disabled)

    DTLS-SRTP support:    yes
    ALPN support:         yes
    OCSP support:         yes
    Ses. ticket support:  yes
    OpenPGP support:      yes
    SRP support:          yes
    PSK support:          yes
    DHE support:          yes
    ECDHE support:        yes
    RSA-EXPORT support:   yes
    Anon auth support:    yes
    Heartbeat support:    yes
    Unicode support:      yes
    Self checks:          no
    Non-SuiteB curves:    yes
    FIPS140 mode:         no

  configure:53811: Optional applications:

    crywrap app:          

  configure:53823: Optional libraries:

    Guile wrappers:       yes
    C++ library:          yes
    DANE library:         no
    OpenSSL compat:       yes

  configure:53841: System files:

    Trust store pkcs11:   
    Trust store dir:      
    Trust store file:     
    Blacklist file:       
    CRL file:             
    Priority file:        d:/usr/etc/gnutls/default-priorities
    DNSSEC root key file: C:\Program Files\Unbound\root.key

> Also, could you post the build log of the Guile bindings when passing
> V=1 as a makefile variable (or --disable-silent-rules)?

  $ 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
  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
  libtool: link: (cd .libs/guile-gnutls-v-2.lax/libgnu.a && ar x "/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile/src/../../gl/.libs/libgnu.a")
  libtool: link: ar cru .libs/guile-gnutls-v-2.a  .libs/guile_gnutls_v_2_la-core.o .libs/guile_gnutls_v_2_la-errors.o .libs/guile_gnutls_v_2_la-utils.o  .libs/guile-gnutls-v-2.lax/libgnu.a/asnprintf.o .libs/guile-gnutls-v-2.lax/libgnu.a/asprintf.o .libs/guile-gnutls-v-2.lax/libgnu.a/base64.o .libs/guile-gnutls-v-2.lax/libgnu.a/c-ctype.o .libs/guile-gnutls-v-2.lax/libgnu.a/fstat.o .libs/guile-gnutls-v-2.lax/libgnu.a/ftell.o .libs/guile-gnutls-v-2.lax/libgnu.a/ftello.o .libs/guile-gnutls-v-2.lax/libgnu.a/getdelim.o .libs/guile-gnutls-v-2.lax/libgnu.a/getline.o .libs/guile-gnutls-v-2.lax/libgnu.a/hash-pjw-bare.o .libs/guile-gnutls-v-2.lax/libgnu.a/lseek.o .libs/guile-gnutls-v-2.lax/libgnu.a/malloc.o .libs/guile-gnutls-v-2.lax/libgnu.a/memmem.o .libs/guile-gnutls-v-2.lax/libgnu.a/printf-args.o .libs/guile-gnutls-v-2.lax/libgnu.a/printf-parse.o .libs/guile-gnutls-v-2.lax/libgnu.a/read-file.o .libs/guile-gnutls-v-2.lax/libgnu.a/realloc.o .libs/guile-gnutls-v-2.lax/libgnu.a/snprintf.o .libs/guile-gnutls-v-2.lax/libgnu.a/strndup.o .libs/guile-gnutls-v-2.lax/libgnu.a/strnlen.o .libs/guile-gnutls-v-2.lax/libgnu.a/strtok_r.o .libs/guile-gnutls-v-2.lax/libgnu.a/strverscmp.o .libs/guile-gnutls-v-2.lax/libgnu.a/sys_socket.o .libs/guile-gnutls-v-2.lax/libgnu.a/time_r.o .libs/guile-gnutls-v-2.lax/libgnu.a/u64.o .libs/guile-gnutls-v-2.lax/libgnu.a/unistd.o .libs/guile-gnutls-v-2.lax/libgnu.a/vasnprintf.o .libs/guile-gnutls-v-2.lax/libgnu.a/vasprintf.o .libs/guile-gnutls-v-2.lax/libgnu.a/vsnprintf.o .libs/guile-gnutls-v-2.lax/libgnu.a/xsize.o
  libtool: link: ranlib .libs/guile-gnutls-v-2.a
  libtool: link: rm -fr .libs/guile-gnutls-v-2.lax
  libtool: link: ( cd ".libs" && rm -f "guile-gnutls-v-2.la" && cp -pR "../guile-gnutls-v-2.la" "guile-gnutls-v-2.la" )
  make[2]: Leaving directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile/src'
  make[1]: Leaving directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile/src'
  Making all in tests
  make[1]: Entering directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile/tests'
  make[1]: Nothing to be done for `all'.
  make[1]: Leaving directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile/tests'
  make[1]: Entering directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile'
  make[1]: Nothing to be done for `all-am'.
  make[1]: Leaving directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/guile'

For comparison, here's how this looks with another library built by
"make V=1":

  make[4]: Entering directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/lib'
  /bin/sh ../libtool  --tag=CXX    --mode=link g++  -I./includes   -I./includes -O2 -g3 -no-undefined  -version-info 29:0:1  -g3 -o libgnutlsxx.la -rpath d:/usr/lib libgnutlsxx_la-gnutlsxx.lo libgnutls.la -lintl  -lregex
  libtool: link: rm -fr  .libs/libgnutlsxx.dll.a .libs/libgnutlsxx.la .libs/libgnutlsxx.lai
  libtool: link: g++ -shared -nostdlib d:/usr/bin/../lib/gcc/mingw32/4.7.2/../../../dllcrt2.o d:/usr/bin/../lib/gcc/mingw32/4.7.2/crtbegin.o  .libs/libgnutlsxx_la-gnutlsxx.o   ./.libs/libgnutls.dll.a -Ld:/usr/lib -Ld:/usr/lib/.libs d:/usr/bin/../lib/gcc/mingw32/4.7.2/../../../libintl.dll.a d:/usr/bin/../lib/gcc/mingw32/4.7.2/../../../libregex.dll.a -Ld:/usr/bin/../lib/gcc/mingw32/4.7.2 -Ld:/usr/bin/../lib/gcc -Ld:/usr/bin/../lib/gcc/mingw32/4.7.2/../../.. -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt d:/usr/bin/../lib/gcc/mingw32/4.7.2/crtend.o  -O2   -o .libs/libgnutlsxx-28.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgnutlsxx.dll.a
  libtool: link: ( cd ".libs" && rm -f "libgnutlsxx.la" && cp -pR "../libgnutlsxx.la" "libgnutlsxx.la" )
  make[4]: Leaving directory `/d/usr/eli/utils/gnutls-3.3.10.with-guile/lib'

> 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?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.gz
Type: application/octet-stream
Size: 80050 bytes
Desc: not available
URL: </pipermail/attachments/20141210/a2499a87/attachment-0001.obj>


More information about the Gnutls-devel mailing list