Date: Sat, 30 Aug 2003 21:56:53 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Gordon Tetlow <gordon@FreeBSD.org>, Alexander Leidinger <Alexander@Leidinger.net> Cc: Steve Kargl <sgk@troutmask.apl.washington.edu> Subject: Re: /lib symlinks problem? Message-ID: <20030830185653.GA10674@sunbay.com> In-Reply-To: <20030830135427.0cea7fdb.Alexander@Leidinger.net> References: <200308291454.h7TEsb913915@accms33.physik.rwth-aachen.de> <20030829172348.1aa0b5d4.Alexander@Leidinger.net> <20030829161907.GA89129@troutmask.apl.washington.edu> <20030830135427.0cea7fdb.Alexander@Leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--+xNpyl7Qekk2NvDX Content-Type: multipart/mixed; boundary="mxv5cy4qt+RJ9ypb" Content-Disposition: inline --mxv5cy4qt+RJ9ypb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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@ttyp1 % nm -D /usr/lib/libc.so | grep fpcl > nm: /usr/lib/libc.so: No such file or directory >=20 > (4) netchild@ttyp1 % ll /usr/lib/libc.so > lrwxr-xr-x 1 root wheel 19B 29 Aug 13:57 /usr/lib/libc.so@ -> ../../li= b/libc.so.5 >=20 > (5) netchild@ttyp1 % ll /usr=20 > lrwxr-xr-x 1 root wheel 7.0B 18 Aug 2001 /usr@ -> big/usr >=20 > (7) netchild@ttyp1 % ll /lib/libc.so=20 > lrwxr-xr-x 1 root wheel 9.0B 29 Aug 13:57 /lib/libc.so@ -> libc.so.5 > ---snip--- >=20 > I think a workaround would be to use absolute symlinks (at least as an > option). >=20 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=3D/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, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software Ltd, ru@FreeBSD.org FreeBSD committer --mxv5cy4qt+RJ9ypb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p 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 --mxv5cy4qt+RJ9ypb-- --+xNpyl7Qekk2NvDX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/UPN0Ukv4P6juNwoRAtQ3AJ0cxhjtAz3ULS8D96WqH4iUyLUEfACeJMwT bSv+j8EcqJA6v63t2NvsDo0= =iuk5 -----END PGP SIGNATURE----- --+xNpyl7Qekk2NvDX--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030830185653.GA10674>