Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYZYh-0000zB-Dm for pgsql-committers@arkaria.postgresql.org; Wed, 14 Sep 2022 21:04:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oYZYg-0005Mu-74 for pgsql-committers@arkaria.postgresql.org; Wed, 14 Sep 2022 21:04:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYZYg-0005Ml-0F for pgsql-committers@lists.postgresql.org; Wed, 14 Sep 2022 21:04:34 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYZYd-0002or-Ss for pgsql-committers@lists.postgresql.org; Wed, 14 Sep 2022 21:04:33 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9BA8A5C00DB; Wed, 14 Sep 2022 17:04:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 14 Sep 2022 17:04:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1663189469; x=1663275869; bh=0mF/E+ZV36 fGIERDzwk5j137reyLgVgAKZbCvDPgZg0=; b=fOCt5fYwDnXp6EuCJs2f/Npmz8 He9iX8q1H8yJJsLagI8uiVFirPVNCf+UqCfmUBYYgolJ2/QHkQi6dMF5et4mW7CZ ukU02tCvE/a/JuHQUZdsKkgu8TLhA4YDZqobU8vV+qestoQgLZe/kaLCV5NiTwIr kEHmAQ/hMJ847RJGsAuJtch0Xo2el2j2h0thmINiY2puBHOV7lkHiOwiHCjL7PMp wR/82KnxJ6GlUvrkzqbWKFqR/ivCVkTdNKD8O+6NKu+ce8ur39EzBVWiEnqMv5RR J2iezk3P7LGBHbI38mKKghhbucd/x8SpCpl3EDTU6e+E7r1RMJBxpngUEXfw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1663189469; x=1663275869; bh=0mF/E+ZV36fGIERDzwk5j137reyL gVgAKZbCvDPgZg0=; b=CTvgkaIsj0uxt3f31IU0fK+s1yUQ803ImM/AOLrzzOAj W3T8IF6+me1WxBq5GJ/iBeStlpllDOTYnAsUIeLRIKp9kIOk0WZbB/NoORme8peH EaL06fNotCd/we5ZN4pk56+yQ4exuhRjwXa6ulhhownNkeTgF7WYU8j+NXYM89gd g8AMWLcyLKysDCYJygFFtR3tswIHb+qc/dxRLx9mKGQ0y+Z0m+EBUGtoPK7dROvB VgIUHN3V20rWU4lfu2jCkUNO1iOWxK5EuwoBHNtf+1cYwrS3NVvQJPEATlCwjrKt 5IJ7u5LRCN8PAh6tVn58PsgnPtnPNWDEtZzhbsfPpw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeduiedgudeitdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgu rhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtf frrghtthgvrhhnpedvffefvefhteevffegieetfefhtddvffejvefhueetgeeludehteev udeitedtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Sep 2022 17:04:29 -0400 (EDT) Date: Wed, 14 Sep 2022 14:04:27 -0700 From: Andres Freund To: Tom Lane Cc: John Naylor , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Move gramparse.h to src/backend/parser Message-ID: <20220914210427.y26tkagmxo5wwbvp@awork3.anarazel.de> References: <2862807.1663184226@sss.pgh.pa.us> <20220914205715.xbmuqox5htobzggy@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220914205715.xbmuqox5htobzggy@awork3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-09-14 13:57:15 -0700, Andres Freund wrote: > On 2022-09-14 15:37:06 -0400, Tom Lane wrote: > > John Naylor writes: > > > Move gramparse.h to src/backend/parser > > > > The cfbot is unhappy since this commit; some but not all tests fail with > > > > [09:33:13.793] In file included from scan.c:39: > > [09:33:13.793] ./gramparse.h:29:10: fatal error: 'gram.h' file not found > > [09:33:13.794] #include "gram.h" > > [09:33:13.794] ^~~~~~~~ > > [09:33:13.839] In file included from parser.c:25: > > [09:33:13.839] ./gramparse.h:29:10: fatal error: 'gram.h' file not found > > [09:33:13.839] #include "gram.h" > > [09:33:13.839] ^~~~~~~~ > > > > What I think is happening is that it was a mistake to remove > > parser/gram.h from the dependencies of backend/Makefile's > > generated-headers target: that allows builds to proceed before > > gram.h has necessarily been created. The fact that it works > > at all for anybody says that there's another dependency path > > somewhere that causes bison to get run ... but, seemingly, > > that doesn't always happen soon enough in a parallel build. > > But why doesn't the below take care of it? > > > # Force these dependencies to be known even without dependency info built: > > gram.o scan.o parser.o: gram.h > > The only file including gram.h is gramparse.h, which in turn is only included > by parser.c, scan.l, gram.y. So this should suffice. Ah, I see: The problem is compilation of .c -> .bc files, not -> .o, so it only happens with llvm enabled. So far that was just taken care of by the generated-headers dependency, but it's more granular now... Since the bison aspect is quite slow, it'd probably be nicer to not include it in generated-headers? The most general solution I can see would be diff --git i/src/backend/common.mk w/src/backend/common.mk index fa96a82b1a0..61861f5c7eb 100644 --- i/src/backend/common.mk +++ w/src/backend/common.mk @@ -23,6 +23,7 @@ objfiles.txt: Makefile $(SUBDIROBJS) $(OBJS) ifeq ($(with_llvm), yes) objfiles.txt: $(patsubst %.o,%.bc, $(OBJS)) +$(patsubst %.o,%.bc, $(OBJS)): $(OBJS) endif # make function to expand objfiles.txt contents Greetings, Andres Freund