gcc (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
如果不加-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
– The C compiler identification is GNU 9.2.0
– The CXX compiler identification is GNU 9.2.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – broken
CMake Error at /opt/cmake/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
“/usr/bin/cc”
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /opt/nebula-2.6.2/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_e52be/fast
/usr/bin/gmake -f CMakeFiles/cmTC_e52be.dir/build.make CMakeFiles/cmTC_e52be.dir/build
gmake[1]: Entering directory ‘/opt/nebula-2.6.2/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_e52be.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_e52be.dir/testCCompiler.c.o -c /opt/nebula-2.6.2/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_e52be
/opt/cmake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e52be.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_e52be.dir/testCCompiler.c.o -o cmTC_e52be
collect2: fatal error: cannot find ‘ld’
compilation terminated.
CMakeFiles/cmTC_e52be.dir/build.make:86: recipe for target ‘cmTC_e52be’ failed
gmake[1]: *** [cmTC_e52be] Error 1
gmake[1]: Leaving directory ‘/opt/nebula-2.6.2/build/CMakeFiles/CMakeTmp’
Makefile:121: recipe for target ‘cmTC_e52be/fast’ failed
gmake: *** [cmTC_e52be/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:24 (project)