CMAKE_SH NOT FOUND problem

Hello, I'm new to CLion (and to the C++ as well), but I really want to use it. I've Installed MinGW compiler and CLion, but I really can't make them work properly. So, it seems to me that the main problem is Cmake.
I've surfed the Internet and that's what I found: the evilness comes from sh.exe. I've tryed so many things to do: tryed to rename sh.exe, to change envirnoment variables and nothing works.

I'm a student, so I may have asked a stupid question, but I really hope you can help me.

There is Clion output:

Error:The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/__default__/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_c104e/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_c104e.dir\build.make CMakeFiles/cmTC_c104e.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/__default__/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c104e.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_c104e.dir\testCCompiler.c.obj -c C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\__default__\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error: C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\__default__\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTC_c104e.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_c104e.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_c104e.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/__default__/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_c104e/fast' failed
mingw32-make.exe: *** [cmTC_c104e/fast] Error 2
CMake will not be able to correctly generate this project.
___
Error:Configuration Debug
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/Debug/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_822b5/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_822b5.dir\build.make CMakeFiles/cmTC_822b5.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/Debug/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_822b5.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_822b5.dir\testCCompiler.c.obj -c C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\Debug\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error: C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\Debug\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTC_822b5.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_822b5.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_822b5.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/Debug/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_822b5/fast' failed
mingw32-make.exe: *** [cmTC_822b5/fast] Error 2
CMake will not be able to correctly generate this project.
___
Error:Configuration Release
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/Release/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_90ae1/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_90ae1.dir\build.make CMakeFiles/cmTC_90ae1.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/Release/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_90ae1.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_90ae1.dir\testCCompiler.c.obj -c C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\Release\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error: C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\Release\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTC_90ae1.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_90ae1.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_90ae1.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/Release/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_90ae1/fast' failed
mingw32-make.exe: *** [cmTC_90ae1/fast] Error 2
CMake will not be able to correctly generate this project.
___
Error:Configuration RelWithDebInfo
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/RelWithDebInfo/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_a549e/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_a549e.dir\build.make CMakeFiles/cmTC_a549e.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/RelWithDebInfo/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a549e.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_a549e.dir\testCCompiler.c.obj -c C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\RelWithDebInfo\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error: C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\RelWithDebInfo\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTC_a549e.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_a549e.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_a549e.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/RelWithDebInfo/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_a549e/fast' failed
mingw32-make.exe: *** [cmTC_a549e/fast] Error 2
CMake will not be able to correctly generate this project.
___
Error:Configuration MinSizeRel
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/MinSizeRel/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_1f826/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_1f826.dir\build.make CMakeFiles/cmTC_1f826.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/MinSizeRel/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_1f826.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_1f826.dir\testCCompiler.c.obj -c C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\MinSizeRel\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error: C:\Users\Павел\.clion11\system\cmake\generated\99dd6eca\99dd6eca\MinSizeRel\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTC_1f826.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_1f826.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_1f826.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Павел/.clion11/system/cmake/generated/99dd6eca/99dd6eca/MinSizeRel/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_1f826/fast' failed
mingw32-make.exe: *** [cmTC_1f826/fast] Error 2
CMake will not be able to correctly generate this project.



Attachment(s):
cmake.png
1 comment
Comment actions Permalink

Hi Pavel.

We suppose that it's not CLion problem, but problem with using CMake + MinGW, because they don't support non-latin symbols (in your example there are non-latin symbols in the path to the directory: C:/Users/Павел/.clion11/... )

To solve the problem you can
1) change using MinGW to Cygwin
or
2) сhange idea.system.path in the IDE_HOME\bin\idea.properties file so it won't contain non-latin symbols (please see https://intellij-support.jetbrains.com/entries/23358108 and https://www.jetbrains.com/idea/help/project-and-ide-settings.html for more details).

0

Please sign in to leave a comment.