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 1vP02L-00GzrI-1Z for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Nov 2025 15:05:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vP02J-00Bz1n-01 for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Nov 2025 15:05:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vP02I-00Bz1f-25 for pgsql-hackers@lists.postgresql.org; Fri, 28 Nov 2025 15:05:27 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vP02G-001xfn-1i for pgsql-hackers@lists.postgresql.org; Fri, 28 Nov 2025 15:05:26 +0000 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-b98a619f020so1459870a12.2 for ; Fri, 28 Nov 2025 07:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764342324; x=1764947124; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wC9oVx6kAdTQbpzwYnWv8ki49d65CtNEH4SYn5nLFgA=; b=lV/6Ps5NmuXpQlfrrqKIyh5xaWMiPREZwZJ3blwuzB6tEmYtbuKjdShXpXYGELNPZz 1bBLZu1ulazOfQ4HatIWrd4+zW7cHaE+Rh7rR7zhYltNKG7iPAe6weXd6vFsj1yq283L VNsc1HkpTI87QyJ7K8qHEG4FddZEONFixpYUhG0UG7EGN1mQAPeuXD9yRsWFdmIf1Rvx W9rScI8KltouAaBEMpORj/hIudUfOx8xMCSyPyIhCl7mTGg5Bq+dTrHZ8pf7jbR9Pm8y nOUQAYKcUk7cS1TImDLo8HAc56UiLmvRJn2Vm5OHulmcE9BC6dtWTRF8mFbA1PAOh6HR e5ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764342324; x=1764947124; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wC9oVx6kAdTQbpzwYnWv8ki49d65CtNEH4SYn5nLFgA=; b=hD4xzoZgbe0BdxzJoMsm8VqtTlo01ZPYDHzjrwe1Bl9egyU9qop+JdB7505i3fujIe QXxsmTVqtSLtZuziI6R+j2tZsNjUbVIRpXiFVe418TNedwfWJ6n8uoQ3orK4firhsI5x 9Qx+D6pAZcEVtwQj2BM7qX465VZhKjeIDRV0SCTd5X/aw+Tos1XweUg+5zkmoZenxlK/ LlVJHBijpPO80Sya5w6MgNxqfw0+dnmtcknAWmKEEEY3H/I+FFuTnm8JD0PrQ+52QozU oWjU3ZJBk67ItbjcEWTxJPiz/KzIoIGPO7NlOEa0Oz1IB9bm43D2Nsrf/iH0xBHgjYkC ExTg== X-Forwarded-Encrypted: i=1; AJvYcCUhWgvZLrLhZZCOMBtpj9szNgzMfja3xktaYTPmtVSF5uApSBNnX+fCKnjltoQEcJLjzr/a+3ZoaDMBy4JS@lists.postgresql.org X-Gm-Message-State: AOJu0YyIlbAomb55VHaXuwdcgxJcbw+e48+C7nShuPYLpRicCEvXCGLI 1/qI1frWrB2VL4gCrHKvOZtXmJg4mHPJcvCcOUej4XHc+OX9qnwcljzRtQE4HHRGnuVHz67tZYf Kl3YCxEs0oA2fiDpNTkzDbZp0jIqTw5Mr6TX3FOGSyQ== X-Gm-Gg: ASbGncsR02AUS4wuQmt1LPeUp4gv5Kg1GM5CHCJ49hNgwM+8zhbHnvWUiNodUqIHl21 h7q6iwuqDUJYPuu9I9jf0CNBZvqoDUUYbW+TmpRq+KOxI+pAgJ9Az2ryhOjcMfpuBuWm3rSXsy0 KwoPXSa0kRWsg77hCYN8JlL7UC5+ETeeAu4q7xmgfqEOLMtSVCGWj3Spa0tDcbFxqsQWzo+0F3c xXs5IvVUNMk4CM3gKh7sIQF/MeUs+2r6M4UEvJNbsFnjyTR/PI0pzOMmIK14e245RtC1TAFD93C TnEf X-Google-Smtp-Source: AGHT+IG25k79qBklCOF7MAvZwguODCDvJfmTFa8PjaBPeLEemdDGf40FRkc2T7Y2E9Y+zKAKUWQwYQJKggfOO604R/k= X-Received: by 2002:a05:7301:550a:b0:2a4:3594:72f3 with SMTP id 5a478bee46e88-2a7192d6efemr13116246eec.34.1764342324113; Fri, 28 Nov 2025 07:05:24 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Nazir Bilal Yavuz Date: Fri, 28 Nov 2025 18:05:12 +0300 X-Gm-Features: AWmQ_bmf1ZfRKVDUYLzQ7jxED1_dXAhyIvKQGHFjemeFmVIDle803hh_QMjqbzs Message-ID: Subject: Re: [PATCH] Add `headerscheck` run_target to meson To: =?UTF-8?Q?Mi=C5=82osz_Bieniek?= Cc: Peter Eisentraut , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, Thank you for working on this! On Fri, 28 Nov 2025 at 17:03, Mi=C5=82osz Bieniek wrote: > > pt., 28 lis 2025 o 12:53 Peter Eisentraut napisa= =C5=82(a): > > > > On 27.11.25 10:28, Mi=C5=82osz Bieniek wrote: > > > While reviewing a patch I noticed that we have a `make -s headerschec= k` > > > but there is no equivalent in meson. > > > I prepared a small patch that adds `headerscheck` and `cpluspluscheck= ` > > > targets. > > > > This would be good to have, but I don't think your patch works. It > > seems you need to add the srcdir and builddir command-line arguments to > > the invocations. > > > > I think you are right. I added srcdir and builddir arguments. The headerscheck script pulls some information from Makefile.global after the configure [1] but meson does not generate a full version of Makefile.global [2], so it does not have the required information to check perl and python headers. If you run 'meson compile headerscheck', you get errors like: In file included from /home/nbyavuz/Desktop/projects/postgres/src/pl/plperl/plperl.h:25, from /tmp/headerscheck.YxsZhn/test.c:2: /home/nbyavuz/Desktop/projects/postgres/src/pl/plperl/plperl_system.h:85:10= : fatal error: EXTERN.h: No such file or directory 85 | #include | ^~~~~~~~~~ compilation terminated. In file included from /home/nbyavuz/Desktop/projects/postgres/src/pl/plpython/plpython.h:39, from /home/nbyavuz/Desktop/projects/postgres/src/pl/plpython/plpy_plpymodule.h:8= , from /tmp/headerscheck.YxsZhn/test.c:2: /home/nbyavuz/Desktop/projects/postgres/src/pl/plpython/plpython_system.h:5= 0:10: fatal error: Python.h: No such file or directory 50 | #include | ^~~~~~~~~~ compilation terminated. ----- [1.1] src/tools/pginclude/headerscheck # Needs to be run after configuring and creating all generated headers. # It's advisable to configure --with-perl --with-python, else you're # likely to get errors from associated headers. [1.2] src/tools/pginclude/headerscheck # Pull some info from configure's results. MGLOB=3D"$builddir/src/Makefile.global" CPPFLAGS=3D`sed -n 's/^CPPFLAGS[ ]*=3D[ ]*//p' "$MGLOB"` CFLAGS=3D`sed -n 's/^CFLAGS[ ]*=3D[ ]*//p' "$MGLOB"` ICU_CFLAGS=3D`sed -n 's/^ICU_CFLAGS[ ]*=3D[ ]*//p' "$MGLOB"` CC=3D`sed -n 's/^CC[ ]*=3D[ ]*//p' "$MGLOB"` CXX=3D`sed -n 's/^CXX[ ]*=3D[ ]*//p' "$MGLOB"` PG_SYSROOT=3D`sed -n 's/^PG_SYSROOT[ ]*=3D[ ]*//p' "$MGLOB"` perl_includespec=3D`sed -n 's/^perl_includespec[ ]*=3D[ ]*//p' "$MG= LOB"` python_includespec=3D`sed -n 's/^python_includespec[ ]*=3D[ ]*//p' = "$MGLOB"` [2] src/meson.build makefile_global =3D configure_file( input: 'Makefile.global.in', output: 'Makefile.global', configuration: pgxs_cdata, install: true, install_dir: dir_pgxs / 'src', ) configure_files +=3D makefile_global --=20 Regards, Nazir Bilal Yavuz Microsoft