When I create new project in Clion, cmake cannot find CMakeTmp directory.
Run Build Command(s):/usr/bin/cmake cmTC_df723/fast && No such file or directory
OS: Linux Mint 19 (Ubuntu based)
I have tried:
- reinstalling gcc (now on version 8.3.0)
- reinstalling cmake (now on version 3.15.2)
- unset TMP from (CMake cannot compile test program as source directory doesnt exist)
- set(CMAKE_C_COMPILER gcc)
- set(CMAKE_SYSTEM_NAME Linux)
- checked permissions to ClionProject subdirectories
Error output:
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/usr/bin/cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/gcc -G "CodeBlocks - Unix Makefiles" /home/sacha/CLionProjects/testProject
-- The C compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/gcc
CMake Error: Generator: execution of make failed. Make command was: /usr/bin/cmake cmTC_df723/fast &&
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/local/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/usr/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/sacha/CLionProjects/testProject/cmake-build-release-system/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/cmake cmTC_df723/fast && No such file or directory
Generator: execution of make failed. Make command was: /usr/bin/cmake cmTC_df723/fast &&
Any help or directions appreciated, thanks!
CMake Error: Generator: execution of make failed.
, I would interpret it as "something wrong with your environment settings". In the argument-DCMAKE_MAKE_PROGRAM=/usr"/bin/cmake
which setsmake
command the double quote looks very suspicious. It could be the very reason which invalidates the path tomake
. – TsyvarevCMAKE_MAKE_PROGRAM
parameter: it should refer to Make executable, but/usr/bin/cmake
, according to its last component, refers to CMake one. These executables are definitely not interchangeable. Probably, you need/usr/bin/make
instead (or just typewhich make
and find the proper path). – Tsyvarev