-
Notifications
You must be signed in to change notification settings - Fork 545
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
sccache v0.4.0 failed due to invalid -E
options
#1674
Comments
Tried sccache v0.4.0, still same error. |
P.S. The bug was found in cargo-bins/cargo-quickinstall#206 |
The same error now also occurs in cargo-binstall cargo-bins/cargo-binstall#934 even without
And also from running
|
-E
options-E
options
This error only occurs on Linux and does not occur on MacOS or Windows. |
Also, |
Yes, I think it's a sccache bug. :) sccache --version
sccache: error: failed to execute compile
sccache: caused by: Compiler not supported: "error: Found argument \'-E\' which wasn\'t expected, or isn\'t valid in this context\n\n If you tried to supply \'-E\' as a value rather than a flag, use \'-- -E\'\n\nUsage: sccache [OPTIONS] <--dist-auth|--dist-status|--show-stats|--start-server|--stop-server|--zero-stats|--package-toolchain <EXE> <OUT>|CMD>\n\nFor more information try \'--help\'\n" But I am unable to reproduce it by
But I can reproduce it via install via |
@Shnatsel was able to reproduce this using the command from rust-secure-code/cargo-auditable#87 (comment) For cargo-binstall CI failure, you can try reproducing using:
which is almost identical to the command we run on the CI except the use of GHA for caching. |
The minimal repro looks like the following: > rm ~/.cargo/bin/sccache
> cargo install sccache --force
> sccache --version <------- works
sccache 0.4.0
> rm ~/.cargo/bin/sccache
> cargo binstall sccache --force
> sccache --version <------- broken
sccache: error: failed to execute compile
sccache: caused by: Compiler not supported: "error: Found argument \'-E\' which wasn\'t expected, or isn\'t valid in this context\n\n If you tried to supply \'-E\' as a value rather than a flag, use \'-- -E\'\n\nUsage: sccache [OPTIONS] <--dist-auth|--dist-status|--show-stats|--start-server|--stop-server|--zero-stats|--package-toolchain <EXE> <OUT>|CMD>\n\nFor more information try \'--help\'\n" |
Hi, @NobodyXu, is anything special to install sccache from :( paru -Q cargo-binstall
cargo-binstall 0.21.3-1 |
@Xuanwo No, it simply downloads and unpacks pre-built sccache from mozilla/sccache github release. |
Oh, I got it. lrwxrwxrwx 14 xuanwo 22 Mar 14:11 sccache -> sccache-v0.4.0
.rwxr-xr-x 14M xuanwo 21 Mar 20:50 sccache-v0.4.0 Sadly, it doesn't work on sccache. sccache requires to be called as |
After remove the symlink and rename There is a short doc for this: https://github.com/mozilla/sccache#symbolic-links |
Thanks! Also, the same error occurs on cargo-quickinstall where we use |
I think they are facing the same issues. Perhaps sccache can provide a clearer error message for this situation. |
@Xuanwo But |
Yep, you are correct. cargo-bins/cargo-quickinstall#206 is another issue. I'll take a look now. |
I'm not sure about this: INFO This will install the following binaries:
INFO - cargo-auditable (cargo-auditable -> /home/runner/.cargo/bin/cargo-auditable-v0.6.1)
INFO And create (or update) the following symlinks:
INFO - cargo-auditable (/home/runner/.cargo/bin/cargo-auditable -> cargo-auditable-v0.6.1) Can you try install |
The code related to symlinks was written six years ago. I need some time to revisit it and see if we can improve it. |
Hi, @NobodyXu, is it a good idea for you to change symlink into hardlink on linux platform? This may be the quickest solution so far. This change can help users who use |
We actually have a tracking issue to enable |
Opened cargo-bins/cargo-binstall#936 for this |
Thank you very much for considering my advice! |
@Xuanwo I tried install
NOTE that it fails on Linux, MacOS and Windows all with the same error. |
No worries, it's actually long overdue. |
Yes, it's another issue and I am still investigating it. |
The short term solution is to mention in the README.md install with |
I plan to publish a new release v0.22.0 once this PR and few others trivial PRs get merged, likely in 1 day or two. |
@drahnr cargo-binstall v0.22.0 has released. |
@Xuanwo Friendly ping on this issue. |
Sorry for the delay. I haven't been working on this issue in recent days, so there has been no progress thus far. |
@Xuanwo I tried sccache v0.5.3 and this bug is still reproducible. |
Sorry, but I'm not working on this issue these days. |
@Xuanwo It's ok, I just want to try if latest sccache version has fixed this bug or not. |
We will ping this issue if it got fixed. |
Thank you @Xuanwo |
Seems to cause CI errors due to mozilla/sccache#1674
This bug is discovered in rust-secure-code/cargo-auditable#87
The text was updated successfully, but these errors were encountered: