Re: pgsql: meson: Add initial version of meson based build system

From: Andres Freund <andres(at)anarazel(dot)de>
To: Christoph Berg <myon(at)debian(dot)org>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: meson: Add initial version of meson based build system
Date: 2024-04-17 23:00:02
Message-ID: 20240417230002.mb2gv3hyetyn67gk@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi,

Uh, huh.

On 2024-04-17 15:42:28 +0200, Christoph Berg wrote:
> Re: Andres Freund
> > https://git.postgresql.org/pg/commitdiff/e6927270cd18d535b77cbe79c55c6584351524be
>
> This commit broke VPATH builds when the original source directory
> contains symlinks.

I.e. a symlink to the source directory, not a symlink inside the source
directory.

> Given there are no other changes I think this bit is at fault:
>
> > Modified Files
> > --------------
> > configure.ac | 6 +
>
> +# Ensure that any meson build directories would reconfigure and see that
> +# there's a conflicting in-tree build and can error out.
> +if test "$vpath_build"="no"; then
> + touch meson.build
> +fi

Argh, this is missing spaces around the '=', leading to the branch always
being entered.

What I don't understand is how that possibly could affect the prep_buildtree
step, that happens earlier.

Hm.

Uh, I don't think it does? Afaict this failure is entirely unrelated to 'touch
meson.build'? From what I can tell the problem is that config/prep_buildtree
is invoked with the symlinked path, and that that doesn't seem to work:

bash -x /home/andres/src/postgresql-via-symlink/config/prep_buildtree /home/andres/src/postgresql-via-symlink .
++ basename /home/andres/src/postgresql-via-symlink/config/prep_buildtree
+ me=prep_buildtree
+ help='Usage: prep_buildtree sourcetree [buildtree]'
+ test -z /home/andres/src/postgresql-via-symlink
+ test x/home/andres/src/postgresql-via-symlink = x--help
+ unset CDPATH
++ cd /home/andres/src/postgresql-via-symlink
++ pwd
+ sourcetree=/home/andres/src/postgresql-via-symlink
++ cd .
++ pwd
+ buildtree=/tmp/pgs
++ find /home/andres/src/postgresql-via-symlink -type d '(' '(' -name CVS -prune ')' -o '(' -name .git -prune ')' -o -print ')'
++ grep -v '/home/andres/src/postgresql-via-symlink/doc/src/sgml/\+'
++ find /home/andres/src/postgresql-via-symlink -name Makefile -print -o -name GNUmakefile -print
++ grep -v /home/andres/src/postgresql-via-symlink/doc/src/sgml/images/
+ exit 0

Note that the find does not return anything.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2024-04-18 06:51:26 pgsql: SQL/JSON: Improve some error messages
Previous Message Alexander Korotkov 2024-04-17 21:46:44 pgsql: Refactoring for CommitTransactionCommand()/AbortCurrentTransacti

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2024-04-17 23:09:37 Re: pg_combinebackup does not detect missing files
Previous Message Andres Freund 2024-04-17 21:50:21 Re: fix tablespace handling in pg_combinebackup