Re: Meson build updates

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "Andres Freund" <andres(at)anarazel(dot)de>
Cc: "Peter Eisentraut" <peter(at)eisentraut(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Meson build updates
Date: 2023-06-29 19:03:19
Message-ID: CTPD8PV6RZUH.3RZ3WTADPD8DA@gonk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu Jun 29, 2023 at 1:58 PM CDT, Andres Freund wrote:
> Hi,
>
> On 2023-06-29 13:34:42 -0500, Tristan Partin wrote:
> > On Thu Jun 29, 2023 at 12:35 PM CDT, Andres Freund wrote:
> > > > v5-0012-Make-finding-pkg-config-python3-more-robust.patch
> > >
> > > The commit message here is clearly outdated (still talking about Python.h
> > > check not being required). Does the remainder actually add any robustness?
> > >
> > > I'm on board with removing unnecessary .enabled(), but from what I understand
> > > we don't gain anything from adding the if python3_inst.found() branch?
> >
> > Attached is a more up to date patch, which removes the old part of the
> > commit message. I guess robust is in the eye of the beholder. It is
> > definitely possible for the installation to not be found (Python.h not
> > existing in newer versions of Meson as an example). All my patch would
> > do is keep the build from crashing if and only if the installation
> > wasn't found.
>
> Ah - I somehow thought .find_installation().dependency() would return a
> not-found dependency when the install wasn't located.

Inspecting the Meson source code... If find_installation() fails, you
get returned a NonExistingExternalProgram, which doesn't implement
dependency()[0].

> > > Attached my version of 0007 and 0011 (with some changes from 0012 and
> > > 0015). I'm running a test of those with the extended CI I have in a branch...
> >
> > Thanks for the further review. Did you by chance see my other email in
> > another branch of this thread[0]?
> >
> > [0]: https://www.postgresql.org/message-id/CTBSCT2V1TVP.2AUJVJLNWQVG3@gonk
>
> I had planned to, but somehow forgot. Will reply.

Thanks!

[0]: https://github.com/mesonbuild/meson/blob/master/mesonbuild/programs.py#L333

--
Tristan Partin
Neon (https://neon.tech)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2023-06-29 19:07:19 Re: Meson build updates
Previous Message Andres Freund 2023-06-29 19:02:42 Re: Meson build updates