Starting with 3.6.0 when cmake calls into make/ninja/gcc there is a chance of
that failing, for example like this:

CMake Error: Generator: build tool execution failed, command was:
/usr/bin/cmake.exe -E env VERBOSE=1 /usr/bin/make.exe -f Makefile
cmTC_c87e2/fast

* Problem starts with cygwin 3.6.0
* Problem starts with cmake 3.29+ (3.31 is in Cygwin marked as test
and is new enough)
* It doesn't seem to matter which tool is called from cmake
* Downgrading either cmake to 3.28 or cygwin to 3.5.7 makes the problem go away

Instructions for how to reproduce in Cygwin:

* Update Cygwin install to have 3.6.0
* Install the testing version (3.31.3 atm) of cmake
* Run mintty (for some reason in the Windows Terminal it doesn't
reproduce for me)

```
# CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(MinimalChecks C)
include(CheckCSourceCompiles)
foreach(i RANGE 1 100)
check_c_source_compiles("int main() { return 0;}" CHECK_${i})
endforeach()
```

```
cmake -B _build --fresh
# also fails: cmake -B _build --fresh -DCMAKE_MAKE_PROGRAM="echo"
```

Expected: 100 times "Success"

Actual: sometimes "Failed"

Related downstream issue with a bit more context/history:
https://github.com/msys2/msys2-runtime/issues/272#issuecomment-2764714256

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to