From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51712 invoked by alias); 11 Jun 2019 19:57:12 -0000 Mailing-List: contact libc-help-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: libc-help-owner@sourceware.org Received: (qmail 51690 invoked by uid 89); 11 Jun 2019 19:57:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=bionic, Bionic X-HELO: mail-it1-f175.google.com Received: from mail-it1-f175.google.com (HELO mail-it1-f175.google.com) (209.85.166.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Jun 2019 19:57:11 +0000 Received: by mail-it1-f175.google.com with SMTP id j204so6818258ite.4; Tue, 11 Jun 2019 12:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=iURvtlGhmjvgKpRY89lQcOyiL2P4Zvm7W31KQBnBVro=; b=n/FQoVGd/i5F87K1SeMx+ccQDAzPVRJphj8gEfjIhK++GnWVX7GR9Ha9CXX7/foPWz bUJtpS8AN/2od3xhPZPiSF65IozGcZSf0XeXFQ5M0J5+1/Z1DVCnkRCMVd8DoDSbrFNL evMwpOVPYYUAdXdFyCJqwopR5iDdJSL6XaiwUwG6m2pyaHWsPxGxT9GXd7gR4BzwJ79+ PlzitKJzvlO7s42msf0ak7mzLgQwwJiyxgshD2Mxe3aQLSR/TahNRyM443h1Gv4xt6l/ GijqbteQjYrrkrAI9ugEHuNNeLwZRpCrDmBZt09J+1u0r3PV7xuSlNqtH3PMjib8gnZE h2tQ== MIME-Version: 1.0 References: In-Reply-To: Reply-To: noloader@gmail.com From: Jeffrey Walton Date: Tue, 11 Jun 2019 19:57:00 -0000 Message-ID: Subject: Re: How to set a system-wide library path policy? To: "Carlos O'Donell" Cc: Binutils , libc-help Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00011.txt.bz2 On Sun, Jun 9, 2019 at 5:34 PM Jeffrey Walton wrote: > > On Fri, Jun 7, 2019 at 4:46 PM Carlos O'Donell wrote: > > > > On 6/7/19 10:53 AM, Jeffrey Walton wrote: > > > I'm having trouble figuring out how to setup library path policy on Fedora 29. > > > > The system loader is in glibc. Adding libc-help to the CC. > > > > > I need to articulate to the system loader: > > > > > > 1. programs in /bin must only link to libs in /lib64 > > > 2. programs in /usr/bin must only link to libs in /usr/lib64 > > > 3. programs in /usr/local/bin may use libraries in /usr/local/lib64 or > > > /usr/lib64 > > > > OK. > > > > > As far as I know, the distro supplies (1) and (2). They know nothing > > > about my libraries in /usr/local. When the distro is ready, it will > > > push updated programs and libraries as needed. The distro binaries > > > should not use my libraries. > > > > Why would your distro binaries use your libraries? Such libraries are > > not present at static link time when they are built in the Feodra builders. > > > > The only reason your distro libraries would be used is if you used > > LD_LIBRARY_PATH that pointed to them, in which case you would be altering > > the global search order. > > Thanks Carlos, > > Here is a Solaris example because I'm updating Git for the 2.20.0 > release. Linux behaves the same way as Solaris, so there' no material > difference here. > ... Here's a Ubuntu Bionic Aarch64 example when running apt-get. The stuff in /usr/local was built for GnuTLS testing. Guile 2.2 was built from sources: Calculating upgrade... Done The following packages will be upgraded: dbus dbus-x11 libdbus-1-3 libglib2.0-0 libglib2.0-data libpython2.7 libpython2.7-minimal libpython2.7-stdlib libpython3.6 libpython3.6-minimal libpython3.6-stdlib libssl-dev libssl1.1 openssl python2.7 python2.7-minimal python3.6 python3.6-minimal vim vim-common vim-runtime vim-tiny xxd ... Processing triggers for libc-bin (2.27-3ubuntu1) ... /sbin/ldconfig.real: /usr/local/lib/libguile-2.2.so.1.3.1-gdb.scm is not an ELF file - it has the wrong magic bytes at the start. ... Jeff