Hi, 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 Makefile.global. > > 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 from. - {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). Greetings, Andres Freund