Skip to content

msys2: Recommend correct cmake package #59001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2025
Merged

msys2: Recommend correct cmake package #59001

merged 2 commits into from
Jul 15, 2025

Conversation

Keno
Copy link
Member

@Keno Keno commented Jul 14, 2025

msys2 ships 2 different cmake packages, one built natively (with mingw prefix in the package name) and one built against the posix emulation environment. The posix emulation one does not work because it will detect unix-style paths, which it then writes into files that native tools process. Unlike during command invocation (where the msys2 runtime library does path translation), when paths are written to files, they are written verbatim.

The practical result of this is that e.g. the LLVM build will fail with a mysterious libz link failure (as e.g. reported in #54981).

This is our fault, because our built instructions tell the user to install the wrong one.

Fix all that by

  1. Correcting the build instructions to install the correct cmake
  2. Detecting if the wrong cmake is installed and advising the correct one
  3. Fixing an issue where the native CMake did not like our CMAKE_C_COMPILER setting.

With all this, CMake runs correctly under msys2 with USE_BINARYBUILDER_LLVM=0.

msys2 ships 2 different cmake packages, one built natively
(with mingw prefix in the package name) and one built against the
posix emulation environment. The posix emulation one does not work
because it will detect unix-style paths, which it then writes into
files that native tools process. Unlike during command invocation
(where the msys2 runtime library does path translation), when paths
are written to files, they are written verbatim.

The practical result of this is that e.g. the LLVM build will fail
with a mysterious libz link failure (as e.g. reported in #54981).

This is our fault, because our built instructions tell the user to
install the wrong one.

Fix all that by
1. Correcting the build instructions to install the correct cmake
2. Detecting if the wrong cmake is installed and advising the correct one
3. Fixing an issue where the native CMake did not like our CMAKE_C_COMPILER setting.

With all this, CMake runs correctly under msys2 with USE_BINARYBUILDER_LLVM=0.
@Keno Keno added the msys2 label Jul 15, 2025
@Keno
Copy link
Member Author

Keno commented Jul 15, 2025

Welp, our buildbots have the wrong cmake (unsurprisingly). I guess I'll change the check to only fire when we actually call cmake, but we should also fix the buildbots.

Keno added a commit that referenced this pull request Jul 15, 2025
@Keno
Copy link
Member Author

Keno commented Jul 15, 2025

but we should also fix the buildbots.

JuliaCI/rootfs-images#264

@Keno Keno merged commit f2a8e18 into master Jul 15, 2025
5 of 7 checks passed
@Keno Keno deleted the kf/msys2cmake branch July 15, 2025 06:42
staticfloat pushed a commit to JuliaCI/rootfs-images that referenced this pull request Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant