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 AB3DE431FBC for ; Wed, 4 Mar 2015 22:57:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 2.438 X-Spam-Level: ** X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 H0sK-AKcY+-t for ; Wed, 4 Mar 2015 22:57:16 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 7D1FE431FAE for ; Wed, 4 Mar 2015 22:57:16 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 7D3781000E7; Thu, 5 Mar 2015 08:56:11 +0200 (EET) From: Tomi Ollila To: "J. Lewis Muir" , notmuch@notmuchmail.org Subject: Re: [PATCH v2] lib: make notmuch shared library install_name be full path on Mac OS X In-Reply-To: <1425508369-28448-1-git-send-email-jlmuir@imca-cat.org> References: <1425508369-28448-1-git-send-email-jlmuir@imca-cat.org> User-Agent: Notmuch/0.19+53~gb45d2f9 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain 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: Thu, 05 Mar 2015 06:57:21 -0000 On Thu, Mar 05 2015, "J. Lewis Muir" wrote: > The install_name of libnotmuch.dylib on Mac OS X is what is written > into a program that links against it. If it is just the name of the > shared library file, as opposed to the full path, the program won't be > able to find it when it runs and will abort. Instead, the install_name > should be the full path to the shared library (in its final installed > location). > > Why does Notmuch work without this patch when installed via Homebrew? > The answer is twofold. One, /usr/local/lib is a special location in > which the dynamic linker will look by default to find shared libraries. > Homebrew highly recommends installing to /usr/local, and, assuming it > has been configured this way, the Notmuch library will end up installed > in /usr/local/lib, and the dynamic linker will find it. Two, Homebrew > globally corrects all install names in dynamically shared libraries and > binaries for each package it installs. So, even if the install names in > a package's binaries and libraries are incorrect, Homebrew corrects them > automatically, and no one ever knows. > > Why does Notmuch work without this patch when installed via MacPorts? > The answer is that MacPorts applies a patch just like this patch to fix > the same problem. looks ok to me... Tomi > --- > lib/Makefile.local | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/Makefile.local b/lib/Makefile.local > index 7278f46..f9ecd50 100644 > --- a/lib/Makefile.local > +++ b/lib/Makefile.local > @@ -27,7 +27,7 @@ LIBRARY_SUFFIX = dylib > LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX) > SONAME = libnotmuch.$(LIBNOTMUCH_VERSION_MAJOR).$(LIBRARY_SUFFIX) > LIBNAME = libnotmuch.$(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE).$(LIBRARY_SUFFIX) > -LIBRARY_LINK_FLAG = -dynamiclib -install_name $(SONAME) -compatibility_version $(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR) -current_version $(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE) > +LIBRARY_LINK_FLAG = -dynamiclib -install_name $(libdir)/$(SONAME) -compatibility_version $(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR) -current_version $(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE) > else > LIBRARY_SUFFIX = so > LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX) > -- > 1.9.3 (Apple Git-50) > > This version of the patch has a better commit message as suggested > by David Bremner on the mailing list. The steps for reproducing the > problem and the steps showing the analysis of the problem have been > removed. Added is an answer to the question of why Notmuch works > without this patch when installed via Homebrew and MacPorts. > > The message-id of the previous version of this patch is > 1409541227-38895-1-git-send-email-jlmuir@imca-cat.org. > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch