-
Notifications
You must be signed in to change notification settings - Fork 24
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
espup install
detects and re-uses existing gcc, but always re-installs rust toolchain when it fails to execute it
#349
Comments
Hi! It should reuse the installation, just tried, and I can't reproduce your issue:
I think what happened to you is that you had an older Xtensa Rust version, and when you ran the |
Hello @jmesmon, did you have a chance to verify the behavior?¿ |
Ya, I took another look, and here's what is happening:
(the "doesn't have the expected dynamic linker" bit is because this is nixos, which doesn't use the same filesystem layout. They carry patches to fixup binaries rustup downloads. I suspect I'll need to do the same thing for espup as long as it ships executables with a dependency on a dynamic linker in a particular location) |
Do you have any suggestion on how to improve this on |
Things that could help here:
|
Thanks for the suggestions, just created #357 which adds a warn message when failing to detect the version.
This should be done in https://github.com/esp-rs/rust-build maybe we can open an issue for this. |
I'm trying to make it work on NixOS, too. after running
However, running
...which does not make much sense to me.
And it starts compiling. After a bit I get
..which actually already is in my path:
...and now I'm stuck |
ok, turns out I didn't get all the executables. I can share my script if anyone is interested, but it's a bit of an hack |
espup install
detects and re-uses existing gcc, but always re-installs rust toolchainespup install
detects and re-uses existing gcc, but always re-installs rust toolchain when it fails to execute it
Yes, if you don't mind sharing it I think it might be useful for other users! |
Merged #357 but still might be worth to keep the issue open, if you have any suggestion that makes Nix users the life easier without introducing too much complexity to |
I copied the script here: https://gist.github.com/LucaFulchir/a4ea1d76045868437e61180f6dcf5c41 it's not the proper "Nix way", but it Works For Me, so good enough for me. As it stands I guess the proper nix way of fixing this would be to write a wrapper for the wrapper would have to do something like what I do in the script, but should run only in the proper directories to be faster, I didn't bother making it faster. I might open a bug report on nipkgpks if there isn't one already, this should probably not be handled by --Edit: I guess I'm unsure if we should propose to |
Thanks for sharing your script! To be honest, I've never used Nix or NixOS, so I don't feel comfortable enough to maintain such feature. |
note: this is on nixOS @SergioGasquez do you have any example on how to this is the error i'm getting: |
esp-rs/esp-idf-template#64 (comment) and esp-rs/esp-idf-sys#184 could help you. I have no experience with NixOS, but I think there are several users on the Matrix channel that have used it, I'll try to gather some more information. |
Bug description
When running
espup install
after previously having installed the same esp toolchain,espup install
reuses (and does not re-download) GCC or LLVM (and prints warnings that it is doing this re-use), but always re-downloads the rust toolchain.Log of a typical run of
espup install
when the esp-rs toolchain is already installed.To Reproduce
Steps to reproduce the behavior:
espup install
at least onceespup install
a second timeExpected behavior
Re-use the existing rust toolchain if it's already the right version, making re-running
espup install
a quick operation.Environment
The text was updated successfully, but these errors were encountered: