Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Sep 2003 14:10:50 -0700
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        Peter Wemm <peter@FreeBSD.org>
Subject:   Re: /lib/foo.so.X -> /usr/lib/foo.so
Message-ID:  <20030904211050.GA3035@dragon.nuxi.com>
In-Reply-To: <20030904202715.GD4481@sunbay.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030904211050.GA3035>