meson uses stale pg_config_paths.h left over from make

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: meson uses stale pg_config_paths.h left over from make
Date: 2023-08-23 12:52:52
Message-ID: CAApHDvqjYOxZfmLKAOWKFEE7LOr9_E6UA6YNmx9r8nxStcS3gg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've been having some problems running the regression tests using
meson on Windows. This seems to be down to initdb being compiled with
a version of pg_config_paths.h left over from the msvc build which had
been used on that source tree previously.

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)

Linux users are unlikely to experience this issue as they're likely
just going to run make maintainer-clean as instructed by the meson
error message.

The attached patch adds pg_config_paths.h to the generated_sources_ac
variable so that if that file exists, meson will provide an error
message to mention this. i.e:

> meson.build:2953:2: ERROR: Problem encountered:
> ****
> Non-clean source code directory detected.

> To build with meson the source tree may not have an in-place, ./configure
> style, build configured. You can have both meson and ./configure style builds
> for the same source tree by building out-of-source / VPATH with
> configure. Alternatively use a separate check out for meson based builds.

> Conflicting files in source directory:
> C:/Users/<user>/pg_src/src/port/pg_config_paths.h

> The conflicting files need to be removed, either by removing the files listed
> above, or by running configure and then make maintainer-clean.

Are there any objections to the attached being applied?

David

Attachment Content-Type Size
pg_config_paths_meson.patch application/octet-stream 394 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-08-23 13:23:20 Re: Fix error handling in be_tls_open_server()
Previous Message Daniel Gustafsson 2023-08-23 12:48:26 Re: Cirrus-ci is lowering free CI cycles - what to do with cfbot, etc?