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 BE0DD6DE17AA for ; Fri, 5 Jun 2015 12:26:22 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.39 X-Spam-Level: X-Spam-Status: No, score=-0.39 tagged_above=-999 required=5 tests=[AWL=0.310, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_FREEMAIL_FORGED_FROMDOMAIN=0.01, T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] 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 Z0fmDocnZIqY for ; Fri, 5 Jun 2015 12:26:20 -0700 (PDT) Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com [209.85.216.181]) by arlo.cworth.org (Postfix) with ESMTPS id 172626DE1733 for ; Fri, 5 Jun 2015 12:26:20 -0700 (PDT) Received: by qczw4 with SMTP id w4so33601742qcz.2 for ; Fri, 05 Jun 2015 12:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=R5CmlM0BUcfN18T4nbLDyBOVMajlcecFvvYis9SGaQg=; b=ZK20pjukiEs3FzEs2YOmhabMr/8bi8rJEva9+dnPxR/gMJGg/6D8gdyr6lKK3yHGye QyyRFajSKl6ON8HvdQlxKKipyyn5wcazkmurGyfFJita9b5nek6GU80begMfuXSZjYPn kzT9ebIO2v07eZHsVfyXW3ZYvWysGccTPVFGoKcMd5QXqAY6SneuZ8YBzVtJMAJCzo26 kis+BgshH1WWZWn1JFuCNdBNI7145b5qkTWEr0fp3gv3EcxMYr3h1ak4955Mvt5qYhIA NiW1lIgOpsdwW8fhqStliEx7RMPFfkmrONWLdhmyyXme+lfK6qwjKhJx753E4pTBW41P ucpA== X-Received: by 10.229.211.131 with SMTP id go3mr6231256qcb.18.1433532377973; Fri, 05 Jun 2015 12:26:17 -0700 (PDT) Received: from [10.46.105.28] ([70.42.157.61]) by mx.google.com with ESMTPSA id k71sm4363746qhc.42.2015.06.05.12.26.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 05 Jun 2015 12:26:16 -0700 (PDT) Sender: Nathan Eagleson Subject: Re: build failures on Mac OS X 10.6.8 - diagnosis Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Nate Eagleson In-Reply-To: Date: Fri, 5 Jun 2015 15:26:11 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <0C7BAABC-5AC3-4D6E-AD5D-2420918588C4@nateeag.com> References: <7156CF8E-BE69-48C0-ACB8-88C7E68CD4BB@nateeag.com> To: Tomi Ollila X-Mailer: Apple Mail (2.1085) Cc: notmuch@notmuchmail.org 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: Fri, 05 Jun 2015 19:26:22 -0000 On Jun 3, 2015, at 2:00 AM, Tomi Ollila wrote: > On Tue, Jun 02 2015, Nate Eagleson wrote: >=20 >> Hi folks, >>=20 >> I'm trying to move from Apple's Mail.app in favor of = offlineimap/notmuch, >> but I've run into a build failure on Mac OS X 10.6.8. >>=20 >> The failure was reported on this list a few months ago, but no >> explanation or solution was found: >>=20 >> http://notmuchmail.org/pipermail/notmuch/2015/020531.html >>=20 >> By appending `-Wl,-t` to `FINAL_NOTMUCH_LDFLAGS` in Makefile.local, I >> got 10.6.8's ld to dump the list of archives and dylibs that are = being >> linked in the failed compile. >>=20 >> That list includes `/usr/lib/libutil.dylib`, but not notmuch's = built-in >> `util/libutil.a`. >>=20 >> I have not found a sane way to tell 10.6.8's ld to prefer libutil.a = over >> libutil.dylib. >>=20 >> My first thought was that there should be an option to prefer = archives over >> dylibs, but that does not seem to exist in 10.6.8's version of ld. >>=20 >> Instead, people are recommending absolute paths when you need to link = an >> archive file in preference to existing dylibs: >>=20 >> = http://lists.apple.com/archives/darwin-development/2003/Sep/msg00008.html >> http://stackoverflow.com/questions/844819/how-to-static-link-on-os-x >>=20 >> As a simple test, I hardcoded an absolute path to libutil in >> FINAL_NOTMUCH_LDFLAGS, and the compile succeeded. >>=20 >> So, it seems like getting the path to the Makefile's parent directory = and >> using it to specify an absolute path to libutil.a would address this >> issue without introducing new ones. >>=20 >> Does this sound like a sane solution? Would a patch to do this be >> accepted? >=20 > Now that I look at this, I think that having full path to = util/libutil.a > should be used (everywhere) and if there is need to use = *system-provided* > libutil, then -lutil is to be added to the command line... >=20 > ... I think it is somewhat unfortunate (or confusing) to have the = library > named as such, and perhaps better naming should have been used, but = (*) >=20 > (*) http://martinfowler.com/bliki/TwoHardThings.html Yep, that all makes sense. ...especially the naming quandary. >> If not, what would be a better way to solve this? >=20 > Actually you could check how homebrew etc. solve this problem (or if = there > is any) to come with other ideas... My little research project started when I ran `brew install notmuch` and = got this failure. If there is a better solution, the homebrew folks don't have = it. so, rename the local library, or use an absolute path to it during = builds? The latter feels slightly more robust to me, since it completely = precludes name collisions.=20 Though if we add 'notmuch' to the lib name, name collisions seem pretty = unlikely. If no one else adds any comments in the next day or two, I'll submit a = patch adding the absolute path behavior. -Nate