CMake error: The C compiler is not able to compile a simple test program.
Posted: Sat Jun 25, 2022 4:01 pm
I am getting a CMake error when I do 'idf.py set-target esp32'. What am I doing wrong?
CMakeError.log:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Build flags: -mlongcalls;-Wno-frame-address
Id flags:
The output was:
1
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: error loading plugin: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: cannot open shared object file: No such file or directory
collect2: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
Build flags: -mlongcalls;-Wno-frame-address
Id flags:
The output was:
1
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: error loading plugin: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: cannot open shared object file: No such file or directory
collect2: error: ld returned 1 exit status
Determining if the C compiler works failed with the following output:
Change Dir: /home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_c017e/fast && /usr/bin/make -f CMakeFiles/cmTC_c017e.dir/build.make CMakeFiles/cmTC_c017e.dir/build
make[1]: Entering directory '/home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c017e.dir/testCCompiler.c.obj
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address -o CMakeFiles/cmTC_c017e.dir/testCCompiler.c.obj -c /home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_c017e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c017e.dir/link.txt --verbose=1
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address CMakeFiles/cmTC_c017e.dir/testCCompiler.c.obj -o cmTC_c017e
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: error loading plugin: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: cannot open shared object file: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_c017e.dir/build.make:87: cmTC_c017e] Error 1
make[1]: Leaving directory '/home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_c017e/fast] Error 2
CMakeOutput.log:
The target system is: Generic - -
The host system is: Linux - 5.10.103-v7l+ - armv7l
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Build flags: -mlongcalls;-Wno-frame-address
Id flags: -c
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"
The C compiler identification is GNU, found in "/home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.o"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
Build flags: -mlongcalls;-Wno-frame-address
Id flags: -c
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"
The CXX compiler identification is GNU, found in "/home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.o"
Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2-patch3) 8.4.0
Copyright (C) 2018 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.
CMakeError.log:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Build flags: -mlongcalls;-Wno-frame-address
Id flags:
The output was:
1
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: error loading plugin: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: cannot open shared object file: No such file or directory
collect2: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
Build flags: -mlongcalls;-Wno-frame-address
Id flags:
The output was:
1
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: error loading plugin: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: cannot open shared object file: No such file or directory
collect2: error: ld returned 1 exit status
Determining if the C compiler works failed with the following output:
Change Dir: /home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_c017e/fast && /usr/bin/make -f CMakeFiles/cmTC_c017e.dir/build.make CMakeFiles/cmTC_c017e.dir/build
make[1]: Entering directory '/home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c017e.dir/testCCompiler.c.obj
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address -o CMakeFiles/cmTC_c017e.dir/testCCompiler.c.obj -c /home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_c017e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c017e.dir/link.txt --verbose=1
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address CMakeFiles/cmTC_c017e.dir/testCCompiler.c.obj -o cmTC_c017e
/home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: error loading plugin: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: cannot open shared object file: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_c017e.dir/build.make:87: cmTC_c017e] Error 1
make[1]: Leaving directory '/home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_c017e/fast] Error 2
CMakeOutput.log:
The target system is: Generic - -
The host system is: Linux - 5.10.103-v7l+ - armv7l
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Build flags: -mlongcalls;-Wno-frame-address
Id flags: -c
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"
The C compiler identification is GNU, found in "/home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.o"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /home/heller/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
Build flags: -mlongcalls;-Wno-frame-address
Id flags: -c
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"
The CXX compiler identification is GNU, found in "/home/heller/RRCircuits/ESP32-D0WD-V3-MultiFunctionOpenMRNIDF/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.o"
Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2-patch3) 8.4.0
Copyright (C) 2018 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.