mattwallace
mattwallace

Reputation: 4222

Clion and CMake fail after updating to xcode 8

I get the following error after updating to xcode 8 and I'm not sure how to fix.

Error:The C compiler "/usr/bin/cc" is not able to compile a simple test program.
It fails with the following output:
 Change Dir: /Users/username/Library/Caches/CLion2016.2/cmake/generated/CacheBack-27c25a9c/27c25a9c/__default__/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_e91e5/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_e91e5.dir/build.make CMakeFiles/cmTC_e91e5.dir/build
Building C object CMakeFiles/cmTC_e91e5.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_e91e5.dir/testCCompiler.c.o -c /Users/username/Library/Caches/CLion2016.2/cmake/generated/CacheBack-27c25a9c/27c25a9c/__default__/CMakeFiles/CMakeTmp/testCCompiler.c
cc: error: unable to find utility "clang", not a developer tool or in PATH
make[1]: *** [CMakeFiles/cmTC_e91e5.dir/testCCompiler.c.o] Error 72
make: *** [cmTC_e91e5/fast] Error 2
CMake will not be able to correctly generate this project.

Upvotes: 1

Views: 765

Answers (2)

Martin Pfeffer
Martin Pfeffer

Reputation: 12627

I had to accept the license dialog after starting Xcode to get the updated components. After that I restarted Clion and it worked.

Upvotes: 0

Anton Makeev
Anton Makeev

Reputation: 1084

Please check xcode-select -p, make sure it points to Xcode 8 installation and run xcode-select --install after that.

Upvotes: 1

Related Questions