Re: [RFC] building postgres with meson - v13

From: Andres Freund <andres(at)anarazel(dot)de>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, samay sharma <smilingsamay(at)gmail(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC] building postgres with meson - v13
Date: 2022-09-15 02:26:26
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Attached is v13 of the meson patchset. The biggest changes are:

- fix for the occasional ecpg.c crashes - which turned out to be crashes of
python, which in turn likely are due to a bug in the windows CRT

- split out and improved the patch to add resource files on windows. This
doesn't yet add them to all binaries, but I think the infrastructure looks
better now, and there's no duplicated win32ver.rc anymore.

- several rebasing adjustments, most notably the parser stuff and the
introduction of postgresql-full.xml

- improved structure of docs, based on Peter's review (Samay)

- generation of proper dependencies for xmllint/xsltproc, by parsing xsltproc
--load-trace. Previously the meson build didn't rebuild docs properly (meson
doesn't have "glob-style" dependencies). (Bilal)

- numerous small improvements and fixes

- added a patch to drop DLLTOOL/DLLWRAP from /
- we've removed the use of them in 2014. This way the pgxs emulation doesn't
need to care.

- noticed that libpgport.a had and needed a dependency on errcodes.h - that
seemed wrong. The dependency is due to src/port/*p{read,write}v?.c including
postgres.h - which seems wrong. So I added a patch changing them to include

One thing I just realized is that the existing autoconf/make and
src/tools/msvc buildsystems don't generate static libraries for e.g. libpq. So
far the meson build generates both static and shared libraries on windows

Meson solves the naming conflict that presumably lead to us not generating
static libraries on windows by naming the link library for dlls's differently
than static libraries.

I'm inclined to build the static lib on windows as long as we do it on other


Andres Freund

Attachment Content-Type Size
v13-0001-Remove-DLLTOOL-DLLWRAP-from-configure-Makefile.g.patch text/x-diff 7.1 KB
v13-0002-Don-t-hardcode-tmp_check-as-test-directory-for-t.patch text/x-diff 6.9 KB
v13-0003-Split-TESTDIR-into-TESTLOGDIR-and-TESTDATADIR.patch text/x-diff 5.0 KB text/x-diff 5.0 KB text/x-diff 2.4 KB
v13-0006-meson-prereq-Refactor-PG_TEST_EXTRA-logic-in-aut.patch text/x-diff 4.0 KB
v13-0007-meson-prereq-port-Include-c.h-instead-of-postgre.patch text/x-diff 1.5 KB
v13-0008-meson-Add-meson-based-buildsystem.patch text/x-diff 349.6 KB
v13-0009-ci-windows-set-error-mode-to-not-include-SEM_NOG.patch text/x-diff 1.6 KB
v13-0010-meson-ci-Build-both-with-meson-and-as-before.patch text/x-diff 31.1 KB
v13-0011-meson-prereq-De-special-case-pgevent-s-rc-file-h.patch text/x-diff 1.9 KB
v13-0012-meson-prereq-win-remove-date-from-version-number.patch text/x-diff 1.1 KB
v13-0013-meson-WIP-Add-some-of-the-windows-resource-files.patch text/x-diff 11.0 KB
v13-0014-meson-Add-support-for-relative-rpaths-fixing-tes.patch text/x-diff 7.3 KB
v13-0015-meson-Add-docs-for-building-with-meson.patch text/x-diff 77.6 KB
v13-0016-meson-Add-PGXS-compatibility.patch text/x-diff 7.4 KB
v13-0017-meson-Add-postgresql-extension.pc-for-building-e.patch text/x-diff 3.7 KB
v13-0018-meson-Add-LLVM-bitcode-emission.patch text/x-diff 5.2 KB
v13-0019-meson-Add-support-for-building-with-precompiled-.patch text/x-diff 14.9 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message 2022-09-15 02:48:20 RE: why can't a table be part of the same publication as its schema
Previous Message Peter Smith 2022-09-15 01:57:28 Re: pgsql: Doc: Explain about Column List feature.