[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).

Kurt

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) (196.36.80.164)
>
>
>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
>../../../libraries/liblber/liblber.la)
>cc -shared  accesslog.lo version.lo 
>-L/home/bgmilne/rpm/BUILD/openldap-2.3.4/libraries/liblber/.libs
>-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
>/home/bgmilne/rpm/tmp/openldap2.3-2.3.4-root/usr/lib/openldap2.3/accesslog-2.3.so.0.0.4
>(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
>/home/bgmilne/rpm/tmp/openldap2.3-2.3.4-root/usr/lib/openldap2.3/accesslog.la
>
>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):
>
>http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/contrib-SPECS/openldap2.3/openldap-2.3.4-libtool1.5.patch?rev=1.1&content-type=text/x-cvsweb-markup
>
>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.