Skip to content
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

thread 'main' panicked at 'Unable to find libclang: #226

Closed
Horryportier opened this issue Jul 23, 2023 · 10 comments
Closed

thread 'main' panicked at 'Unable to find libclang: #226

Horryportier opened this issue Jul 23, 2023 · 10 comments

Comments

@Horryportier
Copy link

I've tried to flash my esp32 but i encountered issue

i've installed followed instruction in readme and installed espflash and generated basic esp-idf-template
also i've installed libclang with sudo apt-get install -y libclang-dev

cargo run output: bug.txt

Os: Pop!_OS 22.04
Rust: rustc 1.70.0-nightly (f112def22 2023-05-31) (1.70.0.1)

@SergioGasquez
Copy link
Member

Can you check if you have the LIBCLANG_PATH environment variable set, that variable must be set by sourcing the environment file, see https://esp-rs.github.io/book/installation/index.html#3-set-up-the-environment-variables

@Horryportier
Copy link
Author

LIBCLANG_PATH is set to $HOME/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516/esp-clang/lib

@SergioGasquez
Copy link
Member

LIBCLANG_PATH is set to $HOME/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516/esp-clang/lib

Are you building the project in the same terminal where you source the export file or print the LIBCLANG_PATH? Also, check the content of that folder just in case is empty (?)

@Horryportier
Copy link
Author

found out $HOME/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516 is empty

@SergioGasquez
Copy link
Member

found out $HOME/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516 is empty

Try reinstalling the environment with espup, do you remember having any issues during the installation?

@Horryportier
Copy link
Author

i think i might had to stop command in the middle one time for some reason

@SergioGasquez
Copy link
Member

I will be closing the issue, feel free to reopen the issue if you encounter any issue after reinstalling.

@Horryportier
Copy link
Author

i have no longer issue with LIBCLANG_PATH but now i have enqunterd this build error:

error[E0063]: missing field `home_chan_dwell_time` in initializer of `esp_idf_sys::wifi_scan_config_t`
  --> /home/horryportier/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-svc-0.46.0/src/wifi.rs:93:13
   |
93 |             Self {
   |             ^^^^ missing `home_chan_dwell_time`

For more information about this error, try `rustc --explain E0063`.
error: could not compile `esp-idf-svc` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...

@SergioGasquez
Copy link
Member

i have no longer issue with LIBCLANG_PATH but now i have enqunterd this build error:

error[E0063]: missing field `home_chan_dwell_time` in initializer of `esp_idf_sys::wifi_scan_config_t`
  --> /home/horryportier/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-svc-0.46.0/src/wifi.rs:93:13
   |
93 |             Self {
   |             ^^^^ missing `home_chan_dwell_time`

For more information about this error, try `rustc --explain E0063`.
error: could not compile `esp-idf-svc` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...

See esp-rs/esp-idf-template#139. It should be fixed by adding a patch for esp-idf-svc .

@Horryportier
Copy link
Author

thanks it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants