On Sat, Aug 30, 2003 at 01:54:27PM +0200, Alexander Leidinger wrote:
[...]
> I think the problem is, that some tools have a problem finding it...:
> ---snip---
> (3) [EMAIL PROTECTED] % nm -D /usr/lib/libc.so | grep fpcl
> nm: /usr/lib/libc.so: No such file or directory
> 
> (4) [EMAIL PROTECTED] % ll /usr/lib/libc.so
> lrwxr-xr-x  1 root  wheel  19B 29 Aug 13:57 /usr/lib/libc.so@ -> ../../lib/libc.so.5
> 
> (5) [EMAIL PROTECTED] % ll /usr 
> lrwxr-xr-x  1 root  wheel  7.0B 18 Aug  2001 /usr@ -> big/usr
> 
> (7) [EMAIL PROTECTED] % ll /lib/libc.so 
> lrwxr-xr-x  1 root  wheel  9.0B 29 Aug 13:57 /lib/libc.so@ -> libc.so.5
> ---snip---
> 
> I think a workaround would be to use absolute symlinks (at least as an
> option).
> 
I might be missing an obvious, but I just don't see a reason
why we should use relative linking here: we should just link
to where we really install.  With the attached patch, I get:

$ make -n install -DNOMAN DESTDIR=/foo
install -C -o root -g wheel -m 444   libalias.a /foo/usr/lib
install -s -o root -g wheel -m 444     libalias.so.4 /foo/lib
ln -fs libalias.so.4 /foo/lib/libalias.so
ln -fs /foo/lib/libalias.so.4  /foo/usr/lib/libalias.so


Cheers,
-- 
Ruslan Ermilov          Sysadmin and DBA,
[EMAIL PROTECTED]               Sunbay Software Ltd,
[EMAIL PROTECTED]               FreeBSD committer
Index: bsd.lib.mk
===================================================================
RCS file: /home/ncvs/src/share/mk/bsd.lib.mk,v
retrieving revision 1.150
diff -u -r1.150 bsd.lib.mk
--- bsd.lib.mk  17 Aug 2003 23:56:29 -0000      1.150
+++ bsd.lib.mk  30 Aug 2003 18:48:17 -0000
@@ -207,8 +207,8 @@
            ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
 .if defined(SHLIB_LINK)
        ln -fs ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIB_LINK}
-.if (${LIBDIR} != ${SHLIBDIR})
-       ln -fs ${LIBDIR:C|/[^/]+|/..|g:S|^/||}${SHLIBDIR}/${SHLIB_NAME} \
+.if ${LIBDIR} != ${SHLIBDIR}
+       ln -fs ${DESTDIR}${SHLIBDIR}/${SHLIB_NAME} \
            ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
 .endif
 .endif

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to