From owner-freebsd-questions@FreeBSD.ORG Fri Jul 11 13:29:18 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B2CB106564A for ; Fri, 11 Jul 2008 13:29:18 +0000 (UTC) (envelope-from raghu@mri.ernet.in) Received: from hrimail.hri.res.in (hrimail.hri.res.in [210.212.50.7]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE3A8FC23 for ; Fri, 11 Jul 2008 13:29:17 +0000 (UTC) (envelope-from raghu@mri.ernet.in) Received: from ipc2.mri.ernet.in (unknown [192.168.3.2]) by hrimail.hri.res.in (Postfix) with ESMTP id 64C3997EF6; Fri, 11 Jul 2008 19:06:15 +0530 (IST) Received: from ipc2 (localhost [127.0.0.1]) by ipc2 (Postfix) with SMTP id AE9841C8B4; Fri, 11 Jul 2008 18:59:06 +0530 (IST) Received: from riemann.mri.ernet.in (riemann.mri.ernet.in [192.168.3.122]) by ipc2.mri.ernet.in (Postfix) with ESMTP id 8EC85155F7; Fri, 11 Jul 2008 18:59:06 +0530 (IST) Received: from riemann.mri.ernet.in (localhost [127.0.0.1]) by riemann.mri.ernet.in (8.13.6/8.13.6) with ESMTP id m6BDMd6U057935; Fri, 11 Jul 2008 18:52:39 +0530 (IST) (envelope-from raghu@riemann.mri.ernet.in) Received: (from raghu@localhost) by riemann.mri.ernet.in (8.13.6/8.13.6/Submit) id m6BDMaGS057934; Fri, 11 Jul 2008 18:52:36 +0530 (IST) (envelope-from raghu) From: "N. Raghavendra" To: unga888@yahoo.com In-Reply-To: <115118.71641.qm@web57010.mail.re3.yahoo.com> (Unga's message of "Fri, 11 Jul 2008 02:18:21 -0700 (PDT)") References: <115118.71641.qm@web57010.mail.re3.yahoo.com> X-Organization: Harish-Chandra Research Institute (HRI) X-Address: Chhatnag Road, Jhusi, Allahabad 211 019, India X-URL: http://www.mri.ernet.in/ and http://www.retrotexts.net/ X-Phone: +91 (532) 2667 509, 2667 318, 2667 578, 2567 746, 2567 747 X-Fax: +91 (532) 2667 576, 2567 748, 2567 444, 2568 036 X-OpenPGP-Key-ID: 0x03618806 X-OpenPGP-Key-Fingerprint: C75D D0AF 457E 7454 BEC2 37AD C6E1 0407 0361 8806 X-OpenPGP-Public-Key-Available-At: http://www.keyserver.net/ Date: Fri, 11 Jul 2008 18:52:36 +0530 Message-ID: <864p6wzhb7.fsf@riemann.mri.ernet.in> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Library mapping question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "N. Raghavendra" List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2008 13:29:18 -0000 At 2008-07-11T02:18:21-07:00, Unga wrote: > [/usr/bin/app2/] > libXXX.so /usr/local/lib/libXXX.so > > Now when run app2 it does not say anymore "undefined references" but > it says "Shared object "/usr/local/lib/libXXX.so" not found" > > ls -l /usr/local/lib/libXXX.so shows its there. > > Is /etc/libmap.conf specification correct? In all the examples I've seen, the "mapping" entries in libmap.conf(5), i.e., the ones in the second column, are relative to the search path for libraries. Further, it is better to use only the basename of the executable in the constraint of the mapping --- the part enclosed by square brackets. So, the following may work: cd /usr/local/lib && ln -s libXXX.so libFOO.so to distinguish it from the one in `/usr/lib', which directory comes earlier in the search path. Then, append these two lines to `/etc/libmap.conf': [app2] libXXX.so libFOO.so HTH, Raghavendra. -- N. Raghavendra | http://www.retrotexts.net/ Harish-Chandra Research Institute | http://www.mri.ernet.in/ See message headers for contact and OpenPGP information.