Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w71T6-004si8-0b for pgsql-committers@arkaria.postgresql.org; Mon, 30 Mar 2026 01:31:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w71T4-000KUV-0p for pgsql-committers@arkaria.postgresql.org; Mon, 30 Mar 2026 01:31:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w71T3-000KUN-2p for pgsql-committers@lists.postgresql.org; Mon, 30 Mar 2026 01:31:02 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w71T0-00000001ucd-2WVW for pgsql-committers@lists.postgresql.org; Mon, 30 Mar 2026 01:31:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1774834257; bh=ZiBdJZxbq79wwpPpOkhnpUUS5djIAwhUBQ//mT813W0=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=APcLj6q2I5EWQym1j02Xk+UuvFXRwB2gJHqaV5p/GxAEV8M7yzOn4wGkj42nbjdtM HfDQ9yKCqi5GASvXBNxFeZeLlu+g/N7B+0dgxmW2jQEYsqgjDAw8k5iC1pXjGDdtbp ipfKr3Tb/Z69pms7GRReQPw3UKVrUwgQoA5tSCyLKb6r/Af8V/S+wUvVa2J5DHR98E DRu2YN6TvC8SLgi+5MppM1dT1Hs1Q2dNBh9s1Pekcd/GK+n1P5T39lzYXSU8LCYDia n3uZA1H+W2DmS248HR5OpYdD/fbhpAAudR0YhibM4GZh4ZNrpQ5A/6jHoBqMz1Nufv Z06ZIWhcmoKNQ== Received: from [172.30.48.30] (debian11-template.l.postgrespro.ru [192.168.2.254]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: a.melnikov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 0E3E45FFD4; Mon, 30 Mar 2026 04:30:57 +0300 (MSK) Content-Type: multipart/mixed; boundary="------------43EWIrtTwUEmCGLSoZL6u0v0" Message-ID: Date: Mon, 30 Mar 2026 04:30:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pgsql: Move gramparse.h to src/backend/parser To: Tom Lane , John Naylor Cc: Andres Freund , pgsql-committers@lists.postgresql.org References: <2862807.1663184226@sss.pgh.pa.us> <20220914205715.xbmuqox5htobzggy@awork3.anarazel.de> <20220914210427.y26tkagmxo5wwbvp@awork3.anarazel.de> <1368269.1760589291@sss.pgh.pa.us> Content-Language: en-US From: "Anton A. Melnikov" In-Reply-To: <1368269.1760589291@sss.pgh.pa.us> X-KSMG-AntiPhishing: NotDetected, bases: 2026/03/29 23:49:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2026/03/29 22:02:00 #28351609 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------43EWIrtTwUEmCGLSoZL6u0v0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi! Sorry for the very long delay in responding, and thank you for your patience. Regarding to previous points: On 16.10.2025 07:19, John Naylor wrote: > > Also, that fix > was in response to a specific change in dependencies, so I don't see > how it's directly applicable to earlier branches. Maybe there is > something to be done here, but with such a sporadic failure, I'm not > sure what. On 16.10.2025 07:34, Tom Lane wrote: > Yeah. One build failure in three years does not sound to me like > something to panic about. It sounds more like a local problem. > Also, I note that alligator is self-described as running a > "gcc experimental (nightly build)" compiler, so temporary build > glitches on it are hardly unexpected. this all seems quite reasonable but i observe the same behavior on earlier branches as well. Using a pre-built source tree at REL_14/15_STABLE, this reproduction: cd src/backend/parser rm -rf .deps/ gram.c scan.c *.o *.bc gram.h make parser.bc results in: $ make parser.bc /usr/lib/llvm-16/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-deprecated-non-prototype -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/local/include -flto=thin -emit-llvm -c -o parser.bc parser.c In file included from parser.c:25: ../../../src/include/parser/gramparse.h:29:10: fatal error: 'parser/gram.h' file not found #include "parser/gram.h" ^~~~~~~~~~~~~~~ 1 error generated. make: *** [../../../src/Makefile.global:1084: parser.bc] Error 1 Also as a possible improvement perhaps make the fix less strictly? I.e. replace each .bc file's dependency on all .o files with a more weak dependency just on all .c files. Namely use $(patsubst %.o,%.bc, $(OBJS)): $(patsubst %.o,%.c, $(OBJS)) instead of: $(patsubst %.o,%.bc, $(OBJS)): $(OBJS) This should still ensure correct build ordering, and it will run faster during parallel builds, since it won't wait for absolutely all the object files to be created. For example, rebuilding parser.bc would then require only a single compiler call in src/backend/parser. See the attached bc-depends-on-c.txt for details. Best regards, -- Anton A. Melnikov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------43EWIrtTwUEmCGLSoZL6u0v0 Content-Type: text/plain; charset=UTF-8; name="bc-depends-on-c.txt.txt" Content-Disposition: attachment; filename="bc-depends-on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