Re: BUG #19062: PostgreSQL 12.22 does not compile because of conflicting types for CollationCreate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Peter Dyballa <Peter_Dyballa(at)web(dot)de>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19062: PostgreSQL 12.22 does not compile because of conflicting types for CollationCreate
Date: 2025-10-02 01:44:01
Message-ID: 965386.1759369441@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> FTR what I was suggesting is something like CPPFLAGS="-D_STDBOOL_H"
> (or append that to anything else you are already putting in CPPFLAGS
> on the configure invocation), which should prevent <stdbool.h> from
> having any effect, meaning it can't hide c.h's definition. I don't
> know what concrete ABI dangers lurk in this area, but it doesn't look
> like ICU uses bool in public interfaces, preferring its own UBool, a
> typedef for int8_t. Hmm, so it's not immediately clear why it
> includes it... but I'm too lazy to check.

Yeah, it's hard to get excited about putting effort into this.
As of PG 18 (97525bc5c) we've moved on permanently from
supporting machines where the native bool type is not of size 1.
Theoretically it should work in older branches as long as you
don't try to interact with any libraries that use bool in
their headers --- so taking out --with-libxml and perhaps
--with-icu is probably the minimum requirement for that.
But we haven't been testing such platforms since around 2022,
so who knows if it still works in recent minor releases.

Peter, perhaps an answer if you want to keep retrocomputing
on this hardware is to use NetBSD? That does work for me
on an old G4 laptop, and it has sizeof(bool) == 1. See
buildfarm member mamba ...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Guo 2025-10-02 04:16:47 Re: [Bug] Usage of stale dead_items pointer in parallel vacuum
Previous Message Thomas Munro 2025-10-02 00:08:30 Re: BUG #19062: PostgreSQL 12.22 does not compile because of conflicting types for CollationCreate