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

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

On Wed, Oct 1, 2025 at 11:46 PM Peter Dyballa <Peter_Dyballa(at)web(dot)de> wrote:
> #define bool _Bool
> #define true 1
> #define false 0
> # 49 "/opt/local/lib/gcc14/gcc/powerpc-apple-darwin9/14.2.0/include/stdbool.h" 3 4
> #define __bool_true_false_are_defined 1
> # 53 "/opt/local/include/libxml2/unicode/umachine.h" 2

OK, so now we see who is including <stdbool.h>. If XML support isn't
important to you, perhaps another option would be to remove
--enable-libxml from your configure invocation? Hmm, that appears to
be a vendored copy of ICU that you get if libxml2 was built with
--with-icu, rather than something coming from libxml's "own" headers.
I guess that means you'll have the same problem again if you also have
--with-icu in your PostgreSQL configure invocation, so you'd need to
take that out too.

> My understanding of C is too limited to see an error and find a solution. So let's leave it!

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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-10-02 01:44:01 Re: BUG #19062: PostgreSQL 12.22 does not compile because of conflicting types for CollationCreate
Previous Message Pavel Stehule 2025-10-01 18:16:26 Re: IN List operator , where list of values are over a number of lines