Skip to content

Detecting C compiler ABI info - failed

A very simple cmakelist, but configure failed. Versions:

  • cmake: 3.19.2
  • gcc/g++: 9.2.0
  • OS: Windows_NT x64 10.0.19042
# cmakelist.txt
cmake_minimum_required(VERSION 3.18)
project(test_clion_cpp)

set(CMAKE_CXX_STANDARD 11)

add_executable(test_clion_cpp main.cpp)

Output:

[main] 正在配置文件夹: test-clion-cpp 
[proc] 执行命令: C:\applications\CMake\bin\cmake.EXE --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=C:\applications\TDM-GCC\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\applications\TDM-GCC\bin\g++.exe -Hc:/code/cpp/test-clion-cpp -Bc:/code/cpp/test-clion-cpp/build -G "MinGW Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The C compiler identification is GNU 9.2.0
[cmake] -- The CXX compiler identification is GNU 9.2.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - failed
[cmake] -- Check for working C compiler: C:/applications/TDM-GCC/bin/gcc.exe
[cmake] -- Check for working C compiler: C:/applications/TDM-GCC/bin/gcc.exe - broken
[cmake] CMake Error at C:/applications/cmake/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):
[cmake]   The C compiler
[cmake] 
[cmake]     "C:/applications/TDM-GCC/bin/gcc.exe"
[cmake] 
[cmake]   is not able to compile a simple test program.
[cmake] 
[cmake]   It fails with the following output:
[cmake] 
[cmake]     Change Dir: C:/code/cpp/test-clion-cpp/build/CMakeFiles/CMakeTmp
[cmake]     
[cmake]     Run Build Command(s):C:/applications/TDM-GCC/bin/mingw32-make.exe cmTC_d4079/fast && mingw32-make.exe: *** INTERNAL: readdir: No such file or directory
[cmake]     .  Stop.
[cmake]     
[cmake]     
[cmake] 
[cmake]   
[cmake] 
[cmake]   CMake will not be able to correctly generate this project.
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:2 (project)
[cmake] 
[cmake] 
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "C:/code/cpp/test-clion-cpp/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "C:/code/cpp/test-clion-cpp/build/CMakeFiles/CMakeError.log".

cmakeError.log:

Detecting C compiler ABI info failed to compile with the following output:
Change Dir: C:/code/cpp/test-clion-cpp/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/applications/TDM-GCC/bin/mingw32-make.exe cmTC_71cd5/fast && mingw32-make.exe: *** INTERNAL: readdir: No such file or directory

.  Stop.





Determining if the C compiler works failed with the following output:
Change Dir: C:/code/cpp/test-clion-cpp/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/applications/TDM-GCC/bin/mingw32-make.exe cmTC_d4079/fast && mingw32-make.exe: *** INTERNAL: readdir: No such file or directory

.  Stop.

CMakeOutput:

The system is: Windows - 10.0.19042 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/applications/TDM-GCC/bin/gcc.exe 
Build flags: 
Id flags:  

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/code/cpp/test-clion-cpp/build/CMakeFiles/3.19.2/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/applications/TDM-GCC/bin/g++.exe 
Build flags: 
Id flags:  

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "C:/code/cpp/test-clion-cpp/build/CMakeFiles/3.19.2/CompilerIdCXX/a.exe"
Edited by 余腾靖
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information