idf4.2报错找不到cc1
Posted: Sun Jan 10, 2021 4:37 pm
环境:ubuntu 20.04
esp-idf-v4.2(官网下载解压版本)
按照快速入门进行配置,到配置hellow world时,执行idf.py set-target esp32报错:
esp-idf-v4.2(官网下载解压版本)
按照快速入门进行配置,到配置hellow world时,执行idf.py set-target esp32报错:
- zhangch@zch-vm-esp:~/esp/hello_world$ idf.py set-target esp32
- Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
- Executing action: fullclean
- Build directory '/home/zhangch/esp/hello_world/build' not found. Nothing to clean.
- Executing action: set-target
- Set Target to: esp32, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.
- Running cmake in directory /home/zhangch/esp/hello_world/build
- Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=0 /home/zhangch/esp/hello_world"...
- -- Found Git: /usr/bin/git (found version "2.25.1")
- -- The C compiler identification is unknown
- -- The CXX compiler identification is GNU 8.4.0
- -- The ASM compiler identification is GNU
- -- Found assembler: /home/zhangch/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
- -- Check for working C compiler: /home/zhangch/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
- -- Check for working C compiler: /home/zhangch/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -- broken
- CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
- The C compiler
- "/home/zhangch/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc"
- is not able to compile a simple test program.
- It fails with the following output:
- Change Dir: /home/zhangch/esp/hello_world/build/CMakeFiles/CMakeTmp
- Run Build Command(s):/usr/bin/ninja cmTC_ffc4f && [1/2] Building C object CMakeFiles/cmTC_ffc4f.dir/testCCompiler.c.obj
- FAILED: CMakeFiles/cmTC_ffc4f.dir/testCCompiler.c.obj
- /home/zhangch/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address -o CMakeFiles/cmTC_ffc4f.dir/testCCompiler.c.obj -c testCCompiler.c
- [color=#FF0000]xtensa-esp32-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory[/color]
- ninja: build stopped: subcommand failed.
- CMake will not be able to correctly generate this project.
- Call Stack (most recent call first):
- /home/zhangch/esp/esp-idf-v4.2/tools/cmake/project.cmake:307 (__project)
- CMakeLists.txt:6 (project)
- -- Configuring incomplete, errors occurred!
- See also "/home/zhangch/esp/hello_world/build/CMakeFiles/CMakeOutput.log".
- See also "/home/zhangch/esp/hello_world/build/CMakeFiles/CMakeError.log".
- cmake failed with exit code 1
- zhangch@zch-vm-esp:~/esp/hello_world$