Re: BUG #18940: PostgreSQL 18beta1 fails 'collate.windows.win1252' regression when building with MSYS/mingw

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Joseph Ayers <joseph(dot)ayers(at)crunchydata(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18940: PostgreSQL 18beta1 fails 'collate.windows.win1252' regression when building with MSYS/mingw
Date: 2025-06-06 12:17:32
Message-ID: CA+hUKG+QJv-g7C2APVV7O_jEJkxH1AmvgAe8X2vDR8mRdSKn3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jun 5, 2025 at 4:32 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> I would *strongly* advise to moving to ucrt. Personally I think we should just
> refuse to build with msvcrt.

Yeah, I didn't realise that it'd still build but not work correctly,
so +1 for adding an #error like the attached. The attached passed on
CI in the MinGW and Visual Studio tasks (and in passing removes some
more trace of msvcrt), but the Debian cross-compilation step helpfully
shows how it fails with an msvcrt build:

https://cirrus-ci.com/task/4559077411389440

It cross-builds successfully on my local Debian system after
installing these packages:

gcc-mingw-w64-ucrt64
g++-mingw-w64-ucrt64

... and selecting those compilers, as shown in the attached fixup. So
I think we'll first need to get them added to the CI image, in here:

https://github.com/anarazel/pg-vm-images/blob/main/scripts/linux_debian_install_deps.sh

And then we could push something like this.

Attachment Content-Type Size
0001-Require-UCRT-on-Windows-remove-MSVCRT-traces.patch text/x-patch 3.0 KB
0002-fixup.patch text/x-patch 802 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Masahiko Sawada 2025-06-06 17:20:34 Re: Logical replication 'invalid memory alloc request size 1585837200' after upgrading to 17.5
Previous Message Jim Jones 2025-06-06 10:22:30 Re: BUG #18943: Return value of a function 'xmlBufferCreate' is dereferenced at xpath.c:177 without checking for NUL