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

From Andres Freund
Subject Re: [RFC] building postgres with meson
Date
Msg-id 20220309184757.dli56qpoerqsfetm@alap3.anarazel.de
Whole thread Raw
In response to Re: [RFC] building postgres with meson  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-hackers
Hi,

On 2021-10-22 11:55:05 -0400, John Naylor wrote:
> On Thu, Oct 21, 2021 at 5:48 PM Andres Freund <andres@anarazel.de> wrote:
> 
> > However, update-unicode is a bit harder.  Partially not directly because
> of
> > meson, but because update-unicode as-is afaict doesn't support VPATH
> builds,
> > and meson enforces those.
> 
> > make update-unicode
> > ...
> > make -C src/common/unicode update-unicode
> > '/usr/bin/perl' generate-unicode_norm_table.pl
> > Can't open perl script "generate-unicode_norm_table.pl": No such file or
> directory
> >
> > It's not too hard to fix. See attached for the minimal stuff that I
> > immediately found to be needed.
> 
> Thanks for doing that, it works well enough for demonstration. With your
> patch, and using an autoconf VPATH build, the unicode tables work fine, but
> it complains of a permission error in generate_unaccent_rules.py. That
> seems to be because the script is invoked directly rather than as an
> argument to the python interpreter.
>

> Yeah. I encountered a further issue: With autoconf on HEAD, with a source
> tree build executed in contrib/unaccent:

This seems to be the same issue as above?


> $ touch generate_unaccent_rules.py
> $ make update-unicode
> generate_unaccent_rules.py --unicode-data-file
> ../../src/common/unicode/UnicodeData.txt --latin-ascii-file Latin-ASCII.xml
> >unaccent.rules
> /bin/sh: generate_unaccent_rules.py: command not found
> make: *** [unaccent.rules] Error 127
> make: *** Deleting file `unaccent.rules'

This looks more like you're building without --with-python and you don't have
a 'python' binary (but a python3 binary)?

Independent of my changes the invocation of generate_unaccent_rules looks like

# Allow running this even without --with-python
PYTHON ?= python
...
    $(PYTHON) $< --unicode-data-file $(word 2,$^) --latin-ascii-file $(word 3,$^) >$@

so your failure should only happen if PYTHON somehow is empty, otherwise I'd
expect python in front of the failing line?


> Anyway, this can be put off until the very end, since it's not run often.
> You've demonstrated how these targets would work, and that's good enough
> for now.

I'd like to get this stuff out of the patch series, so I'm planning to get
this committable...

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Adding CI to our tree
Next
From: Chapman Flack
Date:
Subject: Document what is essential and undocumented in pg_basebackup