Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-17 Thread Tom Lane
Daniel Gustafsson writes: >> On 16 Mar 2020, at 17:12, Tom Lane wrote: >> So I'm now leaning to "back-patch and make sure to mention this in >> the next release notes". Barring objections, I'll do that soon. > None from me. Done. In the event, it only seemed practical to back-patch as far as

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-16 Thread Daniel Gustafsson
> On 16 Mar 2020, at 17:12, Tom Lane wrote: > Still, I think the number of people who'd get bit by that could be > counted without running out of fingers, while it seems quite likely > that many people will soon need to build our back branches on > platforms that won't have xml2-config. I agree

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-16 Thread Tom Lane
Daniel Gustafsson writes: > On 13 Mar 2020, at 17:14, Tom Lane wrote: >> Yeah, that's the argument *for* back-patching. Question is whether it >> outweighs the risk of silently breaking somebody's build by linking >> to the wrong libxml2 version. > Correct, my argument is that breakage can be e

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-16 Thread Daniel Gustafsson
> On 13 Mar 2020, at 17:14, Tom Lane wrote: > Daniel Gustafsson writes: >> I read this is as a preventative patch to stay ahead of future changes to >> packaging. If these changes do materialize, won't they be equally likely to >> hit installations for backbranch minors as v13? > > Yeah, that'

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-16 Thread Hugh McMaster
On Sat, 14 Mar 2020 at 03:06, Tom Lane wrote: > Looking again at the generated configure code, I realize I shouldn't have > left off the ACTION-IF-NOT-FOUND argument --- the default is to > throw an error, but we'd rather fall through and try to use xml2-config. > The eventual AC_CHECK_LIB(xml2, ..

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-13 Thread Tom Lane
Daniel Gustafsson writes: >> On 12 Mar 2020, at 17:39, Tom Lane wrote: >> I'd originally thought that we might back-patch this, but I'm now of >> the opinion that we probably should not. If pkg-config is present, >> this can change the default behavior about where we get libxml from, >> which se

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-13 Thread Tom Lane
Hugh McMaster writes: > On Fri, 13 Mar 2020 at 03:39, Tom Lane wrote: >> That won't win us any friends, so the attached revision >> doesn't call PKG_CHECK_MODULES unless we found pkg-config. > Did you mean to terminate configure if pkg-config cannot find > libxml-2.0 or the library is too old? Yo

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-13 Thread Hugh McMaster
On Fri, 13 Mar 2020 at 03:39, Tom Lane wrote: > I poked at this issue a bit more and realized that Hugh's patch > flat-out breaks building --with-libxml in environments without > pkg-config, because PKG_CHECK_MODULES just gives up and dies > if there's no pkg-config (as we'd already found out in co

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-12 Thread Daniel Gustafsson
> On 12 Mar 2020, at 17:39, Tom Lane wrote: > I also > concluded that if the user has set XML2_CONFIG, it's pretty clear > that her intent is to use whatever that is pointing at, so we should > not use pkg-config in that case either. +1 > I'd originally thought that we might back-patch this, bu

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-12 Thread Tom Lane
I poked at this issue a bit more and realized that Hugh's patch flat-out breaks building --with-libxml in environments without pkg-config, because PKG_CHECK_MODULES just gives up and dies if there's no pkg-config (as we'd already found out in connection with ICU). That won't win us any friends, so

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-11 Thread Tom Lane
Hugh McMaster writes: > The question is really whether we want to maintain a fallback to > xml2-config. To give more context, I gave a more detailed assessment of the > situation in an earlier email to this list. (Personally, I don’t think we > should.) I think that that is not optional. We try

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-11 Thread Hugh McMaster
On Thu, 12 Mar 2020 at 03:39, Tom Lane wrote: > Daniel Gustafsson writes: > > For me, the duplication aspect is the most troubling, since we'd still > need the > > xml2-config fallback and thus won't be able to simplify the code. > > Yeah, but at least it's concentrated in a few lines in configure

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-11 Thread Tom Lane
Daniel Gustafsson writes: > On 10 Mar 2020, at 18:38, Peter Eisentraut > wrote: >> Btw., here is an older thread for the same issue >> . >> Might be worth reflecting on the issues discussed there. > Than

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-11 Thread Hugh McMaster
On Wed, 11 Mar 2020 at 07:49, Daniel Gustafsson wrote: > > On 10 Mar 2020, at 18:38, Peter Eisentraut wrote: > > Btw., here is an older thread for the same issue > > . > > Might be worth reflecting on the is

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-11 Thread Hugh McMaster
On Tue, 10 Mar 2020 at 22:41, Daniel Gustafsson wrote: > > > On 10 Mar 2020, at 11:53, Hugh McMaster wrote: > > This patch uses pkg-config's PKG_CHECK_MODULES macro to detect libxml2 > > or, if pkg-config is not available, falls back to xml2-confg. > > This was previously discussed in 202001202047

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-10 Thread Daniel Gustafsson
> On 10 Mar 2020, at 18:38, Peter Eisentraut > wrote: > > On 2020-03-10 12:41, Daniel Gustafsson wrote: >>> On 10 Mar 2020, at 11:53, Hugh McMaster wrote: >>> Debian (and Ubuntu) are beginning to remove foo-config legacy scripts. >>> Already, xml2-config has been flagged for removal, with packa

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-10 Thread Peter Eisentraut
On 2020-03-10 12:41, Daniel Gustafsson wrote: On 10 Mar 2020, at 11:53, Hugh McMaster wrote: Debian (and Ubuntu) are beginning to remove foo-config legacy scripts. Already, xml2-config has been flagged for removal, with packages being asked to switch to pkg-config. This patch uses pkg-config

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-10 Thread Daniel Gustafsson
> On 10 Mar 2020, at 11:53, Hugh McMaster wrote: > Debian (and Ubuntu) are beginning to remove foo-config legacy scripts. > Already, xml2-config has been flagged for removal, with packages being > asked to switch to pkg-config. > > This patch uses pkg-config's PKG_CHECK_MODULES macro to detect l