Re: [RFC] building postgres with meson - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [RFC] building postgres with meson
Date
Msg-id 20211021214802.zapgj3e4b722zxsr@alap3.anarazel.de
Whole thread Raw
In response to Re: [RFC] building postgres with meson  (John Naylor <john.naylor@enterprisedb.com>)
Responses Re: [RFC] building postgres with meson  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-hackers
Hi,

On 2021-10-12 15:55:22 -0400, John Naylor wrote:
> Also, could utility makefile targets be made to work? I'm thinking in
> particular of update-unicode and reformat-dat-files, for example.

Implementing reformat-dat-files was trivial:
https://github.com/anarazel/postgres/commit/29c1ce1ad4731290714978da5ce81e99ef051bec


However, update-unicode is a bit harder.  Partially not directly because of
meson, but because update-unicode as-is afaict doesn't support VPATH builds,
and meson enforces those.

make update-unicode
...
make -C src/common/unicode update-unicode
'/usr/bin/perl' generate-unicode_norm_table.pl
Can't open perl script "generate-unicode_norm_table.pl": No such file or directory

It's not too hard to fix. See attached for the minimal stuff that I
immediately found to be needed. There's likely more,
e.g. src/backend/utils/mb/Unicode - but I didn't immediately see where that's
invoked from.


The slightly bigger issue making update-unicode work with meson is that meson
doesn't provide support for invoking build targets in specific directories
(because it doesn't map nicely to e.g. msbuild). But scripts like
src/common/unicode/generate-unicode_norm_table.pl rely on CWD. It's not hard
to work around that, but IMO it's better for such scripts to not rely on CWD.


Greetings,

Andres Freund

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Thinking about ANALYZE stats and autovacuum and large non-uniform tables
Next
From: "Bossart, Nathan"
Date:
Subject: Re: Fixing WAL instability in various TAP tests