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

From Andres Freund
Subject Re: [RFC] building postgres with meson - v11
Date
Msg-id 20220811002012.ju3rrz47i2e5tdha@awork3.anarazel.de
Whole thread Raw
In response to [RFC] building postgres with meson  (Andres Freund <andres@anarazel.de>)
Responses Re: [RFC] building postgres with meson - v11
List 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

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: use SSE2 for is_valid_ascii
Next
From: Thomas Munro
Date:
Subject: Re: Checking pgwin32_is_junction() errors