/lib symlinks problem?
Ruslan Ermilov
ru at FreeBSD.org
Sat Aug 30 11:57:12 PDT 2003
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) netchild at ttyp1 % nm -D /usr/lib/libc.so | grep fpcl
> nm: /usr/lib/libc.so: No such file or directory
>
> (4) netchild at ttyp1 % 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) netchild at ttyp1 % ll /usr
> lrwxr-xr-x 1 root wheel 7.0B 18 Aug 2001 /usr@ -> big/usr
>
> (7) netchild at ttyp1 % 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,
ru at sunbay.com Sunbay Software Ltd,
ru at FreeBSD.org FreeBSD committer
-------------- next part --------------
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20030830/94bb6494/attachment.bin
More information about the freebsd-current
mailing list