From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de>, Noah Misch <noah(at)leadboat(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Annoying build warnings from latest Apple toolchain |
Date: | 2023-10-03 20:07:30 |
Message-ID: | 2445749.1696363650@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> Assuming that this problem is restricted to initdb, which I think
> is true, probably the best fix is to cause the initdb link *only*
> to link libpgcommon before libpq. Every other non-backend program
> is interested in libpq's encoding IDs if it cares at all.
The more I thought about that the less I liked it. We're trying to
get away from link order dependencies, not add more. And the fact
that we've had a latent bug for awhile from random-ish changes in
link order should reinforce our desire to get out of that business.
So I experimented with fixing things so that the versions of these
functions exported by libpq have physically different names from those
that you'd get from linking to libpgcommon.a or libpgcommon_srv.a.
Then, there's certainty about which one a given usage will link to,
based on what the #define environment is when the call is compiled.
This leads to a pleasingly small patch, at least in the Makefile
universe (I've not attempted to sync the meson or MSVC infrastructure
with this yet). As a bonus, it should silence those new warnings
on AIX. A disadvantage is that this causes an ABI break for
backend extensions, so we couldn't consider back-patching it.
But I think that's fine given that the problem is only latent
in released branches.
Thoughts?
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
v1-distinguish-private-from-exported-encoding-funcs.patch | text/x-diff | 3.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Nico Williams | 2023-10-03 20:15:17 | Re: Pre-proposal: unicode normalized text |
Previous Message | Jeff Davis | 2023-10-03 19:54:46 | Re: Pre-proposal: unicode normalized text |