Re: [RFC] building postgres with meson - v11

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, samay sharma <smilingsamay(at)gmail(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: [RFC] building postgres with meson - v11
Date: 2022-08-11 00:20:12
Message-ID: 20220811002012.ju3rrz47i2e5tdha@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Attached is a new version of the meson patchset. Plenty changes:

- Added a postgresql-extension.pc pkg-config file. That allows building server
extensions without integrating directly with the postgres buildsystem. I
have tested that this allows to build a simple out-of-tree extension on
linux and windows - the latter is something that we didn't really support
before. I think we could add something similar to the autoconf build in the
back branches, which'd make it easier to build extensions using this
mechanism across server versions.

- A significant number of the preparatory patches has been committed

- Lots of cleanup / simplification around exporting symbols, including
reunifying gendef.pl that I had previously copied

- Ecpg is now built and tested on windows, thanks to the above

- If there are any leftover generated files in the source tree, we now error
out, with instructions for how to fix it. That might need a better answer at
some point (think building from tarball), but I think that's good enough for
now.

It might be worth generating a file to perform the cleanups, it can be a
long list.

- CI for Openbsd, Netbsd (thanks Bilal!), that found a few minor issues

- I hadn't fully implemented the defaults for semaphores. Turns out named
semaphores are really slow on openbsd and netbsd.

- I went through all the "configure" tests to see if there are mismatches, and
either fixed them or added FIXMEs. There's maybe a handful.

- The PGXS compat layer is good enough to build at least a few moderately
complicated extensions (postgis, postgis), but currently their tests fail
against 15 (independent of the buildsystem)...

- Improved configure summary to show CFLAGS

- Some other CI improvements, we e.g. didn't use the same test concurrency and
CFLAGSs between the meson and autoconf tasks.

- Lots of small cleanups

- The testrunner now creates a test.start file when starting and either a
test.success or test.failure when ending. I'd like to use that to select the
list of log files etc to report in CI / the buildfarm, while still allowing
concurrent testing. Andrew, does that make sense to you?

- Lots of other small stuff

I think this is getting closer to being initially mergeable. As we'd
discussed, we're more likely to succeed if we accept working somewhat
incrementally on this.

Samay, with a bit of input from me, started on adding a docs chapter for
building with meson. I hope to include that in the next version.

I'll next send out an email discussing where test outputs should be when
running them with meson and how tests and "testsuites" should be named.

Greetings,

Andres

Attachment Content-Type Size
v11-0001-meson-prereq-regress-allow-to-specify-director-c.patch text/x-diff 6.7 KB
v11-0002-meson-prereq-Don-t-add-HAVE_LDAP_H-HAVE_WINLDAP_.patch text/x-diff 4.5 KB
v11-0003-meson-prereq-Extend-gendef.pl-in-preparation-for.patch text/x-diff 4.7 KB
v11-0004-meson-prereq-Add-src-tools-gen_export.pl.patch text/x-diff 2.2 KB
v11-0005-meson-prereq-Refactor-PG_TEST_EXTRA-logic-in-aut.patch text/x-diff 4.0 KB
v11-0006-wip-split-TESTDIR-into-two.patch text/x-diff 5.9 KB
v11-0007-meson-prereq-fix-warning-compat_informix-rnull.p.patch text/x-diff 1.4 KB
v11-0008-meson-Add-meson-based-buildsystem.patch text/x-diff 366.4 KB
v11-0009-meson-ci-Build-both-with-meson-and-as-before.patch text/x-diff 31.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-08-11 00:55:36 Re: Checking pgwin32_is_junction() errors
Previous Message Nathan Bossart 2022-08-10 22:31:20 Re: use SSE2 for is_valid_ascii