The C compiler is not able to compile a simple test programm
Hi,
I already searched a lot about this error (including this clion forum) but I failed fixing this error. All of the checks in the toolchain options were successful.
My error log is as followed:
Error:The C compiler "C:/Users/Lorenz/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/__default__/CMakeFiles/CMakeTmp
Run Build Command:"C:/Users/Lorenz/MinGW/bin/mingw32-make.exe" "cmTC_e603e/fast"
C:/Users/Lorenz/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_e603e.dir\build.make CMakeFiles/cmTC_e603e.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/__default__/CMakeFiles/CMakeTmp'
CMakeFiles\cmTC_e603e.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_e603e.dir/testCCompiler.c.obj' failed
process_begin: CreateProcess(C:\Users\Lorenz\AppData\Local\Temp\make6240-1.bat, C:\Users\Lorenz\AppData\Local\Temp\make6240-1.bat, ...) failed.
make (e=5): Access is denied.
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_e603e.dir/testCCompiler.c.obj] Error 5
mingw32-make.exe[1]: Leaving directory 'C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/__default__/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_e603e/fast' failed
mingw32-make.exe: *** [cmTC_e603e/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration Debug
The C compiler "C:/Users/Lorenz/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/Debug/CMakeFiles/CMakeTmp
Run Build Command:"C:/Users/Lorenz/MinGW/bin/mingw32-make.exe" "cmTC_6e300/fast"
C:/Users/Lorenz/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_6e300.dir\build.make CMakeFiles/cmTC_6e300.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/Debug/CMakeFiles/CMakeTmp'
CMakeFiles\cmTC_6e300.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_6e300.dir/testCCompiler.c.obj' failed
process_begin: CreateProcess(C:\Users\Lorenz\AppData\Local\Temp\make4148-1.bat, C:\Users\Lorenz\AppData\Local\Temp\make4148-1.bat, ...) failed.
make (e=5): Access is denied.
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_6e300.dir/testCCompiler.c.obj] Error 5
mingw32-make.exe[1]: Leaving directory 'C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/Debug/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_6e300/fast' failed
mingw32-make.exe: *** [cmTC_6e300/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration Release
The C compiler "C:/Users/Lorenz/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/Release/CMakeFiles/CMakeTmp
Run Build Command:"C:/Users/Lorenz/MinGW/bin/mingw32-make.exe" "cmTC_9665f/fast"
C:/Users/Lorenz/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_9665f.dir\build.make CMakeFiles/cmTC_9665f.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/Release/CMakeFiles/CMakeTmp'
CMakeFiles\cmTC_9665f.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_9665f.dir/testCCompiler.c.obj' failed
process_begin: CreateProcess(C:\Users\Lorenz\AppData\Local\Temp\make6820-1.bat, C:\Users\Lorenz\AppData\Local\Temp\make6820-1.bat, ...) failed.
make (e=5): Access is denied.
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_9665f.dir/testCCompiler.c.obj] Error 5
mingw32-make.exe[1]: Leaving directory 'C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/Release/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_9665f/fast' failed
mingw32-make.exe: *** [cmTC_9665f/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration MinSizeRel
The C compiler "C:/Users/Lorenz/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/MinSizeRel/CMakeFiles/CMakeTmp
Run Build Command:"C:/Users/Lorenz/MinGW/bin/mingw32-make.exe" "cmTC_13445/fast"
C:/Users/Lorenz/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_13445.dir\build.make CMakeFiles/cmTC_13445.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/MinSizeRel/CMakeFiles/CMakeTmp'
CMakeFiles\cmTC_13445.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_13445.dir/testCCompiler.c.obj' failed
process_begin: CreateProcess(C:\Users\Lorenz\AppData\Local\Temp\make7780-1.bat, C:\Users\Lorenz\AppData\Local\Temp\make7780-1.bat, ...) failed.
make (e=5): Access is denied.
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_13445.dir/testCCompiler.c.obj] Error 5
mingw32-make.exe[1]: Leaving directory 'C:/Users/Lorenz/.CLion2016.1/system/cmake/generated/NewTest-49cc4fee/49cc4fee/MinSizeRel/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_13445/fast' failed
mingw32-make.exe: *** [cmTC_13445/fast] Error 2
CMake will not be able to correctly generate this project.
Please sign in to leave a comment.
@1170280050 since you have "CreateProcess: No such file or directory", I would start with suggestions from https://stackoverflow.com/questions/3848357/createprocess-no-such-file-or-directory. Also you can try using Cygwin, for example.
Hi all,
I ended up on this page because I had a similar problem.
First of all let me say that there is a deprecated way to disable it but it is not recommended and leads to problems down the line as cmake relies on the system introspection to fill some variables for some of the next steps.
So to disable you can set when running cmake by adding -DCMAKE_C_COMPILER_FORCED=true and -DCMAKE_CXX_COMPILER=true.
The issue is caused by cmake's introspection system which makes use of try_compile commands.
To perform the system introspection it will generate some temporary files, compile them with a Makefile and then delete them. If you want to disable the deleting part so that you can try and debug them manually you must add the --debug-trycompile flag to your cmake command. This will keep the files in cmake_build/CMakeFiles/CMakeTmp
You can cd into that directory and see what cmake is doing behind the scenes and what all those cmTC_* recipes do.
With this information and whatever you get in cmake_build/CMakeFiles/CMakeOutput.log and CMakeError.log I believe that you can sort out what your problem was.
Hey everyone,
I have a similar issue that I am desperate to solve :( Maybe someone has an idea what's going wrong here?
ERROR: Command errored out with exit status 1:
command: /Users/user/opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py'"'"'; __file__='"'"'/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-wheel-3j85vv1z
cwd: /private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/
Complete output (75 lines):
running bdist_wheel
running build
running build_ext
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang
-- Check for working C compiler: /Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang - broken
CMake Error at /Users/user/opt/anaconda3/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"/Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_ad633/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_ad633.dir/build.make CMakeFiles/cmTC_ad633.dir/build
Building C object CMakeFiles/cmTC_ad633.dir/testCCompiler.c.o
/Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -o CMakeFiles/cmTC_ad633.dir/testCCompiler.c.o -c /private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_ad633
/Users/user/opt/anaconda3/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ad633.dir/link.txt --verbose=1
/Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs CMakeFiles/cmTC_ad633.dir/testCCompiler.c.o -o cmTC_ad633
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_ad633] Error 1
make: *** [cmTC_ad633/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:5 (project)
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py", line 68, in <module>
zip_safe=False,
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py", line 32, in run
self.build_extension(ext)
File "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py", line 56, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/Users/user/opt/anaconda3/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/lib.macosx-10.9-x86_64-3.7', '-DPYTHON_EXECUTABLE=/Users/user/opt/anaconda3/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for spreading-CR
Running setup.py clean for spreading-CR
Failed to build spreading-CR
Installing collected packages: spreading-CR
Running setup.py install for spreading-CR ... error
ERROR: Command errored out with exit status 1:
command: /Users/user/opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py'"'"'; __file__='"'"'/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-record-dmjl62pd/install-record.txt --single-version-externally-managed --compile --install-headers /Users/user/opt/anaconda3/include/python3.7m/spreading-CR
cwd: /private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/
Complete output (77 lines):
running install
running build
running build_ext
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang
-- Check for working C compiler: /Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang - broken
CMake Error at /Users/user/opt/anaconda3/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"/Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_7d4b0/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_7d4b0.dir/build.make CMakeFiles/cmTC_7d4b0.dir/build
Building C object CMakeFiles/cmTC_7d4b0.dir/testCCompiler.c.o
/Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -o CMakeFiles/cmTC_7d4b0.dir/testCCompiler.c.o -c /private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_7d4b0
/Users/user/opt/anaconda3/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7d4b0.dir/link.txt --verbose=1
/Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs CMakeFiles/cmTC_7d4b0.dir/testCCompiler.c.o -o cmTC_7d4b0
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_7d4b0] Error 1
make: *** [cmTC_7d4b0/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:5 (project)
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py", line 68, in <module>
zip_safe=False,
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/user/opt/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py", line 32, in run
self.build_extension(ext)
File "/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py", line 56, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/Users/user/opt/anaconda3/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/build/lib.macosx-10.9-x86_64-3.7', '-DPYTHON_EXECUTABLE=/Users/user/opt/anaconda3/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/user/opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py'"'"'; __file__='"'"'/private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-req-build-7dk58ciu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hg/cv1z7tsd57g3d07dp226b_6w0000gn/T/pip-record-dmjl62pd/install-record.txt --single-version-externally-managed --compile --install-headers /Users/user/opt/anaconda3/include/python3.7m/spreading-CR Check the logs for full command output.
@... you need to use compilers from Xcode command line developer tools (https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-macos.html#reqtools) instead of /Users/user/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang.
Please execute the
xcode-select --installcommand in Terminal, after that specify /usr/bin/make in the Make field, /Library/Developer/CommandLineTools/usr/bin/cc in the C compiler field, /Library/Developer/CommandLineTools/usr/bin/c++ in the C++ compiler field (see this comment).I have the same problem
/home/yaodav/clion-2019.1.4/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/usr/local/bin/cmake -DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/c++ -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF -G "CodeBlocks - Unix Makefiles" /home/yaodav/Desktop/dnr_main_repo/test
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc - broken
CMake Error at /home/yaodav/clion-2019.1.4/bin/cmake/linux/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/usr/local/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/yaodav/Desktop/dnr_main_repo/test/cmake-build-debug/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/local/bin/cmake cmTC_5984f/fast && CMake Error: The source directory "/home/yaodav/Desktop/dnr_main_repo/test/cmake-build-debug/CMakeFiles/CMakeTmp/cmTC_5984f/fast" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/home/yaodav/Desktop/dnr_main_repo/test/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/home/yaodav/Desktop/dnr_main_repo/test/cmake-build-debug/CMakeFiles/CMakeError.log".
how to soleve it?
Yaodav Rosenberg you've selected the CMake executable instead of the make in the "Make" field, that's incorrect. Please empty the "Make", "C Compiler" and "C++ Compiler" fields in `File | Settings | Build, Execution, Deployment | Toolchains` and let CLion autodetect them.
I have a similar problem trying to setup CLion on Windows with WSL/Ubuntu. Note that cmake is version 3.18 rather than the WSL default. Appreciate any help you can offer.
The CMakeError.log file
and the CMakeOutput.log file
Andrew G. please send a screenshot of your WSL toolchain and the idea.log file (Help | Show Log in ...) to clion-support at jetbrains.com.
Hi,
I also get a similar error message on my mac, is there any solution to this problem. My compiler fails to load due to a CMake error.
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/Applications/CLion.app/Contents/bin/ninja/mac/ninja -G Ninja -S /Users/bigwahbs/CLionProjects/untitled3 -B /Users/bigwahbs/CLionProjects/untitled3/cmake-build-debug
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler
"/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/bigwahbs/CLionProjects/untitled3/cmake-build-debug/CMakeFiles/CMakeTmp
Run Build Command(s):/Applications/CLion.app/Contents/bin/ninja/mac/ninja cmTC_f1a0d && [1/2] Building C object CMakeFiles/cmTC_f1a0d.dir/testCCompiler.c.o
FAILED: CMakeFiles/cmTC_f1a0d.dir/testCCompiler.c.o
/usr/bin/cc -arch arm64 -o CMakeFiles/cmTC_f1a0d.dir/testCCompiler.c.o -c /Users/bigwahbs/CLionProjects/untitled3/cmake-build-debug/CMakeFiles/CMakeTmp/testCCompiler.c
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/Users/bigwahbs/CLionProjects/untitled3/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/Users/bigwahbs/CLionProjects/untitled3/cmake-build-debug/CMakeFiles/CMakeError.log".
[Failed to reload]
Ahmed Habib please open the Terminal, and run the following command: `xcode-select --install`. After that in CLion please do `Tools | CMake | Reset Cache and Reload Project`. It should help.