Skip to content

sccache v0.2.13 does not work when built with rustc 1.48 #887

Closed
@SomeoneToIgnore

Description

@SomeoneToIgnore

The same dummy "hello world" project + sccache does not work for rustc 1.48 but works for 1.47.

Here's a minimal example:

Create the script locally:

#! /usr/bin/env bash

set -e
set -x

env USER=test-user cargo new test-project --bin
cd test-project
echo "Running without sccache"
cargo run
cargo clean
cargo install sccache
echo "Running with sccache"
RUSTC_WRAPPER="/usr/local/cargo/bin/sccache" cargo run
sccache -s

and then run it in Docker:

docker run --rm -v $(pwd)/test-sccache.sh:/test-sccache.sh rust:1.47 /test-sccache.sh

docker run --rm -v $(pwd)/test-sccache.sh:/test-sccache.sh rust:1.48 /test-sccache.sh

Expected: both runs work identically and finish successfully

Actual: 1.47 version works as expected, 1.48 version fails on the RUSTC_WRAPPER="/usr/local/cargo/bin/sccache" cargo run step:

Running with sccache
+ echo 'Running with sccache'
+ RUSTC_WRAPPER=/usr/local/cargo/bin/sccache
+ cargo run
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/usr/local/cargo/bin/sccache rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 2)
  --- stderr
  error: failed to execute compile
  caused by: Failed to send data to or receive data from server
  caused by: Failed to read response header
  caused by: failed to fill whole buffer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions