From owner-freebsd-current@FreeBSD.ORG Thu Sep 4 14:10:56 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 4BF3216A4C0; Thu, 4 Sep 2003 14:10:56 -0700 (PDT) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 024A543FE5; Thu, 4 Sep 2003 14:10:53 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.9/8.12.9) with ESMTP id h84LApnW003107; Thu, 4 Sep 2003 14:10:51 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.9/8.12.9/Submit) id h84LApgk003106; Thu, 4 Sep 2003 14:10:51 -0700 (PDT) (envelope-from obrien) Date: Thu, 4 Sep 2003 14:10:50 -0700 From: "David O'Brien" To: Ruslan Ermilov Message-ID: <20030904211050.GA3035@dragon.nuxi.com> Mail-Followup-To: David O'Brien , Ruslan Ermilov , Gordon Tetlow , Peter Wemm , current@FreeBSD.org References: <200309040429.h844TBhD058678@repoman.freebsd.org> <20030904083617.GA56261@dragon.nuxi.com> <20030904092755.GD45051@sunbay.com> <20030904140129.GA61909@dragon.nuxi.com> <20030904155659.GC97732@sunbay.com> <20030904162656.GA396@dragon.nuxi.com> <20030904174100.GY695@roark.gnf.org> <20030904185839.GB4481@sunbay.com> <20030904202715.GD4481@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030904202715.GD4481@sunbay.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 5.1-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: current@FreeBSD.org cc: Peter Wemm Subject: Re: /lib/foo.so.X -> /usr/lib/foo.so X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2003 21:10:56 -0000 On Thu, Sep 04, 2003 at 11:27:15PM +0300, Ruslan Ermilov wrote: > On Thu, Sep 04, 2003 at 09:58:39PM +0300, Ruslan Ermilov wrote: > [...] > > The patch is not a problem (attached). I've been looking at > > how our friends do this. NetBSD has symlinks in /usr/lib to > > /lib, both to .so and .so.X, and their cc(1) and ld(1) don't > > look things in /lib. Linux looks things up in both /lib and > > /usr/lib, and does not have symlinks from /usr/lib to /lib. > > > There is a sad typo above: Linux *does* have symlinks from > /usr/lib to /lib, so both use /usr/lib for linking. What version of Linux are you using? SuSE Enterprise Linux 8, and Red Hat Enterprise Linux 3 both do not have symlinks for libs from /usr/lib to /lib. They use a different machanism: suse# cat /usr/lib/libc.so /* GNU ld script Use the shared library, but some functions are only in the static library, so try that secondarily. */ GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a ) > Not that I'm completely happy with introducing yet another > variable in bsd.lib.mk, but the attached patch: > > - Leaves only one set of .so symlinks in /usr/lib. > > Benefits: all other systems that use both /lib and /usr/lib > (that I've been able to test) have .so links in /usr/lib > only, and use them for linking; GCC in ports will like this > better. > > - Uses absolute paths in .so symlinks. > > Benefit: works for people who have their /usr symlinked > somewhere. A true benefit.