

Hi, i got the same problem, but cmake found the compiler. Again this is pointing to a compiler installation problem.

You’ll be able to see how it invoked the compiler and with which options. All of the output for this step is in the log and error files that CMake generates in the build folder. The first message in the output was - The C compiler identification is unknown which is pretty clear your compiler isn’t working. You can paste the command, C:\ProgramData\chocolatey\bin\x86_64-w64-mingw32-gcc.exe -o CMakeFiles\cmTC_ffa53.dir\testCCompiler.c.obj -c C:\gitlab-runner\builds\zjE1Mkfg\0\mlz\kww\build\CMakeFiles\CMakeTmp\testCCompiler.c, directly into your command shell and see what it does (if the files still exist).įor these kinds of problems you can run CMake with the -debug-trycompile option and the test project won’t be automatically cleaned up. I have doubts that x86_64-w64-mingw32-gcc is installed correctly. Mingw32-make: Leaving directory 'C:/gitlab-runner/builds/zjE1Mkfg/0/mlz/kww/build/CMakeFiles/CMakeTmp' Mingw32-make: Entering directory 'C:/gitlab-runner/builds/zjE1Mkfg/0/mlz/kww/build/CMakeFiles/CMakeTmp'īuilding C object CMakeFiles/cmTC_ffa53.dir/testCCompiler.c.objĬ:\ProgramData\chocolatey\bin\x86_64-w64-mingw32-gcc.exe -o CMakeFiles\cmTC_ffa53.dir\testCCompiler.c.obj -c C:\gitlab-runner\builds\zjE1Mkfg\0\mlz\kww\build\CMakeFiles\CMakeTmp\testCCompiler.c Run Build Command(s):C:/ProgramData/chocolatey/bin/mingw32-make.exe cmTC_ffa53/fast & C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/mingw32-make -f CMakeFiles\cmTC_ffa53.dir\build.make CMakeFiles/cmTC_ffa53.dir/build On SO it was shown that gcc was printing an error message of Error 1. I saw a patch that removes this check and should be part of a future release of CMake. You can rerun it afterwords and CMake will continue with normal processing. The sh.exe is only a problem when you run CMake the first time when trying to build the project. To build under a Windows command prompt, use the MinGW Makefiles generator.” However, the CMake documentation seems to rule this out: “not compatible with a Windows command prompt. Other advice on the web suggests to use -G "MSYS Makefiles". How to proceed? Is there a chance to work around the sh.exe problem? Somewhere it’s suggested to add -DCMAKE_SH="CMAKE_SH-NOTFOUND", which, however, has no effect. However, sh.exe comes with several applications, among them Git and Visual Studio, which I cannot remove. Is not able to compile a simple test programįrom the following lines we learn that the test program is called testCCompiler.c, but not why the compilation fails.įrom various web sources I understand that MinGW is bound to fail if sh.exe is present on the system. Invocation is from gitlab-runner through CMake: cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -B. MinGW has been installed from Chocolatey.
