-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libclang.so
becomes difficult to get hold of (and completely missing for x86_64 Windows/Linux/Apple in the latest 18.1.2 clang distro) (LLVM-420)
#108
Comments
libclang.so
becomes difficult to get hold of (and completely missing for Windows in the latest 18.1.2 clang distro)libclang.so
becomes difficult to get hold of (and completely missing for Windows in the latest 18.1.2 clang distro) (LLVM-420)
libclang.so
becomes difficult to get hold of (and completely missing for Windows in the latest 18.1.2 clang distro) (LLVM-420)libclang.so
becomes difficult to get hold of (and completely missing for x86_64 Windows/Linux/Apple in the latest 18.1.2 clang distro) (LLVM-420)
Updated the issue description, because it turns out libclang.so is missing not just for Windows, but for all of x86_64 - Linux, Mac, Windows... |
After thinking a bit on it... @igrr @dobairoland Do you think it is acceptable to add
"version_cmd": [
"clang",
"--version"
],
"export_paths": [
[
"esp-clang-libs",
"bin"
]
],
"version_cmd": [
"esp-clang-libs-version"
],
Taking into account that none else needs those libraries in |
@gerekon Hmmm, is this really how tools are installed? My understanding was that tools are installed in a sub-folder based on this version name field and the "version"/"version-regex" fields in the json (which by the way can be empty and are empty for non-elf tooling like e.g. "esp-rom-elfs") are only used for "testing"? |
Sometimes I do the same :-)
Yes, but I suppose that In your case you want to get clang libs matching installed IDF version. This seems to be different case. |
Yes, but currently we are missing your requirements mentioned later. As for the version command, I think you could put a simple Python one-liner which could read a file and print the library version. It could be something else than Python but it has to be cross-platform and already installed.
No. Every item is independent right now.
Not really because the tools intention is not to let the downloading to other tools. |
Ok. In the next release I will try to add simple Python script which will keep the version and print it when invoked. |
Checklist
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 thelibclang.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 properclang
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 versionsHowever, 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:
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
tools.json
of the cited ESP-IDF versionsProject 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
The text was updated successfully, but these errors were encountered: