Closed andrewshadura closed 3 years ago
Also posted in the chat:
One more idea: it might be clang itself. Bindgen is just a library crate which is a build dependency of esp-idf-sys. However it does use and does try to find the Clang .so library at runtime. So if somehow you have an oldish clang on your path, it might be picking up an oldish clang .so library, which - of course - knows nothing about the xtensa architecture
I had a case in the past with my own clang first on the path, and then an ancient distro clang further down in my path, and it was - for whatever reason - picking up the clang .so library from the distro's clang I had to actually uninstall the distro clang to fix this issue (ubuntu 18.04)
In fact, @xymist had the same case, if I'm not mistaken.
I did. I had to remove Clang completely from my system and then build from scratch.
It is indeed another clang instance from where the clang .so library is (wrongly) picked up.
Seems that this fixes it:
LIBCLANG_PATH=$HOME/xtensa-esp32-elf-clang/lib cargo
I’m trying to build rust-esp32-std-hello using the pre-compiled compiler I installed according to this guide. (I have previously built the compiler myself, but I wanted to cut the installation time by a couple of hours this time.)
I’m using rustup to manage toolchains. Having set the local override to
esp
, I’m getting this output:However, during the build, I’m getting this error: