Re: meson uses stale pg_config_paths.h left over from make

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: meson uses stale pg_config_paths.h left over from make
Date: 2023-08-24 06:25:47
Message-ID: 20230824062547.h36yc26syhnlbai5@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-08-24 08:18:14 +0200, Peter Eisentraut wrote:
> On 23.08.23 14:52, David Rowley wrote:
> > Generally when there are files left over the meson build script will
> > detect this and ask you to run make maintainer-clean. That's useful
> > on Linux, but on Windows you're just left to manually remove the
> > conflicting files which are listed. Unfortunately, pg_config_paths.h
> > wasn't listed, which I think was missed because it's not generated
> > during configure, but during the actual make build. (see
> > src/port/Makefile)
>
> How is this different from any other built file being left in the tree?

Files included into other files (i.e. mostly .h, but also a few .c) are
particularly problematic, because they will be used from the source tree, if
the #include doesn't have directory component - the current directory will
always be searched first. In this case initdb on David's machine failed,
because the paths from the wrong pg_config_paths.h was used.

> Surely meson should not be required to detect that?

I think we should try to detect included files, due to the nasty and hard to
debug issues that creates. I've spent quite a bit of time helping people to
debug such issues.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-08-24 06:57:58 Remove IndexInfo.ii_OpclassOptions field
Previous Message Peter Eisentraut 2023-08-24 06:18:14 Re: meson uses stale pg_config_paths.h left over from make