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

Compile error that only happens when using sccache #2196

Open
IceSentry opened this issue May 29, 2024 · 1 comment
Open

Compile error that only happens when using sccache #2196

IceSentry opened this issue May 29, 2024 · 1 comment

Comments

@IceSentry
Copy link

IceSentry commented May 29, 2024

I've used sccache in the past without any issues, but disabled it for a while. I recently updated it again and I keep getting errors that I don't get when sccache is disabled.

Here's the errors I get when building bevy:

bevyengine main [$>] rust v1.78.0
> cargo build
   Compiling winnow v0.6.9
   Compiling syn v2.0.66
   Compiling windows-sys v0.52.0
   Compiling windows-core v0.52.0
   Compiling winapi v0.3.9
   Compiling syn v1.0.109
   Compiling num-traits v0.2.19
   Compiling xml-rs v0.8.20
   Compiling memchr v2.7.2
   Compiling accesskit v0.12.3
   Compiling bevy_tasks v0.14.0-dev (C:\Users\Charles\source\repos\bevyengine\crates\bevy_tasks)
   Compiling regex-syntax v0.8.3
   Compiling parking_lot v0.12.3
   Compiling event-listener v4.0.3
   Compiling crossbeam-channel v0.5.13
   Compiling khronos-egl v6.0.0
   Compiling ash v0.37.3+1.3.251
   Compiling atomic-waker v1.1.2
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `event-listener` (lib)
warning: build failed, waiting for other jobs to finish...
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `parking_lot` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `bevy_tasks` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `accesskit` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `crossbeam-channel` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `atomic-waker` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `memchr` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `xml-rs` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `windows-core` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `num-traits` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `windows-sys` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `winnow` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `regex-syntax` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `syn` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `syn` (lib)
sccache: error: failed to execute compile
sccache: caused by: error reading compile response from server
sccache: caused by: invalid value: integer `5`, expected variant index 0 <= i < 5
error: could not compile `winapi` (lib)

I tried deleting the cache, stopping/restarting the server and even rebooting and I keep getting this error.

I'm on windows 10, sccache version is 0.8.1

I'm using sccache by adding this to my ~/.cargo/config.toml

[build]
rustc-wrapper = "C:/Users/Charles/.cargo/bin/sccache"
@liskin
Copy link

liskin commented Jun 17, 2024

I've seen this exact error happen when there was a mismatch between the sccache version used in rustc-wrapper and the sccache server (0.3.3 server vs 0.8.0 client, specifically). Can you check if the server runs the C:/Users/Charles/.cargo/bin/sccache binary or if it's something else?

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