[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#3928) Libtool relinks overlays with bad library paths during install target

The provided patch does nothing to upgrade ltmain.sh and,
more importantly, configure.in and *.m4 files, to support
a more modern libtool version.  Hence, the patch cannot
be accepted.

However, this ITS can remain open as a request to upgrade
the build environment to support a more modern libtool
version.  Unfornutely, that is not all that easy (otherwise
it would have been done long ago).


At 07:34 AM 8/10/2005, bgmilne@mandriva.org wrote:
>Full_Name: Buchan Milne
>Version: 2.3.4
>OS: Linux
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (
>During 'make', libtool correctly links all libraries/binaries/plugins to the
>libraries in the build directory, however during 'make install', libtool
>re-links the overlays without ensuring that the library build paths are first in
>the link paths, for example:
>libtool: install: warning: relinking `accesslog.la'
>(cd /home/bgmilne/rpm/BUILD/openldap-2.3.4/servers/slapd/overlays; /bin/sh
>/home/bgmilne/rpm/BUILD/openldap-2.3.4/libtool --mode=relink cc -O2 -g -pipe
>-march=i386 -mcpu=i686 -fno-omit-frame-pointer -L/usr/kerberos/lib
>-L/home/bgmilne/rpm/BUILD/openldap-2.3.4/db-instroot//usr/lib -release 2.3
>-version-info 0:4:0 -rpath /usr/lib/openldap2.3 -module -o accesslog.la
>accesslog.lo version.lo ../../../libraries/libldap_r/libldap_r.la
>cc -shared  accesslog.lo version.lo 
>-L/usr/kerberos/lib -L/home/bgmilne/rpm/BUILD/openldap-2.3.4/db-instroot//usr/lib
>-L/usr/lib -L../../../libraries/libldap_r/.libs -lldap_r
>-L../../../libraries/liblber/.libs -llber    -Wl,-soname -Wl,accesslog-2.3.so.0
>-o .libs/accesslog-2.3.so.0.0.4
>../../../build/shtool install -c -m 755 .libs/accesslog-2.3.so.0.0.4T
>(cd /home/bgmilne/rpm/tmp/openldap2.3-2.3.4-root/usr/lib/openldap2.3 && rm -f
>accesslog-2.3.so.0 && ln -s accesslog-2.3.so.0.0.4 accesslog-2.3.so.0)
>(cd /home/bgmilne/rpm/tmp/openldap2.3-2.3.4-root/usr/lib/openldap2.3 && rm -f
>accesslog.so && ln -s accesslog-2.3.so.0.0.4 accesslog.so)
>../../../build/shtool install -c -m 755 .libs/accesslog.lai
>Since the cc invocation has -L/usr/lib before
>-L../../../libraries/libldap_r/.libs and -L../../../libraries/liblber/.libs, if
>a -lldap or -llber is present in /usr/lib,  the overlays end up being linked to
>the installed version, whereas slapd is linked to the just-compiled version:
>$ rpm2cpio ../rpm/rh/RPMS.rh3/i386/openldap2.3-servers-2.3.4-1.1.3E.i386.rpm
>|cpio -id
>6361 blocks
>$ ldd usr/lib/openldap2.3/accesslog-2.3.so.0.0.4 |grep -E "(ldap|lber)"
>        libldap_r.so.2 => /usr/lib/libldap_r.so.2 (0xb7fb5000)
>        liblber-2.3.so.0 => not found
>        liblber.so.2 => /usr/lib/liblber.so.2 (0xb7e71000)
>$ ldd usr/sbin/slapd2.3 |grep -E "(ldap|lber)"
>        libldap_r-2.3.so.0 => not found
>        liblber-2.3.so.0 => not found
>Our autotools expert says this is due to an outdated and patched libtool. In
>Mandriva we've fixed it by updating libtool (to 1.5):
>But, it would be nice if building the latest available openldap version didn't
>require removing older versions of the development library that may be required
>to build other software.