tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
databases/nss_ldap excessive linking
Hello
When building on NetBSD, databases/nss_ldap depends on many unused
libraries (The binary does not contain any symbol from kerberos
libraries):
$ ldd /usr/lib/nss_ldap.so.0
/usr/lib/nss_ldap.so.0:
-lldap-2.4.2 => /usr/pkg/lib/libldap-2.4.so.2
-llber-2.4.2 => /usr/pkg/lib/liblber-2.4.so.2
-lc.12 => /usr/lib/libc.so.12
-lsasl2.3 => /usr/pkg/lib/libsasl2.so.3
-lresolv.2 => /usr/lib/libresolv.so.2
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lssl.10 => /usr/lib/libssl.so.10
-lcrypto.8 => /usr/lib/libcrypto.so.8
-lcrypt.1 => /lib/libcrypt.so.1
-lkrb5.26 => /usr/lib/libkrb5.so.26
-lhx509.5 => /usr/lib/libhx509.so.5
-lasn1.9 => /usr/lib/libasn1.so.9
-lcom_err.7 => /usr/lib/libcom_err.so.7
-lroken.19 => /usr/lib/libroken.so.19
-lutil.7 => /usr/lib/libutil.so.7
-lwind.0 => /usr/lib/libwind.so.0
-lheimbase.1 => /usr/lib/libheimbase.so.1
-lgssapi.10 => /usr/lib/libgssapi.so.10
-lheimntlm.4 => /usr/lib/libheimntlm.so.4
This makes the package unusable on a stripped down system where theses
libraries are not there. A patch on configure to remove a few
AC_CHECK_LIB() produces a binary with the exact same symbol, but with
the following library requirement:
nss_ldap.so:
-lldap-2.4.2 => /usr/pkg/lib/libldap-2.4.so.2
-llber-2.4.2 => /usr/pkg/lib/liblber-2.4.so.2
-lc.12 => /lib/libc.so.12
-lsasl2.3 => /usr/pkg/lib/libsasl2.so.3
-lresolv.2 => /usr/lib/libresolv.so.2
-lgcc_s.1 => /lib/libgcc_s.so.1
-lssl.10 => /usr/lib/libssl.so.10
-lcrypto.8 => /lib/libcrypto.so.8
-lcrypt.1 => /lib/libcrypt.so.1
The configure.in patch is below. Is it reasonnable to add it in pkgsrc?
--- configure.in.orig 2016-04-20 18:26:12.000000000 +0000
+++ configure.in 2016-04-20 18:27:08.000000000 +0000
@@ -288,19 +288,19 @@
AC_CHECK_LIB(dl, dlopen,[LIBS="-ldl $LIBS"],,$LIBS)
dnl AC_CHECK_LIB(db, main,[LIBS="-ldb $LIBS"],,$LIBS)
-AC_CHECK_LIB(gssapi, gss_krb5_ccache_name,[LIBS="-lgssapi $LIBS"
found_gssapi_lib=yes],,$LIBS)
-if test -z "$found_gssapi_lib"; then
- AC_CHECK_LIB(gssapi_krb5, gss_krb5_ccache_name,[LIBS="-lgssapi_krb5
$LIBS"],,$LIBS)
-fi
-
+dnl AC_CHECK_LIB(gssapi, gss_krb5_ccache_name,[LIBS="-lgssapi $LIBS"
found_gssapi_lib=yes],,$LIBS)
+dnl if test -z "$found_gssapi_lib"; then
+dnl AC_CHECK_LIB(gssapi_krb5,
gss_krb5_ccache_name,[LIBS="-lgssapi_krb5 $LIBS"],,$LIBS)
+dnl fi
+dnl
dnl Following checks probably not strictly necessary.
dnl AC_CHECK_LIB(crypto, main,[LIBS="-lcrypto $LIBS"],,$LIBS)
dnl AC_CHECK_LIB(ssl, main,[LIBS="-lssl $LIBS"],,$LIBS)
-AC_CHECK_LIB(com_err, main,[LIBS="-lcom_err $LIBS"],,$LIBS)
+dnl AC_CHECK_LIB(com_err, main,[LIBS="-lcom_err $LIBS"],,$LIBS)
dnl AC_CHECK_LIB(k5crypto, main,[LIBS="-lk5crypto $LIBS"],,$LIBS)
-AC_CHECK_LIB(krb5, main,[LIBS="-lkrb5 $LIBS"],,$LIBS)
+dnl AC_CHECK_LIB(krb5, main,[LIBS="-lkrb5 $LIBS"],,$LIBS)
dnl AC_CHECK_LIB(krb4, main,[LIBS="-lkrb4 $LIBS"],,$LIBS)
AC_CHECK_LIB(sasl2, sasl_client_init)
if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o
$with_ldap_lib = umich -o $with_ldap_lib = openldap \); then
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index