From: Robert Künnemann Date: Mon, 19 Oct 2015 11:53:21 +0000 (+0200) Subject: [bug] Python bindings fail to load shared libraries in MacOS El Capitan X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=34748e14291cdc3ac93f310a3aa2a6680de59de6;p=notmuch-archives.git [bug] Python bindings fail to load shared libraries in MacOS El Capitan --- diff --git a/3b/cdb9ba9aea5bc663681c19b235ecd3e98b31c9 b/3b/cdb9ba9aea5bc663681c19b235ecd3e98b31c9 new file mode 100644 index 000000000..6cf311f14 --- /dev/null +++ b/3b/cdb9ba9aea5bc663681c19b235ecd3e98b31c9 @@ -0,0 +1,95 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id DB15E6DE0AD1 + for ; Mon, 19 Oct 2015 05:13:12 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id GVL1ZQ7a-2Wc for ; + Mon, 19 Oct 2015 05:13:10 -0700 (PDT) +X-Greylist: delayed 1179 seconds by postgrey-1.35 at arlo; + Mon, 19 Oct 2015 05:13:10 PDT +Received: from wp251.webpack.hosteurope.de (wp251.webpack.hosteurope.de + [80.237.133.20]) + by arlo.cworth.org (Postfix) with ESMTPS id 0A9606DE0948 + for ; Mon, 19 Oct 2015 05:13:09 -0700 (PDT) +Received: from sito2_224.sit.fraunhofer.de ([141.12.67.224] helo=localhost); + authenticated + by wp251.webpack.hosteurope.de running ExIM with esmtpsa + (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) + id 1Zo90E-0000s6-OC; Mon, 19 Oct 2015 13:53:22 +0200 +Date: Mon, 19 Oct 2015 13:53:21 +0200 +From: Robert =?iso-8859-1?Q?K=FCnnemann?= +To: notmuch@notmuchmail.org +Subject: [bug] Python bindings fail to load shared libraries in MacOS El + Capitan +Message-ID: <20151019115321.GA74194@pc-kuennemann.sit.fraunhofer.de> +MIME-Version: 1.0 +Content-Type: text/plain; charset=iso-8859-1; format=flowed +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +User-Agent: Mutt/1.5.23.1 (2014-03-12) +X-bounce-key: webpack.hosteurope.de;robert@kunnemann.de;1445256790;115daa66; +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Mon, 19 Oct 2015 12:13:13 -0000 + +Hi! + +The python bindings fail to load libnotmuch with the new version of +MacOS X (10.11). Running "afew", a tagger written in Python gives: + +Traceback (most recent call last): + File "/usr/local/Cellar/afew/HEAD/libexec/bin/afew", line 9, in + load_entry_point('afew==0.0.0', 'console_scripts', 'afew')() + File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 356, in load_entry_point + """Return `name` entry point of `group` for `dist` or raise ImportError""" + File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 2476, in load_entry_point + except ValueError: + File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 2190, in load + parse_map = classmethod(parse_map) + File "/Library/Python/2.7/site-packages/afew-0.0.0-py2.7.egg/afew/commands.py", line 27, in + from afew.Database import Database + File "/Library/Python/2.7/site-packages/afew-0.0.0-py2.7.egg/afew/Database.py", line 23, in + import notmuch + File "/usr/local/lib/python2.7/site-packages/notmuch/__init__.py", line 54, in + from .database import Database + File "/usr/local/lib/python2.7/site-packages/notmuch/database.py", line 24, in + from .globals import ( + File "/usr/local/lib/python2.7/site-packages/notmuch/globals.py", line 32, in + raise ImportError("Could not find shared 'notmuch' library.") +ImportError: Could not find shared 'notmuch' library. + +Setting DYLD_FALLBACK_LIBRARY_PATH to /usr/local/lib (where +libnotmuch4.dylib resides) did not help. + +As Eric Wang's response in this thread suggested +http://stackoverflow.com/questions/32905322/oserror-dlopenlibsystem-dylib-6-image-not-found +I've substituted + +nmlib = CDLL("libnotmuch.so.{0:s}".format(SOVERSION)) + +in globals.py + +nmlib = CDLL("/usr/local/lib/libnotmuch.{0:s}.dylib".format(SOVERSION)) + +This resolved the problem for me. + +With kind regards, Robert Künnemann