-
Notifications
You must be signed in to change notification settings - Fork 33
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
Request build for windows-gnu #33
Comments
@materoy Thank you for the request. Please, could you explain the value of having also pc-windows-gnu? Also feel free to add GitHub workflow PR to the project which builds the desired toolchain. Note: The current build for Windows even for MSVC is little bit more challenging, because GitHub runners are too small to handle it and the build must be done locally. |
MSVC toolchain depends on visual studio installation which is not the case for minimalists, who would not like to spend thousands of megabytes on idling applications while there is an option which does't require it. But yeah sure I'll add x86_64-pc-windows-gnu workflow, and make a pr. I'll close the issue when the pr is merged |
Thank you @materoy for the explanation. It's true that having MSVC toolchain requires dependencies which could be deployed by Visual Studio Installer:
I was not aware of the gnu toolchain. If it can make the deployment smaller and reliable for Windows it's valuable alternative indeed and it could help us to remove one extra installation step for Windows users: https://github.com/esp-rs/rust-build/#prerequisites-1 Let me add this topic also to Rust ESP32 Community meeting: esp-rs/rust#105 Please, if you know the configuration for building GNU based Windows toolchain let me know. Here is the configuration for building Windows toolchain with MSVC:
|
Attempt to build the toolchain failed. I welcome any idea how to resolve the problem. New installation of MSYS2.
Result:
|
Update:
Problem:
Result - build seems to end after the first step without dist directory
|
From build Rust build docs:
https://github.com/esp-rs/rust#mingw After this correction the build seems to continue. |
Build succeeded. Build time: 2:33 Build artifact uploaded to releases: |
Note: Building Rust dependencies with GNU toolchain requires installed gcc from MSYS2 for some crates. Example:
|
Toolchain and installation scripts are available at branch: Installation:
Installation + testing build:
Build of a project failed with error:
|
Additional research: It's not possible to build toolchain when mingw is deployed by
|
Added experimental package to 1.62.1.0 pre-release.
We will perform tests on this artifact. The setup required a clean VM machine and tools installed via chocolatey. |
Test with deployment to clean machine with customized installation of rustup to deploy only x86_64-pc-windows-gnu target and toolchain deployed manually to
Conclusion mingw gcc must be installed. |
The build error fixed by:
Then in MSY2 shell:
Then back in PowerShell:
Build failed:
This indicates problem with manual deployment of core. |
Note: It might not be necessary to deploy extra gcc. The dist package contains it in |
No, it's not possible to use just self contained gcc.
Failed with:
|
Using cargo from dist package, instead of from rustup:
Failed on missing git when cloning ESP-IDF. Fixed by:
|
Failed on missing pip, because it was not using environment deployed by idf-installer
Fixed by:
Failed with:
MSYS Python 3.10. does not seem to be compatible with ESP-IDF. |
Install ESP-IDF using Windows installer to avoid collision with MSYS tools and in activate ESP-IDF PowerShell start build with
Failed on missing LLVM.
Added LLVM from https://github.com/esp-rs/rust-build/releases/tag/llvm-project-14.0-minified
Failed on missing ldproxy
Result: success |
@materoy Please, can you test the following instructions on how to get the toolchain working with GNU based toolchain? |
Thank you for requesting the feature. It was merged and released with 1.62.1.0. |
Thank you @georgik, for your work. |
Current toolchain : stable-x86_64-pc-windows-gnu
The only available binary for windows is for msvc toolchain
The text was updated successfully, but these errors were encountered: