Re: Lower priority of the configure option --with-libraries causes wrong lib resolution

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Charles Samborski <demurgos@demurgos.net>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-07-27T22:29:58Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Don't put library-supplied -L/-I switches before user-supplied ones.

  2. psql: Change new \conninfo to use SSL instead of TLS

Attachments

I wrote:
> I think we need something like the attached to ensure
> that -L switches coming from libraries' configure helpers
> don't override user-specified directories.

I looked this over again, and was about ready to commit it when
I realized that we have essentially the same problem for -I
switches.  If there's a --with-includes switch, then the -I
switches from that should override anything supplied by external
configuration helpers, but we didn't reliably get that right.
(Some of those bugs are new in v18, but others are older.)

However, -I switches pointing to in-tree directories should
override all of those.  We fixed one instance of that problem
a few months ago in cb36f8ec2, but I was dismayed to find that
there are more.  This could result in build failures thanks to
pulling in the wrong version of some Postgres header.

Hence, 0001 attached is the same as before (but now with
a commit message), and then 0002 tackles the problems with -I
switches.

			regards, tom lane