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

failed to execute compile #2204

Open
jaynnn opened this issue Jun 13, 2024 · 2 comments
Open

failed to execute compile #2204

jaynnn opened this issue Jun 13, 2024 · 2 comments

Comments

@jaynnn
Copy link

jaynnn commented Jun 13, 2024

step:

  • cargo new project
  • cd project
  • sccache cargo build
    then i got:
sccache: caused by: Compiler not supported: "error: unexpected argument \'-E\' found\n\nUsage: cargo [+toolchain] [OPTIONS] [COMMAND]\n       cargo [+toolchain] [OPTIONS] -Zscript <MANIFEST_RS> [ARGS]...\n\nFor more information, try \'--help\'.\n"

extra:

$ sccache --version
sccache 0.8.1

$ sccache -s
Compile requests                      1
Compile requests executed             0
Cache hits                            0
Cache misses                          0
Cache timeouts                        0
Cache read errors                     0
Forced recaches                       0
Cache write errors                    0
Compilation failures                  0
Cache errors                          0
Non-cacheable compilations            0
Non-cacheable calls                   0
Non-compilation calls                 0
Unsupported compiler calls            1
Average cache write               0.000 s
Average compiler                  0.000 s
Average cache read hit            0.000 s
Failed distributed compilations       0
Cache location                  Local disk: "D:\\tools\\sccache\\cache"
Use direct/preprocessor mode?   yes
Version (client)                0.8.1
Max cache size                       10 GiB

rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09)

platform:
windows 11

commands i've execute
cargo install sccache --locked
setx RUSTC_WRAPPER "MYPATH\sccache.exe"

@AJIOB
Copy link
Contributor

AJIOB commented Jun 15, 2024

Hi @jaynnn,

You shouldn't call the sccache cargo build, just use the cargo build instead, if you configure a caching correctly (via config file or environment).

cargo itself is not a compiler. The sccache wants a compiler as an argument, rustc is a compiler.

@AJIOB
Copy link
Contributor

AJIOB commented Jun 21, 2024

Hi @jaynnn,

Is it your problem fixed?

If yes, please, close the issue. If no, please, provide more details.

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

2 participants