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

Unable to find libclang: libclang.dll could not be opened: LoadLibraryExW failed #477

Closed
Tnze opened this issue Sep 8, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@Tnze
Copy link

Tnze commented Sep 8, 2024

Follow the tutorial to configure the development environment, but in the end, cargo build still failed to compile

  Using managed esp-idf repository: RemoteSdk { repo_url: None, git_ref: Tag("v5.2.2") }
  Using esp-idf v5.2.2 at 'F:\e\.embuild\espressif\esp-idf\v5.2.2'
  Built components: riscv, esp_ringbuf, efuse, esp_mm, driver, esp_pm, mbedtls, esp_bootloader_format, esp_app_format, bootloader_support, bootloader, esptool_py, partition_table, esp_partition, app_update, spi_flash, pthread, esp_system, esp_rom, hal, log, heap, soc, esp_hw_support, freertos, newlib, cxx, esp_common, esp_timer, app_trace, esp_event, nvs_flash, esp_phy, vfs, lwip, esp_netif_stack, esp_netif, wpa_supplicant, esp_coex, esp_wifi, bt, unity, cmock, console, http_parser, esp-tls, esp_adc, esp_eth, esp_gdbstub, esp_hid, tcp_transport, esp_http_client, esp_http_server, esp_https_ota, esp_https_server, esp_psram, esp_lcd, protobuf-c, protocomm, esp_local_ctrl, espcoredump, wear_levelling, sdmmc, fatfs, idf_test, ieee802154, json, mqtt, nvs_sec_provider, openthread, spiffs, ulp, usb, wifi_provisioning, main
  thread 'main' panicked at F:\packages\cargo\registry\src\index.crates.io-6f17d22bba15001f\bindgen-0.69.4\lib.rs:622:31:
  Unable to find libclang: "the `libclang` shared library at C:\\Users\\Tnze\\.rustup\\toolchains\\esp\\xtensa-esp32-elf-clang\\esp-clang\\bin\\libclang.dll could not be opened: LoadLibraryExW failed"
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Full logs

  • rustup 1.27.1 (54dd3d00f 2024-04-24)
  • cargo 1.83.0-nightly (c1fa840a8 2024-08-29)
  • rustc 1.83.0-nightly (12b26c13f 2024-09-07)
  • espup 0.12.2

Also seen #319 with the same error, which should be already fixed.
BTW I didn't found a clang.exe file in C:\Users\Tnze\.rustup\toolchains\esp\xtensa-esp32-elf-clang\esp-clang\bin
image

@Vollbrecht
Copy link
Collaborator

This problem is not directly related to the hal but to how the xtensa toolchain gets installed. The issue is already tracked in espup here

@Vollbrecht Vollbrecht added the duplicate This issue or pull request already exists label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
Status: Done
Development

No branches or pull requests

2 participants