CMAKE错误/ usr / bin / cc - 已损坏

时间:2016-04-27 07:02:39

标签: c++ linux

我正在尝试编译一个简单的 .cpp 文件但是当我发出 cmake .. 时会抛出错误

-- The C compiler identification is GNU 4.7.3

-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/bin/cc

-- **Check for working C compiler: /usr/bin/cc -- broken**

CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/cc" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /home/user/jagdish/hello/CMakeFiles/CMakeTmp



  Run Build Command:/usr/bin/make "cmTryCompileExec3772316685/fast"

  /usr/bin/make -f CMakeFiles/cmTryCompileExec3772316685.dir/build.make
  CMakeFiles/cmTryCompileExec3772316685.dir/build

  make[1]: Entering directory `/home/user/jagdish/hello/CMakeFiles/CMakeTmp'

  /usr/bin/cmake -E cmake_progress_report
  /home/user/jagdish/hello/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building C object
  CMakeFiles/cmTryCompileExec3772316685.dir/testCCompiler.c.o

  /usr/bin/cc -o CMakeFiles/cmTryCompileExec3772316685.dir/testCCompiler.c.o
  -c /home/user/jagdish/hello/CMakeFiles/CMakeTmp/testCCompiler.c

  Linking C executable cmTryCompileExec3772316685

  /usr/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec3772316685.dir/link.txt --verbose=1

  /usr/bin/cc CMakeFiles/cmTryCompileExec3772316685.dir/testCCompiler.c.o -o
  cmTryCompileExec3772316685 -rdynamic

  collect2: error: ld terminated with signal 11 [Segmentation fault]

  make[1]: *** [cmTryCompileExec3772316685] Error 1

  make[1]: Leaving directory `/home/user/jagdish/hello/CMakeFiles/CMakeTmp'

  make: *** [cmTryCompileExec3772316685/fast] Error 2





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):



-- Configuring incomplete, errors occurred!
See also "/home/user/jagdish/hello/CMakeFiles/CMakeOutput.log".
See also "/home/user/jagdish/hello/CMakeFiles/CMakeError.log".

0 个答案:

没有答案