From owner-freebsd-current@FreeBSD.ORG Sat Aug 30 11:57:12 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7985B16A4BF; Sat, 30 Aug 2003 11:57:12 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 196C043F85; Sat, 30 Aug 2003 11:57:04 -0700 (PDT) (envelope-from ru@sunbay.com) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h7UIuv86012425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Aug 2003 21:56:59 +0300 (EEST) (envelope-from ru@sunbay.com) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h7UIurc2012416; Sat, 30 Aug 2003 21:56:53 +0300 (EEST) (envelope-from ru) Date: Sat, 30 Aug 2003 21:56:53 +0300 From: Ruslan Ermilov To: Gordon Tetlow , Alexander Leidinger Message-ID: <20030830185653.GA10674@sunbay.com> References: <200308291454.h7TEsb913915@accms33.physik.rwth-aachen.de> <20030829172348.1aa0b5d4.Alexander@Leidinger.net> <20030829161907.GA89129@troutmask.apl.washington.edu> <20030830135427.0cea7fdb.Alexander@Leidinger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+xNpyl7Qekk2NvDX" Content-Disposition: inline In-Reply-To: <20030830135427.0cea7fdb.Alexander@Leidinger.net> User-Agent: Mutt/1.5.4i cc: Christoph Kukulies cc: current@FreeBSD.org cc: Steve Kargl Subject: Re: /lib symlinks problem? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 18:57:12 -0000 --+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--