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

Re: (ITS#7137) Wrong -R path for installed programs



--On Thursday, January 26, 2012 9:11 AM +0000 holm@informatik.umu.se wrote:

> --On 25 januari 2012 13.47.34 -0800 Quanah Gibson-Mount
> <quanah@zimbra.com> wrote:

> I handle OpenLDAP the same way as all other software. This is basically
> what I do:
>
> cd OpenLDAPsources
> mkdir builddir
> cd builddir
> env CFLAGS="-O2" \
> ../configure \
> --prefix=/opt/OpenLDAP \
> --enable-shared \
> --disable-static \
> --sysconfdir=/var/conf \
> --localstatedir=/var/conf/openldap/var \
> --disable-hdb \
> --disable-monitor \
> --enable-rlookups \
> --enable-accesslog \
> --enable-modules
> make
> make install
>
> Everything is installed in the right place but the rpath is wrong.
> One interesting thing. The executables are not created in the .libs
> direcotrys and they are not relinked at install. The .libs directorys
> are created but not used. The libraries, on the other hand, ARE
> created in the .libs directorys and relinked at install time.

There is something wrong in what you're doing, I don't know where.  I built 
using a builddir (since I don't usually, but you did), and it worked 
correctly for me.  Note that my dependancy libs are all also in their own 
dirs, so I have to specify how to link to them in configure/make, but I do 
not tell it where to link to for finding the OpenLDAP libs:

 LD_LIBRARY_PATH=/opt/zimbra/openssl/lib:/opt/zimbra/bdb/lib:/opt/zimbra/cyru
s-sasl/lib:/opt/zimbra/libtool/lib 
LDFLAGS="-L/opt/zimbra/openssl/lib -L/opt/zimbra/bdb/lib 
-L/opt/zimbra/cyrus-sasl/lib -L/opt/zimbra/libtool/lib 
-R/opt/zimbra/openssl/lib -R/opt/zimbra/bdb/lib -R/opt/zimbra/libtool/lib 
-R/opt/zimbra/cyrus-sasl/lib" CPPFLAGS="-I/opt/zimbra/bdb/include 
-I/opt/zimbra/cyrus-sasl/include -I/opt/zimbra/openssl/include 
-I/opt/zimbra/libtool/include" CFLAGS="-g -O0" ../configure 
--prefix=/opt/zimbra/openldap-2.4.28-linktest --with-cyrus-sasl 
--with-tls=openssl --enable-dynamic --enable-slapd --enable-modules 
--enable-backends=mod --disable-shell --disable-sql --disable-bdb 
--disable-ndb --enable-overlays=mod --enable-debug --enable-spasswd 
--enable-crypt

LD_RUN_PATH=/opt/zimbra/openssl/lib:/opt/zimbra/bdb/lib:/opt/zimbra/cyrus-sasl/lib:/opt/zimbra/libtool/lib 
make depend

LD_RUN_PATH=/opt/zimbra/openssl/lib:/opt/zimbra/bdb/lib:/opt/zimbra/cyrus-sasl/lib:/opt/zimbra/libtool/lib 
make -j2

LD_RUN_PATH=/opt/zimbra/openssl/lib:/opt/zimbra/bdb/lib:/opt/zimbra/cyrus-sasl/lib:/opt/zimbra/libtool/lib 
make prefix=/opt/zimbra/openldap-2.4.28-linktest install strip=""

[build@zre-rhel6-64 builddir]$ cd /opt/zimbra/openldap-2.4.28-linktest/bin/
[build@zre-rhel6-64 bin]$ ldd ldapsearch
        linux-vdso.so.1 =>  (0x00007fffa99ff000)
        libldap-2.4.so.2 => 
/opt/zimbra/openldap-2.4.28-linktest/lib/libldap-2.4.so.2 
(0x00007f780f6cd000)
        liblber-2.4.so.2 => 
/opt/zimbra/openldap-2.4.28-linktest/lib/liblber-2.4.so.2 
(0x00007f780f4bc000)
        libsasl2.so.2 => /opt/zimbra/cyrus-sasl-2.1.25.4z/lib/libsasl2.so.2 
(0x00007f780f2a1000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003000e00000)
        libssl.so.1.0.0 => /opt/zimbra/openssl/lib/libssl.so.1.0.0 
(0x00007f780f03b000)
        libcrypto.so.1.0.0 => /opt/zimbra/openssl/lib/libcrypto.so.1.0.0 
(0x00007f780ec8b000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003003e00000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003003200000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003001200000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003000a00000)
        libfreebl3.so => /lib64/libfreebl3.so (0x0000003004200000)


--Quanah

--

Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration