--- /dev/null
+Return-Path: <jlmuir@imca.aps.anl.gov>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 1738A431FB6\r
+ for <notmuch@notmuchmail.org>; Fri, 5 Sep 2014 05:47:16 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id NrDoXns8A7Tt for <notmuch@notmuchmail.org>;\r
+ Fri, 5 Sep 2014 05:47:08 -0700 (PDT)\r
+Received: from tuna.imca.aps.anl.gov (tuna.imca.aps.anl.gov [164.54.200.33])\r
+ by olra.theworths.org (Postfix) with ESMTP id 395A2431FAF\r
+ for <notmuch@notmuchmail.org>; Fri, 5 Sep 2014 05:47:08 -0700 (PDT)\r
+Received: from bass.imca.aps.anl.gov (bass.imca.aps.anl.gov [164.54.200.38])\r
+ by tuna.imca.aps.anl.gov (Postfix) with SMTP id 019442005F\r
+ for <notmuch@notmuchmail.org>; Fri, 5 Sep 2014 07:47:05 -0500 (CDT)\r
+Received: (qmail 9258 invoked by uid 502); 5 Sep 2014 12:47:05 -0000\r
+Date: Fri, 5 Sep 2014 07:47:05 -0500\r
+From: "J. Lewis Muir" <jlmuir@imca-cat.org>\r
+To: David Bremner <david@tethera.net>\r
+Subject: Re: BUG: bad notmuch shared library install_name on Mac OS X\r
+Message-ID: <20140905124705.GA9173@bass.imca.aps.anl.gov>\r
+References: <54089FBC.20404@imca-cat.org>\r
+ <87wq9jtawy.fsf@maritornes.cs.unb.ca>\r
+Mime-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87wq9jtawy.fsf@maritornes.cs.unb.ca>\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 05 Sep 2014 12:47:16 -0000\r
+\r
+On 9/4/14, 2:58 PM, David Bremner wrote:\r
+> "J. Lewis Muir" <jlmuir@imca-cat.org> writes:\r
+> \r
+>> Hello.\r
+>>\r
+>> I submitted a patch [1] to fix a bug in how the notmuch shared\r
+>> library is built on Mac OS X, but perhaps it's not clear it fixes a\r
+>> bug, so I wanted to just request it be tagged as a bug for nmbug.\r
+> \r
+> Done, at least twice (waves to Jani). \r
+\r
+Hi, David.\r
+\r
+Great! Thanks!\r
+\r
+> The usual problem we have with OS/X patches is finding somebody to\r
+> review them.\r
+\r
+OK. I guess I can't help there, but the commit message does give short\r
+instructions for how to reproduce the problem, so hopefully someone will\r
+be able to review it.\r
+\r
+> It's a little surprising to me that it was completely\r
+> broken before, since there have been people using notmuch on OS/X.\r
+\r
+Right. I wonder if most people using notmuch on Mac OS X do so via\r
+Homebrew or MacPorts. In this case, they would never encounter the\r
+problem because notmuch has already been packaged for them.\r
+\r
+Both Homebrew and MacPorts address the problem but in different ways.\r
+Homebrew uses install_name_tool to correct the install_name on the\r
+shared library post install. Homebrew actually does this automatically\r
+for all libraries (i.e. via fix_install_names) [1][2], so even the\r
+package maintainer might never see the problem, and the formula has no\r
+patch or indication of a needed install_name fix [3].\r
+\r
+I don't think MacPorts automatically fixes install_name problems, hence\r
+its notmuch port does apply a patch [4][5] that is exactly the same as\r
+what I submitted.\r
+\r
+I checked Fink, but it does not appear to have a notmuch package.\r
+\r
+Personally, I use Pkgsrc, and it did not have this patch for its notmuch\r
+package, but I submitted it, and it has recently been committed to the\r
+-current tree [6].\r
+\r
+Another possibility is that people running notmuch on Mac OS X may set\r
+DYLD_LIBRARY_PATH [7] in their environment to point to where their\r
+libraries are installed. If this contains the path where the notmuch\r
+shared library is installed, then the notmuch binary would be able to\r
+find the notmuch shared library even if its install_name is not a full\r
+path. But this should definitely not be a requirement for running a\r
+program; I think DYLD_LIBRARY_PATH should only be used in development.\r
+\r
+Thanks!\r
+\r
+Lewis\r
+\r
+[1] https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/formula_installer.rb\r
+[2] https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/keg_fix_install_names.rb\r
+[3] https://github.com/Homebrew/homebrew/blob/master/Library/Formula/notmuch.rb\r
+[4] https://trac.macports.org/browser/trunk/dports/mail/notmuch/Portfile\r
+[5] https://trac.macports.org/browser/trunk/dports/mail/notmuch/files/patch-lib-Makefile.local.diff\r
+[6] http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/mail/notmuch/patches/patch-lib_Makefile.local?rev=1.1&content-type=text/x-cvsweb-markup&only_with_tag=MAIN\r
+[7] https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dyld.1.html\r