Skip to content

Add MSYS2 depext declarations and UCRT64 support#29579

Open
smorimoto wants to merge 11 commits intomasterfrom
add-msys2-depexts
Open

Add MSYS2 depext declarations and UCRT64 support#29579
smorimoto wants to merge 11 commits intomasterfrom
add-msys2-depexts

Conversation

@smorimoto
Copy link
Copy Markdown
Member

@smorimoto smorimoto commented Mar 21, 2026

Summary

  • Add missing MSYS2 depext declarations for conf-m4, conf-perl, and conf-findutils
  • Add UCRT64 environment support to all conf-mingw-w64-*-x86_64 packages that previously hardcoded a dependency on msys2-mingw64
  • Restrict conf-mingw-w64-pkgconf-x86_64 to MSYS2 only (it was never installable on Cygwin)

These changes were discovered whilst adding MSYS2 support to ocaml/setup-ocaml.

Changes

MSYS base package depexts

m4, perl, and findutils are MSYS base packages, available across all MSYS2 environments (UCRT64, CLANG64, CLANGARM64, MSYS, MINGW64, MINGW32). A single {os-distribution = "msys2"} filter suffices to cover them all.

UCRT64 support for mingw-w64 packages

The MSYS2 project deprecated the MINGW64 environment in March 2026, recommending UCRT64 as the replacement. Six conf-mingw-w64-*-x86_64 packages hardcoded a dependency on msys2-mingw64, making them unusable with UCRT64. For each package:

  • depends is relaxed from "msys2-mingw64" to ("msys2-mingw64" | "msys2-ucrt64")
  • depexts uses %{msys2:package-prefix}% variable interpolation to resolve the correct pacman package name for the active environment, rather than hardcoding environment-specific names

Since msys2-mingw64 and msys2-ucrt64 share conflict-class: "msys2-env", the solver correctly selects exactly one.

Affected packages: conf-mingw-w64-gcc-x86_64, conf-mingw-w64-bzip2-x86_64, conf-mingw-w64-zlib-x86_64, conf-mingw-w64-zstd-x86_64, conf-mingw-w64-pkgconf-x86_64, conf-mingw-w64-gmp-x86_64.

Restrict conf-mingw-w64-pkgconf-x86_64 to MSYS2

conf-mingw-w64-pkgconf-x86_64 checks for the x86_64-w64-mingw32-pkgconf binary, which is only provided by MSYS2 packages. On Cygwin, cross-compilation uses the native pkgconf with --personality instead, and no mingw64-x86_64-pkgconf Cygwin package exists. The sole consumer (conf-pkg-config) already gates its dependency on os-distribution = "msys2", so narrowing available from os = "win32" to os = "win32" & os-distribution = "msys2" is safe.

Closes #29575, closes #29576, closes #29577, closes #29578.

@smorimoto smorimoto force-pushed the add-msys2-depexts branch 2 times, most recently from aa6c276 to 2c718c6 Compare March 21, 2026 16:58
The x86_64-w64-mingw32-pkgconf binary is only provided by MSYS2
packages. On Cygwin, cross-compilation uses the native pkgconf with
--personality instead. The sole consumer (conf-pkg-config) already
gates its dependency on os-distribution = "msys2", so narrowing
available is safe.
@mseri
Copy link
Copy Markdown
Member

mseri commented Apr 3, 2026

@dra27 what do you think? Seems fine to merge from what I can understand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants