Closed ryankopf closed 7 months ago
Related: https://github.com/esp-rs/espup/issues/233
Did not appear to get fixed correctly, this is a great way to offer a fix.
Mind giving some reproduction steps to the issue and which version of espup
are you using?
Certainly!
This happened on two windows machine, one a Surface Pro running either Windows 10 or 11, I will have to check later, and a desktop PC that is running Windows 10 Pro.
The commands run were:
cargo install espup
espup install
Version is:
PS F:\esp2> espup -V
espup 0.11.0
The issue was difficult to reproduce. Keys to reproducing the issue included restarting my PC.
Delete the environment changes manually from the registry and restarted my PC. The environment variables still showed up in new shells until I rebotted, likely due to registry caching of some kind, even when I made certain to open new shells both CMD and PowerShell, using WindowsKey+R 'cmd' or WindowsKey+x and i for PowerShell. Both returned the environment variables when echo'd, despite the fact that they were deleted from the registry in RegEdit.
F: (or whatever your drive letter is)
cargo generate esp-rs/esp-template (all defaults)
cd F:/esp3
cargo build
error: linker `xtensa-esp32-elf-gcc` not found
= note: program not found
error: could not compile `esp4` (bin "esp4") due to 1 previous error
PS F:\esp4> espup install
[info]: Installing the Espressif Rust ecosystem
[info]: (snip)
Your environments variables have been updated! Shell may need to be restarted for changes to be effective
A file was created at 'C:\Users\ryankopf\export-esp.ps1' showing the injected environment variables
PS F:\esp4> cargo build
Compiling esp4 v0.1.0 (F:\esp4)
error: linker `xtensa-esp32-elf-gcc` not found
|
= note: program not found
error: could not compile `esp4` (bin "esp4") due to 1 previous error
Running C:\Users\ryankopf\export-esp.ps1
made it work.
I am certain there is an underlying registry caching issue that is causing these environment variables to not be immediately updated, and this probably is likely not limited to me as it's happened on two systems, but it may be caused by SOMETHING that doesn't exist on a completely fresh Windows installation, if that's where you test the issue, but I don't have access to one at the moment.
The book says "There is no need to execute the file for Windows users. It is only created to show the modified environment variables.". This appears to be out of date.
On Windows 10, using powershell in VS Code, nothing builds correctly without first running the environment file as a command.
Fails unless I first do
C:\Users\ryankopf\export-esp.ps1
.