From owner-freebsd-current@FreeBSD.ORG Thu Sep 4 15:21:14 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 877AB16A4BF; Thu, 4 Sep 2003 15:21:14 -0700 (PDT) Received: from walton.kettenis.dyndns.org (e115144.upc-e.chello.nl [213.93.115.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2266843FE1; Thu, 4 Sep 2003 15:21:11 -0700 (PDT) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2])h84ML9dG008355; Fri, 5 Sep 2003 00:21:09 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) h84ML8WQ034369; Fri, 5 Sep 2003 00:21:08 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost)h84ML8FD034366; Fri, 5 Sep 2003 00:21:08 +0200 (CEST) Date: Fri, 5 Sep 2003 00:21:08 +0200 (CEST) Message-Id: <200309042221.h84ML8FD034366@elgar.kettenis.dyndns.org> From: Mark Kettenis To: obrien@FreeBSD.org In-reply-to: <20030904211050.GA3035@dragon.nuxi.com> (obrien@FreeBSD.org) References: <200309040429.h844TBhD058678@repoman.freebsd.org> <20030904092755.GD45051@sunbay.com> <20030904155659.GC97732@sunbay.com> <20030904174100.GY695@roark.gnf.org> <20030904211050.GA3035@dragon.nuxi.com> cc: ru@FreeBSD.org cc: current@FreeBSD.org cc: peter@FreeBSD.org Subject: Re: /lib/foo.so.X -> /usr/lib/foo.so 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: Thu, 04 Sep 2003 22:21:14 -0000 Date: Thu, 4 Sep 2003 14:10:50 -0700 From: "David O'Brien" 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 ) Speaking as a (former) glibc developer (a true convert nowadays): Well, libc is a special case since there are a few functions that aren't provided by the shared libc, but are always linked statically. Linux does this to be compatible with the System V ABI. The whole thing is actually pointless since most interfaces in libc.so aren't compatible with the System V ABI, so it's nothing but a historical fart nowadays. Anyway, I think you'll see a symlink for /usr/lib/libm.so. At least my SuSE Linux 8.2 does have it. Mark