Apparently because it tries to link in runtime libraries which are not there, specifically
Code: Select all
clang_rt.crtbegin-riscv32.o
libclang_rt.builtins-riscv32.a
clang_rt.crtend-riscv32.o
ESP-IDF v5.1, Windows,
Code: Select all
* esp-clang: Toolchain for all Espressif chips based on clang (optional)
- 15.0.0-23786128ae (recommended, installed)
CMakeError.log:
Code: Select all
cmd.exe /C "cd . && D:\Espressif\tools\esp-clang\15.0.0-23786128ae\esp-clang\bin\clang.exe --target=riscv32-esp-elf -march=rv32imc -mabi=ilp32 -v CMakeFiles/cmTC_c8f86.dir/CMakeCCompilerABI.c.obj -o cmTC_c8f86 && cd ."
clang version 15.0.0 (https://github.com/espressif/llvm-project.git 23786128aea96880a5752f6bd1c22aab27622ccf)
Target: riscv32-esp-unknown-elf
Thread model: posix
InstalledDir: D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/bin
Found candidate GCC installation: D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/bin/../lib/gcc/riscv32-esp-elf/11.2.0
Selected GCC installation: D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/bin/../lib/gcc/riscv32-esp-elf/11.2.0
Candidate multilib: .;
Candidate multilib: no-rtti;@fno-rtti
Candidate multilib: rv32i/ilp32;@march=rv32i@mabi=ilp32
Candidate multilib: rv32i/ilp32/no-rtti;@march=rv32i@mabi=ilp32@fno-rtti
Candidate multilib: rv32imc/ilp32;@march=rv32imc@mabi=ilp32
Candidate multilib: rv32imc/ilp32/no-rtti;@march=rv32imc@mabi=ilp32@fno-rtti
Candidate multilib: rv32imafc/ilp32f;@march=rv32imafc@mabi=ilp32f
Candidate multilib: rv32imafc/ilp32f/no-rtti;@march=rv32imafc@mabi=ilp32f@fno-rtti
Selected multilib: rv32imc/ilp32;@march=rv32imc@mabi=ilp32
"D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/bin/ld.lld" -m elf32lriscv -X D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/bin/../lib/gcc/riscv32-esp-elf/11.2.0/../../../../riscv32-esp-elf/lib/rv32imc/ilp32/crt0.o D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/lib/clang/15.0.0/lib/clang_rt.crtbegin-riscv32.o CMakeFiles/cmTC_c8f86.dir/CMakeCCompilerABI.c.obj -LD:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/bin/../lib/gcc/riscv32-esp-elf/11.2.0/rv32imc/ilp32 -LD:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/bin/../lib/gcc/riscv32-esp-elf/11.2.0/../../../../riscv32-esp-elf/lib/rv32imc/ilp32 -LD:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/bin/../lib/gcc/riscv32-esp-elf/11.2.0 -LD:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/bin/../lib/gcc/riscv32-esp-elf/11.2.0/../../../../riscv32-esp-elf/lib --start-group -lc -lgloss -lnosys --end-group D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/lib/clang/15.0.0/lib/libclang_rt.builtins-riscv32.a D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/lib/clang/15.0.0/lib/clang_rt.crtend-riscv32.o -o cmTC_c8f86
ld.lld: error: cannot open D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/lib/clang/15.0.0/lib/clang_rt.crtbegin-riscv32.o: No such file or directory
ld.lld: error: cannot open D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/lib/clang/15.0.0/lib/libclang_rt.builtins-riscv32.a: No such file or directory
ld.lld: error: cannot open D:/Espressif/tools/esp-clang/15.0.0-23786128ae/esp-clang/lib/clang/15.0.0/lib/clang_rt.crtend-riscv32.o: No such file or directory
clang: error: ld command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.