Re: meson's in-tree libpq header search order vs -Dextra_include_dirs - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: meson's in-tree libpq header search order vs -Dextra_include_dirs
Date
Msg-id CA+hUKGLEaExdC005PtEPKRMn1f2XDxWmBe=QKwC8c7OqaUjgVQ@mail.gmail.com
Whole thread Raw
In response to Re: meson's in-tree libpq header search order vs -Dextra_include_dirs  (Mario González Troncoso <gonzalemario@gmail.com>)
List pgsql-hackers
On Fri, Oct 10, 2025 at 8:09 AM Mario González Troncoso
<gonzalemario@gmail.com> wrote:
> Can you confirm you still have this problem on current master? I tried

Thanks for looking!  Yes.

> to reproduce it in debian 12 by installing `postgresql-server-dev-15`
> and adding the -Dextra_include_dirs

The problem is with libpq headers, not server headers.

Thinking about how to show this on Debian...  Also it'll fail to fail
if your libpq headers are new enough to be compatible, eg 18.  I guess
if you find an older libpq-dev .deb file, v16 is what my system is
clashing with, and unpack it into a temporary directory (something
like ar x XXX.deb then tar xf data.tar.XXX), and then point to the
headers in -Dextra_include_dirs, you should see it?

Or maybe just make a temporary file somewhere called libpq-fe.h that contains:

#error "wrong header included"

... and point to its parent with -Dextra_include_dirs.  The goal is
for the in-tree libpq-fe.h to be found sooner in the search path (as
it is with configure), completely hiding that poisoned file.



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Thoughts on a "global" client configuration?
Next
From: David Rowley
Date:
Subject: Re: VACUUM (PARALLEL) option processing not using DefElem the way it was intended