From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kDC9HfD1wGEgJAEAgWs5BA (envelope-from ) for ; Mon, 20 Dec 2021 22:30:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4GwwGfD1wGFkUgAAbx9fmQ (envelope-from ) for ; Mon, 20 Dec 2021 21:30:24 +0000 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 313FA2F2C4 for ; Mon, 20 Dec 2021 22:30:24 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B0FA35F703; Mon, 20 Dec 2021 21:30:19 +0000 (UTC) X-Greylist: delayed 524 seconds by postgrey-1.36 at yantan; Mon, 20 Dec 2021 21:30:17 UTC Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 95A6E5F6DA for ; Mon, 20 Dec 2021 21:30:17 +0000 (UTC) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 937321B00056; Mon, 20 Dec 2021 23:21:31 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1640035291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mmYqVkoUsRIkftVujffuDCIAexjppUmtBBlQwW650vs=; b=Xt3TVsDB8yURAlt21rubsoPMTbO/UioKXh2TPxl+MSaOVrr+Oh02SVnx0Hims7QNJ18wtZ 7qOgFpt0wGv0793RIQvg0BbRllLDh1IVz/hQ16l0mFOA27XOcBh2ZtV9/Xk2Xhw9GijESu uBOfkT7DF56duWfjYjNOitpr6N13Z58PWVmMtxi5fgRxMhZrdYtccPjrKWzFc3efsGMRLB mPHzpzcWplV6X1PNJ5T5HtnIEtcNPlLG+H2f6Q8JNN2CTeDUTVTVQgAUgHt1YFCEUey2Sx TeRoO7uja6I3kyC5FX7dnaWfQuWxFfZ4LPgARY/yePZs83qpHWHpoq85RxoJ1A== From: Tomi Ollila To: David Bremner , Ryan Schmidt , notmuch@notmuchmail.org Subject: Re: Fix order of -I and -L flags In-Reply-To: <875yrnny4t.fsf@tethera.net> References: <7851CAB5-4556-4931-A0A2-37003E56C927@ryandesign.com> <875yrnny4t.fsf@tethera.net> User-Agent: Notmuch/0.33+54~gcaf4513 (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1640035291; a=rsa-sha256; cv=none; b=bUb089beos5Y+GUilho/6vV61AClIeeSyOR27WCElb9dAOpOxbffmkTS7SR07Y7/KjvBzs GPHDNwo/wBevV6duzMhCfV8jnwnxuthd6n0pq+CiEUvk+FCnuUze57SD+8OKIwINtzD2mK raU6YXsUYi7eUaGPDyLnvSPrHHF51UG6bMcZoB0/LT5xJA+qulQjRj1u3u9xKvtK4Uei57 qFUsqb49l0mzg81BYlpz2ij7GpuE8gK8felYrqQKqmkTaWaLBdWFmIcFZ+A4zi9vYHHIGB vvFZcLhuOtvejyVtpKmi4bTFJeZY9/LCBsVj6CfdeAA4dHwfHTJrEbjErWCU5Q== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1640035291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mmYqVkoUsRIkftVujffuDCIAexjppUmtBBlQwW650vs=; b=g2S7vVYx/86YGd7dldGHhZje33nP2Mbsb5RAv6p6C/X9+kp+BxV+V/vSjaNE9iuNj3TJIj nymHwx3Y5KrxEFxdzCWX7TTwW7RZ5sHw6C2tM5HIg0M6cZkZRZMHdt4ygbby8KCh3nGO2H eSAUjkwMjdSqtIqWblqcE6J6HBrso7M+ywEgIvIC4qciaOA42TR04jG4oN2SF7ab5zc8Nk eXJgAcUcWzFxl+23tHbW5a5dlcn7cqzvzV0wV8FOn6DCbDJ3CFI1dpmf1qfDVIHDC89uZo yDoq4DZDO91rDjh+8I8hmQRxoamlIUKQaeUZnnqkD/ibgB0C06dVnEdjlLmFvQ== Message-ID-Hash: S7NHZFX43TP4HZCMMFTAZEETFWRHWEET X-Message-ID-Hash: S7NHZFX43TP4HZCMMFTAZEETFWRHWEET X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640035824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=gxWRtHsjb9rHNfDpktHYq9UTMTYrrP0ioYJXNsOf6Ig=; b=OHPhxRQ7x8resH5S0O5TYqskQxk/uxhiHAsadqjIOuqyd8xH93zIi4g23AM3h2aaTH2TYN fwGOvz9g5M424E5HdX0mi5Su/8JXqlXvkLx7oJbIuL5MidU8UeKrURLDzm8jXhrtVHCZ4W OWRctbAYOXJI8770Z3Z55HEtY0zuie5O4tcrEomI06ebEvzRJgV4L+nEBb2rt29GEMAYoJ +rtvT9qtvRaK9jrr7v+5sjwURWysn6nxjEBmPvJeNHW16IyTuys4W/0R6ssVgWLaFgqlib LU8Yo2fJjtJFbXiHpuomPQcXH0HfRhUuhglc4B+Sib8ZBxgvc5jiPnckL//BkA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1640035824; a=rsa-sha256; cv=fail; b=cZCGbLcH8e4an/JZlDRP8GIPSNecNuSl/bKYx2svDpU852CNqw4D2AElDWpt5NhM6/voGE YRovQ2zxkqm01Ukoul8vbsedk6XoHWh6Z0OlEburQ19CpX+P/L/jtS6wdOWDs3B1BeDYCC syazBBjgWe1Z+1DVx3fqNs8lUrsvFbWb1vG2yMKEvy+jsINn/HJwqHjN+m8v+baL/fC4m8 FYdG34RSHKQm8qu2ttYpCRG0AUVS5YJpG6B9weIyqBFmrnXaTYKgyhwlQQRij7M0zcKRMm VybMmqeI9m761c4ezOc79FJc60eA+yqOu4zHIaenGmuZ9zKjseDlI9bxd4XIyA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=Xt3TVsDB; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=fail (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org does not designate 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=Xt3TVsDB; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=fail (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org does not designate 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 313FA2F2C4 X-Spam-Score: -0.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: vrGY+rqo46rT On Fri, Dec 17 2021, David Bremner wrote: > Ryan Schmidt writes: > >> The notmuch build system puts -I and -L flags in the wrong order. >> >> Specifically, -I flags the user might specify in the CPPFLAGS >> environment variable appear before the -I flags for the project's own >> directories, resulting in build failure if a previous version of >> notmuch (whose headers differ sufficiently from the new version) was >> already installed. >> >> https://trac.macports.org/ticket/63274 >> >> Similarly, -L flags the user might specify in the LDFLAGS environment >> variable appear before the -L flags for the project's own directories, >> resulting in build failure if a previous version of notmuch (whose >> libraries differ sufficiently from the new version) was already >> installed. >> >> https://trac.macports.org/ticket/63665 > > Although I don't consider GNU standards normative for notmuch, there is > some value in doing things a standard way. In particular the way notmuch > uses {C,CPP,LD,CXX}FLAGS follows e.g. [1]. Does it ? I initially thought CFLAGS should be first so that user can modify anything, but then I thought that CFLAGS should be last just so that the "project internal" includes are taken first. 2 things) (1) I was wrong with where user can modify anything: -I's, -L's in c compiler options are used in order, but (OTOH) (probably) some other options given later may override previously given option. then (2) [1] seems to say that "Put CFLAGS last in the compilation command, after other variables containing compiler options, so the user can use CFLAGS to override the others. " ^^ that would also say mean that the -I's and -L's given in ${CFLAGS} would be effective after the -I's and -L' configured... > > I guess on the Linux / BSD side we expect the configure script to do the > heavy lifting so that manual setting of CPPFLAGS / LDFLAGS at build time > is not needed in general. So one question is why isn't this the case for > macports? > > I think there is value in letting individual end-users use these > variables to override things (we just saw a case the other day where > that fixed someone's unique build problem). What was the case ? > I'm open to ideas for how we can make things easier for macports without > taking away existing functionality for other users. Would putting CFLAGS last break someone's workflow? Did I understand correctly what [1] mean for use of CFLAGS ? > > d > > [1]: https://www.gnu.org/prep/standards/html_node/Command-Variables.html. Tomi