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

Windows installation fails #185

Closed
ardave opened this issue Dec 23, 2022 · 7 comments
Closed

Windows installation fails #185

ardave opened this issue Dec 23, 2022 · 7 comments
Assignees
Milestone

Comments

@ardave
Copy link

ardave commented Dec 23, 2022

I run

https://github.com/esp-rs/rust-build/releases/download/v1.66.0.0/Install-RustToolchain.ps1

and it fails with

* installing C:\Users\dave/.espressif/tools/xtensa-esp32-elf-clang/esp-15.0.0-20221201-x86_64-pc-windows-msvc
** downloading: https://github.com/esp-rs/rust-build/releases/download/llvm-project-14.0-minified/xtensa-esp32-elf-llvm15_0_0-esp-15.0.0-20221201-x86_64-pc-windows-msvc.zip
Invoke-WebRequest : Not Found**
At C:\Users\dave\Downloads\Install-RustToolchain.ps1:146 char:9
Invoke-WebRequest "${LlvmUrl}" -OutFile ${LlvmFile}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

... a "Not Found" which I can verify by using curl.

Apologies that I do not know how to "browse" the release files available on github to troubleshoot.

@JonGrasses
Copy link

I'm also having this problem.

@steventrouble
Copy link

A lot of things broke in the script when esp32 LLVM upstream changed their links.

  • They changed the name of the file, so the script can't find it
  • They switched to tar.xz archives instead of zip, so windows can't extract it from command line

I manually completed the installation by doing the following:

  1. Download the latest win64 release (not libs) from espressif's github
  2. Extract the files to the local directory using 7zip
  3. Move the the esp-clang directory into the .../tools/xtensa-esp32-elf-clang directory

You can edit the installer ps1 script to output the values of various variables if you need to see where certain things are installed.

TBH, it's a lot of work and the toolchain doesn't feel like it's ready for prime time yet. It ought to be a single command. Maybe I'll give it another try some other day.

@SergioGasquez
Copy link
Member

Hi! I'm sorry for not getting back to you sooner. Most of our team is now on vacation. We will probably look at this issue the next week, in the meantime, I can recommend having a look at espup, a new tool written in Rust that aims to replace installation scripts. See the espup section of the book for some additional documentation.
The followings commands should install everything required to develop Rust applications on ESP chips:

cargo install espup
espup install 
%USERPROFILE%\export-esp.ps1

@SergioGasquez
Copy link
Member

Hi @ardave, @JonGrasses

Have you tried using espup to workaround this issue? If so, what were the results?

@georgik georgik added this to the v1.67 milestone Jan 26, 2023
@georgik georgik self-assigned this Jan 26, 2023
@ardave
Copy link
Author

ardave commented Feb 1, 2023

Hi @ardave, @JonGrasses

Have you tried using espup to workaround this issue? If so, what were the results?

Yes! It looks like your espup-related commands followed by this https://esp-rs.github.io/book/installation/troubleshooting.html#using-wrong-rust-toolchain have me back on track. Thanks a million!

(I'll leave it up to you to close, just in case anyone else needs to chime in.)

@georgik georgik modified the milestones: v1.67, v1.68 Mar 9, 2023
@georgik
Copy link
Collaborator

georgik commented Mar 9, 2023

espup is now the official way how for Windows deployment. PowerShell script was removed.

@georgik georgik closed this as completed Mar 9, 2023
@ryankopf
Copy link

See this PR if you are trying to use this on Windows: esp-rs/espup#420

The espup installer claims the variables are set, even if they don't get set. I am suggesting a change to the message, but you can just run the C:\Users\yourusername\export-esp.ps1 file and things start working.

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

No branches or pull requests

6 participants