From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1KlhmV-0002a1-K4 for garchives@archives.gentoo.org; Fri, 03 Oct 2008 10:21:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E5B8EE02A9; Fri, 3 Oct 2008 10:21:05 +0000 (UTC) Received: from mta-1.ms.rz.rwth-aachen.de (mta-1.ms.rz.RWTH-Aachen.DE [134.130.7.72]) by pigeon.gentoo.org (Postfix) with ESMTP id BAA27E02A9 for ; Fri, 3 Oct 2008 10:21:05 +0000 (UTC) Received: from ironport-out-1.rz.rwth-aachen.de ([134.130.3.58]) by mta-1.ms.rz.RWTH-Aachen.de (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0K8500EYERF4K210@mta-1.ms.rz.RWTH-Aachen.de> for gentoo-user@lists.gentoo.org; Fri, 03 Oct 2008 12:21:04 +0200 (CEST) Received: from relay-2.ms.rz.rwth-aachen.de (HELO relay.rwth-aachen.de) ([134.130.7.75]) by ironport-in-1.rz.rwth-aachen.de with ESMTP; Fri, 03 Oct 2008 12:21:04 +0200 Received: from numa-i.igpm.rwth-aachen.de (numa-i.igpm.RWTH-Aachen.DE [134.130.161.252]) by relay.rwth-aachen.de (8.13.8+Sun/8.13.8/1) with ESMTP id m93AL4Ie006534; Fri, 03 Oct 2008 12:21:04 +0200 (CEST) Received: by numa-i.igpm.rwth-aachen.de (Postfix, from userid 230) id 32D5210691D; Fri, 03 Oct 2008 12:21:02 +0200 (CEST) Date: Fri, 03 Oct 2008 12:21:02 +0200 (CEST) From: Helmut Jarausch Subject: Re: [gentoo-user] "prelink" a dynamic library In-reply-to: <20081002141928.2713fd90@silencio.saunaklub> To: gentoo-user@lists.gentoo.org Cc: bzk0711@aim.com Message-id: 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=us-ascii Content-transfer-encoding: 7BIT Content-disposition: INLINE X-IronPort-AV: E=Sophos;i="4.33,356,1220220000"; d="scan'208";a="85325271" References: <20081002141928.2713fd90@silencio.saunaklub> X-Archives-Salt: caa0ece3-cee9-4cb2-9161-c0454e8d5a20 X-Archives-Hash: 665b65be66c642680b12111635c14acd On 2 Oct, bzk0711@aim.com wrote: > On Wed, 01 Oct 2008 18:53:04 +0200 (CEST) > Helmut Jarausch wrote: > >> Hi, > > Hello Helmut, > >> I want to create a shared library, say libULIB.so, >> which needs additional shared libraries, e.g. libmpfr.so and >> libgmp.so . >> >> My users only use the functions provided by libULIB.so. >> >> Is there a means to "prelink" libULIB.so, so that the libraries >> libmpfr.so and libgmp.so are not needed by the user? > > You should be able to just provide the libraries to the linker when > linking your shared object. When *running* the application, your shared > object (i.e. the loader) should transitively pull in the libs on which > yours depends. You can check those dependencies using ldd . > > Hope this helps, > Patric Thanks Patric, but unfortunately that's not what I want. In this case, these "secondary" libraries (e.g. libmpfr.so and libgmp.so) have to be present on the target machines together with an 'rpath' if they are in non-standard directories. My aim was to let the linker generate a big library which obseletes the secondary libraries. Helmut. -- Helmut Jarausch Lehrstuhl fuer Numerische Mathematik RWTH - Aachen University D 52056 Aachen, Germany