From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OskPx-0003bM-Sv for garchives@archives.gentoo.org; Mon, 06 Sep 2010 22:44:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9790EE0992; Mon, 6 Sep 2010 22:43:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7AF1CE0992 for ; Mon, 6 Sep 2010 22:43:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 277511B4005 for ; Mon, 6 Sep 2010 22:43:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -2.915 X-Spam-Level: X-Spam-Status: No, score=-2.915 required=5.5 tests=[AWL=-0.316, BAYES_00=-2.599] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cIcquFkqwT5O for ; Mon, 6 Sep 2010 22:43:45 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by smtp.gentoo.org (Postfix) with ESMTP id 9FC161B4012 for ; Mon, 6 Sep 2010 22:43:44 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OskPc-0007ha-Oj for gentoo-user@gentoo.org; Tue, 07 Sep 2010 00:43:40 +0200 Received: from adsl-69-234-215-107.dsl.irvnca.pacbell.net ([69.234.215.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Sep 2010 00:43:40 +0200 Received: from w41ter by adsl-69-234-215-107.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Sep 2010 00:43:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: walt Subject: [gentoo-user] Re: Shared libraries in Gentoo Date: Mon, 06 Sep 2010 15:43:29 -0700 Message-ID: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-215-107.dsl.irvnca.pacbell.net User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0b6pre) Gecko/20100906 Thunderbird/3.2a1pre In-Reply-To: X-Archives-Salt: c0f3adf2-9a93-4f67-8eba-1053e82c82f1 X-Archives-Hash: d883b4aa03c0e54875fb17b8b5602411 On 09/06/2010 11:28 AM, Al wrote: > Hello, > > I looked into many ebuilds, but didn't come to a final conclusion yet. > I am rather confused. Welcome ;) > How does a program in Gentoo know, where to look for shared libraries? Try running "ldconfig -p", which relates to Nikos's comment about ld.so.conf. > Is this compiled into the programes by means of rpath? Are you coming from a BSD background? I know NetBSD uses rpath everywhere, and they don't use the ld.so.conf mechanism at all, but I can't recall if the others do or don't. Some gentoo packages use rpath, others don't. Use readelf -d to list the runtime needs of . For example: #readelf -d /usrlib/evolution/2.30/libevolution-mail-settings.so.0.0.0 | grep Library 0x0000000e (SONAME) Library soname: [libevolution-mail-settings.so.0] 0x0000000f (RPATH) Library rpath: [/usr/lib/evolution/2.30:/usr/lib] 0x0000001d (RUNPATH) Library runpath: [/usr/lib/evolution/2.30:/usr/lib] On the other hand: $readelf -d /lib/libm.so.6 | grep Library 0x0000000e (SONAME) Library soname: [libm.so.6] > Does this rather differ on per package basis? Apparently yes, but I get the impression that the upstream maintainers make that decision for gentoo, whereas the NetBSD devs add the needed linker flags for every package they use: "-Wl,-rpath,'$ORIGIN/../lib" (man 8 ld.so). Corrections welcomed.