[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#747534: transition: libetpan



On 2014-05-11 Ricardo Mones <mones@debian.org> wrote:
> On Sat, 10 May 2014 16:57:28 +0200
> Andreas Metzler <ametzler@bebt.de> wrote:
>> On 2014-05-09 Ricardo Mones <mones@debian.org> wrote:
>> [...]
>>> This is a new mini-shrinking-transition for libetpan new upstream
>>> release 1.4.1. Source packages affected are now:
[...]
>> | Build-Depends: debhelper (>= 9), autotools-dev, libtool, libdb-dev,
>> |  libgnutls-dev, liblockfile-dev, libsasl2-dev, libexpat1-dev,
>> |  libcurl4-gnutls-dev (>= 7.16.4-5), docbook-dsssl, jade

>> Wouldn't this be a good time to switch from libgnutls-dev to
>> libgnutls28-dev? curl-gnutls is using libgnutls28 nowadays, so
>> you would end up linking against libgnutls28 and libgnutls26
>> otherwise.

>   I don't observe such double linking here (ldd shows only libgnutls26),

Hello Ricardo,
Afaict that is because you are building without curl support, i.e.
both the dependency and build-depency on libcurl4-gnutls-dev are
unused and superfluous. At a quick glance this looks like a upstream
bug (logic error) in configure.ac:
--------------------------
if test "x$with_curl" != "xno"; then
  :
elif test "x$with_curl" != "xauto"; then
[...]
--------------------------

"If $with_curl is not »no« skip testing for curl ..." ;-)
Changing this yields curl linkage:
(SID)ametzler@argenau:/tmp/ETPAN/libetpan-1.4.1$ ldd debian/tmp/usr/lib/i386-linux-gnu/libetpan.so.17.1.0  | grep gnut
        libcurl-gnutls.so.4 => /usr/lib/i386-linux-gnu/libcurl-gnutls.so.4 (0xf7658000)
        libgnutls.so.28 => /usr/lib/i386-linux-gnu/libgnutls.so.28 (0xf7384000)
        libgnutls.so.26 => /usr/lib/i386-linux-gnu/libgnutls.so.26 (0xf6bb3000)
However it also adds this warning, so I am not sure whether it is
actually useful:
 dpkg-shlibdeps: warning: package could avoid a useless dependency if
 debian/libetpan17/usr/lib/i386-linux-gnu/libetpan.so.17.1.0 was not
 linked against libcurl-gnutls.so.4 (it uses none of the library's
 symbols)

>   anyway I've tried, but the result FTBFS with:

> /usr/bin/ld: cannot find -lgcrypt
> /usr/bin/ld: cannot find -lgpg-error
> collect2: error: ld returned 1 exit status
> Makefile:525: recipe for target 'libetpan.la' failed
> make[6]: *** [libetpan.la] Error 1

>   So maybe something else is needed or the library isn't ready for that.

./configure tries to link against unused libraries :-( Find attached
a trivial patch to fix this. - Please apply it, even if you stay with
gnutls26. This fixes two warnings by dpkg-shlibdeps.
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libetpan17/usr/lib/i386-linux-gnu/libetpan.so.17.1.0 was not linked against libgpg-error.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libetpan17/usr/lib/i386-linux-gnu/libetpan.so.17.1.0 was not linked against libgcrypt.so.11 (it uses none of the library's symbols)

thanks, cu Andreas

-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
Description: Stop unnecessary linkage against -lgcrypt and -lgpg-error.
 Neither of these libraries are used by libetpan, see 
 "grep -Erli 'gpg_err|gcry'".
Author: Andreas Metzler <ametzler@debian.org>
Origin: vendor
Last-Update: 2014-05-11

--- libetpan-1.4.1.orig/configure
+++ libetpan-1.4.1/configure
@@ -16421,7 +16421,7 @@ $as_echo "$ac_cv_lib_gnutls_gnutls_globa
 if test "x$ac_cv_lib_gnutls_gnutls_global_deinit" = xyes; then :
   with_gnutls=yes
 else
-  GNUTLSLIB="-lgnutls -lgcrypt -lgpg-error -lz"
+  GNUTLSLIB="-lgnutls"
 fi
 
 
@@ -16442,7 +16442,7 @@ $as_echo "#define USE_GNUTLS 1" >>confde
 
 $as_echo "#define USE_SSL 1" >>confdefs.h
 
-  GNUTLSLIB="-lgnutls -lgcrypt -lgpg-error -lz"
+  GNUTLSLIB="-lgnutls"
 else
   GNUTLSLIB=""
 fi
--- libetpan-1.4.1.orig/configure.ac
+++ libetpan-1.4.1/configure.ac
@@ -228,7 +228,7 @@ if test "x$with_gnutls" != "xno"; then
   fi
   GNUTLSLIB=""
   AC_CHECK_HEADER(gnutls/gnutls.h, [
-   AC_CHECK_LIB(gnutls, gnutls_global_deinit, with_gnutls=yes, [GNUTLSLIB="-lgnutls -lgcrypt -lgpg-error -lz"])
+   AC_CHECK_LIB(gnutls, gnutls_global_deinit, with_gnutls=yes, [GNUTLSLIB="-lgnutls"])
   ])
   if test "x$with_gnutls" != "xyes"; then
    CPPFLAGS="$OCPPFLAGS"
@@ -240,7 +240,7 @@ fi
 if test "x$with_gnutls" = "xyes"; then
   AC_DEFINE([USE_GNUTLS],1, [Define to use GnuTLS])
   AC_DEFINE([USE_SSL], 1, [Define to use OpenSSL])
-  GNUTLSLIB="-lgnutls -lgcrypt -lgpg-error -lz"
+  GNUTLSLIB="-lgnutls"
 else
   GNUTLSLIB=""
 fi

Reply to: