-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Checklist
- Checked the issue tracker for similar issues to ensure this is not a duplicate
- Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
- Tested with the latest version to ensure the issue hasn't been fixed
How often does this bug occurs?
always
Expected behavior
I expect the <ESP-IDF-DIR>/tools/tools.json
to have a tool ("clang" or "clang-libs" or similar) that does contain the libclang.so/.dll
for all major operating systems, including Windows.
Actual behavior (suspected bug)
Good:
Versions of ESP-IDF <= 5.3 contain the "esp-clang" tool (for versions < 5.1 it is named differently - "xtensa-clang" but is still OK), which - inside - the TGZ tarball does contain both the clang binaries (which we don't need) as well as the libclang.so/dll
library. So by downloading this tool, esp-idf-sys
can make sure it does have a proper clang
library for Rust "bindgen" ("bindgen" uses the library, not the binary)
Not good:
Versions of ESP IDF >= 5.4 still contain the "esp-clang" tool as per above, however with version updated to clang-esp-18.1.2_20240912. This clang version has multiple issues:
-
It does not contain the
libclang.so
lib, which makes it backwards incompatible, as found out here. Now, if there is a separate "libs" tarball introduced, the minimum I would expect from such a backwards incompatible change is that there would be a new "tool" intools.json
which is namedesp-clang-libs
or something, which I can instructesp-idf-sys
to download for newer ESP-IDF versions -
However, what is worse is that there is no "libs" tarball for Windows/Linux/Mac x86_64 in the current 18.1.2_20240912 clang distro. How are we supposed to build
esp-idf-sys
+ ESP IDF >= 5.4 then? Sure, I can use an external "clang" for the RiscV targets (though that's very suboptimal as we otherwise use all the ESP IDF tooling for everything else) but what about the xtensa chips?
See also:
- Build failed due to failure of loading libclang.dll when generating bindings esp-rs/espup#440 - when the problem started surfacing
esp-17.0.1_20240419
full toolchain tarball doesn't contain libclang (LLVM-352) #99 - problem reported for the first time, but in a different context (espup)
Error logs or terminal output
No response
Steps to reproduce the behavior
- Look at the
tools.json
of the cited ESP-IDF versions - Look at this download location for the Espressif clang toolchains: https://github.com/espressif/llvm-project/releases/
Project release version
ESP IDF 5.4 or higher
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Windows/Linux/Mac x86_64
Operating system version
All
Shell
ZSH
Additional context
No response