From: Jinwoo Lee Date: Wed, 4 Mar 2015 22:39:44 +0000 (+1600) Subject: Re: [PATCH v2] lib: make notmuch shared library install_name be full path on Mac... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2168c3bc42bec8de4ecf9ff291304d23910c6524;p=notmuch-archives.git Re: [PATCH v2] lib: make notmuch shared library install_name be full path on Mac OS X --- diff --git a/10/86ca39e571b07b43a5b9e079ed901651b05ee6 b/10/86ca39e571b07b43a5b9e079ed901651b05ee6 new file mode 100644 index 000000000..ab50e9160 --- /dev/null +++ b/10/86ca39e571b07b43a5b9e079ed901651b05ee6 @@ -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 olra.theworths.org (Postfix) with ESMTP id 12CDD431FAF + for ; Wed, 4 Mar 2015 14:40:44 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.639 +X-Spam-Level: ** +X-Spam-Status: No, score=2.639 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + DNS_FROM_AHBL_RHSBL=2.438, FREEMAIL_ENVFROM_END_DIGIT=1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 5+7DcVR5J7pN for ; + Wed, 4 Mar 2015 14:40:40 -0800 (PST) +Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com + [209.85.223.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C0EB4431FAE + for ; Wed, 4 Mar 2015 14:40:40 -0800 (PST) +Received: by iecat20 with SMTP id at20so18088322iec.6 + for ; Wed, 04 Mar 2015 14:39:47 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=vxyyIZ64lfFzwwzlJreY3QF9N49KhF9WbPiKK8ugtlA=; + b=Km+0eUp3oQlNp+JyMPb+HTv6M4s7G2gI3VEKvPgBj/gMSunSdJ7lnaBTc241/r2weL + ftPE4IH2cipZV7GmGQ1CcgGuYslHT9oEyzBzBx9t3yQ7vYqCO6OGweLsKr/aTeEMinMG + mY8ssz1SCP4EcNITjWSH2s9cNpVogDb2CCI8DCcJMej0zyrrMitM6ZuKQ6E0Po46K9jE + 3vloAqvQiNmHuL9G1pvvtqwP1YAyhy2fMV9J5ucFmrduPjy5YOxqKH8g+joAqmk5HmD/ + 22d9fTHjBzOt4jbB9KIZbu9ci/dfShF4sTadupHhLtEwJgoxoDtD0///DTAmFVgWA67e + vehA== +X-Received: by 10.107.164.221 with SMTP id d90mr16160054ioj.13.1425508786921; + Wed, 04 Mar 2015 14:39:46 -0800 (PST) +Received: from localhost ([2620:0:1000:407c:94fb:a3ba:4a7f:aa53]) + by mx.google.com with ESMTPSA id 192sm3710920ioo.38.2015.03.04.14.39.45 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Wed, 04 Mar 2015 14:39:45 -0800 (PST) +From: Jinwoo Lee +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+67~g326e188 (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-apple-darwin13.2.0) +Date: Wed, 04 Mar 2015 14:39:44 -0800 +Message-ID: +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: Wed, 04 Mar 2015 22:40:44 -0000 + +On Wed, Mar 4, 2015 at 02:32 PM, "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). + +Thanks for this fix! I built notmuch last night on my mac using the +prefix of "/opt/local", and it revealed this problem. Manually moving +libnotmuch.dylib to $HOME/lib fixed it. I'll try again once this patch +is checked in. + +> +> 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.