| From: | Bilal Yavuz <byavuz81(at)gmail(dot)com> |
|---|---|
| To: | Miłosz Bieniek <bieniek(dot)milosz0(at)gmail(dot)com> |
| Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Add `headerscheck` run_target to meson |
| Date: | 2025-12-04 07:09:33 |
| Message-ID: | CAN55FZ2vFfRJ5Ewj44oo27J=qY=E9+3d8S_rcMbuGJP-Rm7yPQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Sat, 29 Nov 2025 at 14:07, Miłosz Bieniek <bieniek(dot)milosz0(at)gmail(dot)com> wrote:
>
> pt., 28 lis 2025 o 16:17 Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> napisał(a):
> >
> > Hi,
> >
> > On Fri, 28 Nov 2025 at 18:05, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
> > >
> > > On Fri, 28 Nov 2025 at 17:03, Miłosz Bieniek <bieniek(dot)milosz0(at)gmail(dot)com> wrote:
> > > >
> > > > pt., 28 lis 2025 o 12:53 Peter Eisentraut <peter(at)eisentraut(dot)org> napisał(a):
> > > > >
> > > > > On 27.11.25 10:28, Miłosz Bieniek wrote:
> > > > > > While reviewing a patch I noticed that we have a `make -s headerscheck`
> > > > > > 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:
> >
> > Sorry, I clicked send early.
> >
> > Two solutions came to my mind but I am not sure which one is better:
> >
> > 1) We can add missing information to the generated Makefile.global in
> > the meson.build.
> >
> > 2) We can send required information as arguments to the headerscheck script.
> >
> > Any thoughts or suggestions?
>
> Thank you for the detailed response.
> I initially thought the errors with `#include <Python.h>` and
> `#include <EXTREN.h>` were only an issue with my local setup.
> If I understand correctly, your first proposal would address this
> problem without requiring integration with the headerscheck script,
> which in my opinion would be a cleaner solution.
> However, I would definitely like to hear what others think as well.
I wanted to experiment with the first proposal and it turns out I need
to edit the headerscheck script.
There are 3 patches attached:
0001 adds python_includespec and perl_includespec variables to the
Makefile.global of the meson build.
0002 adds headerscheck target to meson build like you do but with 2
extra changes. First one is that, I moved the headerscheck script to a
variable and used it in the target commands. Second one is that,
headerscheck script could not find the perl_includespec and
python_includespec variables because of the tabs in the sed command, I
changed them with '[:space:]' and it worked. I am not sure if that is
the correct fix but I just wanted to see if the script will work.
0003 adds icu_flags option to the meson build and sets 'ICU_CFLAGS'
Makefile.global variable to that option. This change is not needed for
the headerscheck script to work but I saw that was missing and just
wanted to show it. If we want to add that, this probably needs its own
thread.
--
Regards,
Nazir Bilal Yavuz
Microsoft
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-meson-Add-python-perl-_includespec-to-the-Makefil.patch | text/x-patch | 3.0 KB |
| v3-0002-Add-headerscheck-run_target-to-meson.patch | text/x-patch | 1.9 KB |
| v3-0003-meson-Add-icu_flags-option.patch | text/x-patch | 2.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Potapov Alexander | 2025-12-04 07:24:15 | Re: PG version is not seen in pg_upgrade test log |
| Previous Message | Peter Smith | 2025-12-04 07:01:56 | Re: Proposal: Conflict log history table for Logical Replication |