On 12/22/06, Fabian Groffen <[EMAIL PROTECTED]> wrote:
Hi Matt,
I don't completely get the issue at hand, but from what you tell, I get
the suspicion that the rpath used during linking is the WORKDIR, and not
the real prefix location itself. This causes the right lib not to be
found after install.
hmmm "eu-readelf -d path/to/libldap..." reports that the rpath is
/opt/prefix/usr/lib ....
Maybe I didn't make myself clear. When I run ldd on the libraries
(libldap and libldap_r) from the workdir it reports linking to the
correct liblber. When I run ldd on the libraries in ${D} or those
that are in the prefix they link to the system liblber.
Here's the log of what happens when (one of the libraries, libldap_r)
it gets installed::
Entering subdirectory libldap_r
make[2]: Entering directory
`/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/work/openldap-2.3.27/libraries/libldap_r'
...
cc -shared .libs/threads.o .libs/rdwr.o .libs/tpool.o .libs/rq.o
.libs/thr_posix.o .libs/thr_cthreads.o .libs/thr_thr.o .libs/thr_lwp.o
.libs/thr_nt.o .libs/thr_pth.o .libs/thr_stub.o .libs/thr_debug.o .libs/bind.o
.libs/open.o .libs/result.o .libs/error.o .libs/compare.o .libs/search.o
.libs/controls.o .libs/messages.o .libs/references.o .libs/extended.o
.libs/cyrus.o .libs/modify.o .libs/add.o
.libs/modrdn.o .libs/delete.o .libs/abandon.o .libs/sasl.o .libs/sbind.o
.libs/kbind.o .libs/unbind.o .libs/cancel.o .libs/filter.o .libs/free.o
.libs/sort.o .libs/passwd.o .libs/whoami.o .libs/getdn.o .libs/getentry.o
.libs/getattr.o .libs/getvalues.o .libs/addentry.o .libs/request.o
.libs/os-ip.o .libs/url.o .libs/sortctrl.o .libs/vlvctrl.o .libs/init.o
.libs/options.o .libs/print.o .libs/string.o .libs/util-int.o .libs/schema.o
.libs/charray.o .libs/tls.o .libs/os-local.o
.libs/dnssrv.o .libs/utf-8.o .libs/utf-8-conv.o .libs/turn.o .libs/groupings.o
.libs/txn.o .libs/ppolicy.o .libs/version.o -Wl,--rpath
-Wl,/opt/prefix/usr/lib -L/opt/prefix/lib -L/opt/prefix/usr/lib
-L/opt/prefix/usr/local/lib -L/opt/prefix/usr/X11/lib
-L/opt/prefix/usr/X11R6/lib -L/lib -L/usr/lib -L/usr/local/lib
-L/usr/X11/lib -L/usr/X11R6/lib
-L/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib
-llber -lresolv
-lssl -lcrypto -Wl,-soname -Wl,libldap_r-2.3.so.0 -o
.libs/libldap_r-2.3.so.0.2.15
../../build/shtool install -c -m 644 .libs/libldap_r-2.3.so.0.2.15T
/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib/libldap_r-2.3.so.0.2.15
(cd
/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib
&& { ln -s -f libldap_r-2.3.so.0.2.15 libldap_r-2.3.so.0 || { rm -f
libldap_r-2.3.so.0 && ln -s libldap_r-2.3.so.0.2.15 libldap_r-2.3.so.0; }; })
(cd
/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib
&& { ln -s -f libldap_r-2.3.so.0.2.15 libldap_r.so || { rm -f libldap_r.so &&
ln -s libldap_r-2.3.so.0.2.15 libldap_r.so; }; })
../../build/shtool install -c -m 644 .libs/libldap_r.lai
/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib/libldap_r.la
../../build/shtool install -c -m 644 .libs/libldap_r.a
/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib/libldap_r.a
ranlib
/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib/libldap_r.a
chmod 644
/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib/libldap_r.a
libtool: install: warning: remember to run `libtool --finish
/opt/prefix/usr/lib'
/bin/sh ../..//libtool --mode=finish
/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib
PATH="$PATH:/sbin" ldconfig -n
/opt/prefix/var/tmp/portage/openldap-2.3.27-r3/image//opt/prefix/usr/lib
I think this last command ldconfig is messing things up.
I'm quite sure the new linker setup as Michael (haubi) has experimented
with on Solaris will solve this, as the correct rpath is also passed
on to ld.
If you want to try it out, replace your ld with a script that calls the
real ld with the rpaths for your prefix and see if that does work.
Ok, I'll go through haubi's linking emails and try out the suggestion
to see what happens.
thanks
--
[EMAIL PROTECTED] mailing list