From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 9 Apr 2013 15:21:28 +0000 (+0200) Subject: Re: [RFC/PATCH] python: search parent lib directory for libnotmuch.so X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=65b471e44400a75a6be14cd6136ccf5ab37af9d5;p=notmuch-archives.git Re: [RFC/PATCH] python: search parent lib directory for libnotmuch.so --- diff --git a/05/d5bfa3dfa170f8f23c76feb143b16ac15e3d0d b/05/d5bfa3dfa170f8f23c76feb143b16ac15e3d0d new file mode 100644 index 000000000..5aa88a540 --- /dev/null +++ b/05/d5bfa3dfa170f8f23c76feb143b16ac15e3d0d @@ -0,0 +1,106 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 36C9F431FBC + for ; Tue, 9 Apr 2013 08:21:41 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id YpBqRXIZyNcm for ; + Tue, 9 Apr 2013 08:21:37 -0700 (PDT) +Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68]) + (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 3B5DC431FAE + for ; Tue, 9 Apr 2013 08:21:37 -0700 (PDT) +Received: from mail.jade-hamburg.de (mail.jade-hamburg.de [85.183.11.228]) + (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by mail.cryptobitch.de (Postfix) with ESMTPSA id C7F4961EFE6 + for ; Tue, 9 Apr 2013 17:21:32 +0200 (CEST) +Received: by mail.jade-hamburg.de (Postfix, from userid 401) + id 359B3DF2A3; Tue, 9 Apr 2013 17:21:31 +0200 (CEST) +Received: from thinkbox.jade-hamburg.de (cryptobitch.de [88.198.7.68]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) (Authenticated sender: teythoon) + by mail.jade-hamburg.de (Postfix) with ESMTPSA id 6AE3ADF28B; + Tue, 9 Apr 2013 17:21:29 +0200 (CEST) +Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.80) + (envelope-from ) + id 1UPaMS-0005b2-5b; Tue, 09 Apr 2013 17:21:28 +0200 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +To: Jed Brown , notmuch@notmuchmail.org +From: Justus Winter <4winter@informatik.uni-hamburg.de> +In-Reply-To: <87obdn7nwe.fsf@mcs.anl.gov> +References: <1365475646-22926-1-git-send-email-jed@59A2.org> + <20130409141333.7736.41695@thinkbox.jade-hamburg.de> + <87obdn7nwe.fsf@mcs.anl.gov> +Message-ID: <20130409152128.7736.76003@thinkbox.jade-hamburg.de> +User-Agent: alot/0.3.3+ +Subject: Re: [RFC/PATCH] python: search parent lib directory for libnotmuch.so +Date: Tue, 09 Apr 2013 17:21:28 +0200 +Cc: Sebastian Spaeth +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 09 Apr 2013 15:21:41 -0000 + +Quoting Jed Brown (2013-04-09 16:57:05) +> Justus Winter <4winter@informatik.uni-hamburg.de> writes: +> > +> > May I ask why you cannot use LD_LIBRARY_PATH? I too install libnotmuch +> > to a non-standard location as unprivileged user and to make this +> > library available I add its path to LD_LIBRARY_PATH. = + +> = + +> See libdir_in_ldconfig testing in configure: we make a significant +> effort to set RPATH appropriately when installing to a location that is +> not already searched (perhaps via LD_LIBRARY_PATH). This currently does +> not apply to the Python bindings, so while you can install without +> LD_LIBRARY_PATH and still run the notmuch executable fine, you must set +> LD_LIBRARY_PATH to use the Python bindings. That is the inconsistency I +> wanted to fix here. + +But why do we do that? I always thought that rpath causes more +problems and is to be avoided if possible [0]. But otoh, I didn't even +knew that the notmuch build system uses rpath. + +0: e.g. http://wiki.debian.org/RpathIssue + +> I don't like the indirection either, but the binary is compiled with +> knowledge of prefix/RPATH, so if we wanted a single canonical location +> to specify this information, I would make it the binary. +> = + +> If you don't want to trust Python install directory hierarchy, we could +> have 'setup.py install' write some info about RPATH. + +I actually have no strong feelings for or against this proposal. I'm +merely surprised that there is an issue that you are trying to fix +here since exactly this configuration has worked for me since the day +I started using notmuch. + +And from my point of view LD_LIBRARY_PATH is the correct way to +instruct the dynamic linker (and as a similar facility the ctypes +library loader) where to look for additional libraries. + +Cheers, +Justus