Open Sydonian opened 1 month ago
Can confirm that I have the same issue after updating rustup, espup & espup update.
The dll is on the specified path but could not be opened for some reason. This persists after (re)installing the ESP IDF cargo subcommands and doing espup remove & espup install.
I reverted to an older espup version (cargo install espup@0.11.0
), ran espup uninstall
& espup install
and compilation is now working again on my Windows machine.
what version of the esp rust toolchain did you currently have installed? E.g what is the result of rustc +esp --version
. There were some windows specific problems, that lead the team to not be able to create a windows version of the compiler for some of the latest releases.
You can checkout the respective repos here and here.
Depending on your version installed try to downgrade one compiler version earlier and check if that helps. You can see on the linked release page from above, how you can install a specific compiler version. Also than make sure to either delete the "newer" so the other one is actually used.
what version of the esp rust toolchain did you currently have installed? E.g what is the result of
rustc +esp --version
. There were some windows specific problems, that lead the team to not be able to create a windows version of the compiler for some of the latest releases.You can checkout the respective repos here and here.
Depending on your version installed try to downgrade one compiler version earlier and check if that helps. You can see on the linked release page from above, how you can install a specific compiler version. Also than make sure to either delete the "newer" so the other one is actually used.
Here is the toolchain version I using currently: and the version of espup:
I just ran esp uninstall
and esp install --toolchain-version 1.77.0
to install an older toolchain, then I got complied successfully. Maybe there is something wrong with the newer veriosn?
I tried with 3 espup versions, each time doing an uninstall first and installing the default toolchain (1.79.0.0 nightly) again. Tested on a clean build of my current project.
espup 0.12.2
rustc 1.79.0-nightly (e60d66433 2024-06-10) (1.79.0.0)
Fails
espup 0.12.0
rustc 1.79.0-nightly (e60d66433 2024-06-10) (1.79.0.0)
Also fails
rustc 1.79.0-nightly (e60d66433 2024-06-10) (1.79.0.0)
espup 0.11.0
Works in my case. Would it be possible that the issue is related to the way how espup sets up the environment?
@SergioGasquez @MabezDev are you aware of windows specific issues in espup v12 ? Should i transfer the issue?
The same error occurred in my environment.
I was able to compile successfully by replacing LLVM17 files with LLVM16 files in .rustup\toolchains\esp\xtensa-esp32-elf-clang\esp-clang
directory.
The same error occurred in my environment. I was able to compile successfully by replacing LLVM17 files with LLVM16 files in
.rustup\toolchains\esp\xtensa-esp32-elf-clang\esp-clang
directory.
Out of curiosity, what happens if you only replace the libclang.dll
from LLVM 17 for the on in LLVM 16?
Out of curiosity, what happens if you only replace the libclang.dll from LLVM 17 for the on in LLVM 16?
If only libclang.dll
is replaced, the same error occurs.
(This is because there is no dependency dll.)
I tried to get the cause of the load error with the GetLastError
function.
The error code when loading the LLVM17 dll was 193 (ERROR_BAD_EXE_FORMAT: %1 is not a valid Win32 application.)
Incidentally, the error code when replacing only libclang.dll
was 126 (ERROR_MOD_NOT_FOUND: The specified module could not be found.)
Thanks for the detailed information, at the moment I don't have a Windows environment to reproduce the error and Im not sure what we can do from the espup
side (but removing LLVM 17 and just using LLVM 16 for Windows). I would like to ask a few extra tests if you dont mind:
-e, --extended-llvm
flag?espup
I found the cause of the error.
When loading libclang.dll
(LLVM17), the dependency libstdc++-6.dll
is also loaded.
However, instead of libstdc++-6.dll
, which is bundled with libclang.dll
, the one in embuild\espressif\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin
is loaded.
These libstdc++-6.dll
are different and this error is caused.
(the libstdc++-6.dll
is not bundled in LLVM16)
- Have you tried using the -e, --extended-llvm flag?
- Could you try using the following LLVM 17 release, we are using the latest one in espup
Both do not work well.
Hi ! I had the same problem. Solved by replacing the contents of
with the contents of the same folders from https://github.com/espressif/llvm-project/releases/tag/esp-16.0.4-20231113 and renaming of the file ".rustup\toolchains\esp\xtensa-esp32-elf-clang\esp-17.0.1_20240419" to "esp-16.0.4-20231113"
Build logs (cargo clean -> cargo build) no_backtrace_logs.txt backtrace_full_logs.txt
Project config files: config.toml.txt Cargo.toml.txt
Environment:
building logs:
and I have set the LIBCLANG_PATH env: