please post your config file on discourse.cmake.org so it can be added to cmake

While trying to compile a modified version of LLVM in MSYS MINGW64, I got this message repeatedly:

please post your config file on discourse.cmake.org so it can be added to cmake

so that’s exactly what I am trying to do.

Here is the cmake command I was running:

cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS='clang;lld' C:/msys64/home/johan/llvm/llvm -GNinja

My MSYS is freshly installed. I have previously compiled exactly the same LLVM project with the same cmake command without problems, with an older version of MSYS. Due to a crashed SSD, I had to re-install everything.

The cmake command runs for a long time, then ends with:

System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19045 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Configuring incomplete, errors occurred!

I have very little experience with cmake; does “your config file” in these messages refer to CMakeLists.txt?

Also, as a new user, I cannot upload any files on this forum. What exactly am I supposed to do?

Are you using MSYS from an MSYS shell? Are you using an MSYS-related CMake binary (i.e., the “stock” Windows build doesn’t support MSYS)?

Cc: @brad.king

  1. Yes I am using an MSYS shell, more specifically the MINGW64 variant.

  2. I am using the cmake binary from MSYS, installed using pacman -S cmake in the MSYS shell

Thanks; that should work. What versions of MSYS and CMake are involved here?

MSYS version:

$ cat /proc/version
MINGW64_NT-10.0-19045 version 3.4.10.x86_64 (runneradmin@fv-az1495-832) (gcc version 13.2.0 (GCC) ) 2023-12-22 10:06 UTC

Cmake version:

$ cmake --version
cmake version 3.28.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

installed using pacman -S cmake in the MSYS shell

That installs the version of CMake that’s built against the MSYS runtime library, and therefore is useful only for builds targeting the MSYS runtime. To target Windows with the GNU ABI (MinGW), use the mingw64/mingw-w64-x86_64-cmake package or CMake’s official Windows binaries.

CMake 3.29 includes some updates to help users avoid this problem. See the CMAKE_SYSTEM_NAME documentation’s note about MSYS/MinGW the bottom. Also see CMake MR 9213.

2 Likes