From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21948 invoked by alias); 3 Mar 2010 09:21:24 -0000 Received: (qmail 21918 invoked by uid 22791); 3 Mar 2010 09:21:22 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Mar 2010 09:21:16 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o239KpaH024812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Mar 2010 04:20:51 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o239KmlK027092 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Mar 2010 04:20:51 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o239KmGK024900; Wed, 3 Mar 2010 10:20:48 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o239Klr8024896; Wed, 3 Mar 2010 10:20:47 +0100 Date: Wed, 03 Mar 2010 09:21:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: Michael Snyder , "gdb@sourceware.org" Subject: Re: python config question Message-ID: <20100303092047.GA24396@host0.dyn.jankratochvil.net> References: <4B8C5DD4.1070501@vmware.com> <20100302052219.GF2850@adacore.com> <4B8D54E1.7030003@vmware.com> <20100303045039.GB15364@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100303045039.GB15364@adacore.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00005.txt.bz2 On Wed, 03 Mar 2010 05:50:39 +0100, Joel Brobecker wrote: > > Maybe the configure option should include rpath? > > It could. We're touching at something that is very platform-dependent, > though - perhaps you want to look at using libtool (although I'll admit > to a severe aversion to this tool, probably unjustified). If I were in > your position, I might consider linking statically against libpython. > At AdaCore, the plan is to use LD_LIBRARY_PATH, which we'll have to do, > since customers are free to install the binary package wherever they > want (hence preventing rpath from working). IIUC you ship libpython*.so.* libraries bundled with the shipped gdb. Isn't ld.so's $ORIGIN useful? $ORIGIN and rpath ld.so understands the string $ORIGIN (or equivalently ${ORIGIN}) in an rpath specification (DT_RPATH or DT_RUNPATH) to mean the directory containing the application executable. Thus, an application located in somedir/app could be compiled with gcc -Wl,-rpath,'$ORIGIN/../lib' so that it finds an associated shared library in somedir/lib no matter where somedir is located in the directory hierarchy. This facilitates the creation of "turn-key" applications that do not need to be installed into special directories, but can instead be unpacked into any directory and still find their own shared libraries. Regards, Jan