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 1vR1mu-004YM8-0x for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2025 05:21:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vR1mt-000g2P-0q for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2025 05:21:55 +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 1vR1kF-000dA9-0y for pgsql-hackers@lists.postgresql.org; Thu, 04 Dec 2025 05:19:11 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vR1kD-0032dE-29 for pgsql-hackers@lists.postgresql.org; Thu, 04 Dec 2025 05:19:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 5B45J8Qj986486 for ; Thu, 4 Dec 2025 00:19:08 -0500 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: Something in our JIT code is screwing up PG_PRINTF_ATTRIBUTE MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <986484.1764825548.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 04 Dec 2025 00:19:08 -0500 Message-ID: <986485.1764825548@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Currently, configure tries "gnu_printf" then "__syslog__" then "printf" to set PG_PRINTF_ATTRIBUTE. Of late, buildfarm member fritillary has been issuing warnings like ../../../../src/include/c.h:234:83: warning: 'syslog' is an unrecognized f= ormat function type [-Wformat=3D] 234 | #define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_A= TTRIBUTE, f, a))) | = ^ ../../../../src/include/port.h:233:86: note: in expansion of macro 'pg_att= ribute_printf' 233 | extern int pg_vsnprintf(char *str, size_t count, const char *= fmt, va_list args) pg_attribute_printf(3, 0); | = ^~~~~~~~~~~~~~~~~~~ I hadn't gotten around to looking at that closely, but in the past week three new animals (borer, skeletonizer, whitefly) have started doing that too. On inspection, I realize that that's not happening across our entire tree, but only within src/backend/jit/llvm. There are at least two things that seem wrong here: 1. The affected platforms are CentOS Stream 9, CentOS Stream 10, and AlmaLinux 10.0 (so it's not exactly old obsolete stuff). Since those are all Linux variants, what we *should* be choosing is "gnu_printf", yet the configure log shows we chose "__syslog__". Why? 2. Something in the LLVM headers on those platforms has evidently decided that it'd be a brilliant idea to #define "__syslog__" as "syslog", and that's breaking this. That seems jaw-droppingly stupid; why'd they do that, and what can we do to work around it? Presumably, this is breaking the compiler's ability to check format strings, so it's not cool to just ignore it. Adding to my confusion, I do not see these warnings on a local RHEL9 machine, which ought to be pretty equivalent to CentOS 9. Anybody want to look into this more closely? = regards, tom lane