Re: [RFC] building postgres with meson - v13

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, samay sharma <smilingsamay(at)gmail(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC] building postgres with meson - v13
Date: 2022-09-26 19:44:35
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 2022-09-26 09:35:16 -0700, Andres Freund wrote:
> > 9c00d355d0e9 meson: Add PGXS compatibility
> >
> > This looks like a reasonable direction to me. How complete is it? It
> > says it works for some extensions but not others. How do we define
> > the target line here?
> Yea, those are good questions.
> > How complete is it?
> It's a bit hard to know. I think the most important stuff is there. But
> there's no clear "API" around pgxs. E.g. we don't (yet?) have an exactly
> equivalent definition of 'host', because that's very config.guess specific.
> There's lots of shortcuts - e.g. with meson we don't need an equivalent to
> PGAC_CHECK_STRIP, so we need to make up something for
> Noah suggested using $(error something), but that only works if $variable is
> only used in recursively expanded variables - the errors end up confusing.

Looking through a few of the not-nicely-replaced things, I think we can
simplify at least some away:

- RANLIB: most platforms use AROPT = crs, making ranlib unnecessary. {free,
net, open}bsd don't currently, but all support it from what I know

- with_gnu_ld: this is only used on solaris, to set export_dynamic = -Wl,-E
when using a gnu ld. How about moving this to configure instead, and just
checking if -Wl,-E links?

- FLEXFLAGS: As a configure input this is afaict unused and undocumented - and
it's not clear why it'd be useful? Not that an empty replacement is a
meaningful effort

I'm not sure what to do about:
- autodepend - I'm inclined to set it to true when using a gcc like
compiler. I think extension authors won't be happy if suddenly their
extensions don't rebuild reliably anymore. An --enable-depend like
setting doesn't make sense for meson, so we don't have anything to source it
- {LDAP,UUID,ICU}_{LIBS,CFLAGS} - might some extension need them?

For some others I think it's ok to not have replacement. Would be good for
somebody to check my thinking though:

- LIBOBJS, PG_CRC32C_OBJS, TAS: Not needed because we don't build
the server / PLs with the generated makefile
- ZIC: only needed to build tzdata as part of server build
- MSGFMT et al: translation doesn't appear to be supported by pgxs, correct?
- XMLLINT et al: docs don't seem to be supported by pgxs
- GENHTML et al: supporting coverage for pgxs-in-meson build doesn't seem worth it
- WINDRES: I don't think extensions are bothering to generate rc files on windows

I'll include an updated pgxs-compat patch in the next post of the series (in a
few hours).


Andres Freund

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-09-26 19:47:14 Re: [RFC] building postgres with meson - v13
Previous Message Stephen Frost 2022-09-26 19:41:11 Re: has_privs_of_role vs. is_member_of_role, redux