Closed
Description
Hello,
I have a special usage (coverage data collection) of cargo, wherein I run:
$ RUSTC_WRAPPER=./admin/coverage-rustc cargo rustc --all-features --profile test --lib --verbose
This used to work, but now doesn't:
Compiling scopeguard v0.3.3
Compiling rayon-core v1.3.0
Compiling cc v1.0.3
Compiling libc v0.2.34
Running `./admin/coverage-rustc rustc --crate-name scopeguard /home/jbp/.cargo/registry/src/github.com-1ecc6299db9ec823/scopeguard-0.3.3/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=634188bf111cdf8b -C extra-filename=-634188bf111cdf8b --out-dir /home/jbp/sct.rs/target/debug/deps -L dependency=/home/jbp/sct.rs/target/debug/deps --cap-lints allow`
Running `./admin/coverage-rustc rustc --crate-name build_script_build /home/jbp/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.3.0/build.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=2f5165cfb1277d8d -C extra-filename=-2f5165cfb1277d8d --out-dir /home/jbp/sct.rs/target/debug/build/rayon-core-2f5165cfb1277d8d -L dependency=/home/jbp/sct.rs/target/debug/deps --cap-lints allow`
Running `./admin/coverage-rustc rustc --crate-name cc /home/jbp/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.3/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=ad5a6f47afcf01e2 -C extra-filename=-ad5a6f47afcf01e2 --out-dir /home/jbp/sct.rs/target/debug/deps -L dependency=/home/jbp/sct.rs/target/debug/deps --cap-lints allow`
Running `./admin/coverage-rustc rustc --crate-name libc /home/jbp/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.34/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=a6e82361ba65c2f6 -C extra-filename=-a6e82361ba65c2f6 --out-dir /home/jbp/sct.rs/target/debug/deps -L dependency=/home/jbp/sct.rs/target/debug/deps --cap-lints allow`
error: Could not compile `cc`.
Caused by:
could not execute process `./admin/coverage-rustc rustc --crate-name cc /home/jbp/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.3/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=ad5a6f47afcf01e2 -C extra-filename=-ad5a6f47afcf01e2 --out-dir /home/jbp/sct.rs/target/debug/deps -L dependency=/home/jbp/sct.rs/target/debug/deps --cap-lints allow` (never executed)
Caused by:
No such file or directory (os error 2)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `rayon-core`.
(etc.)
With a little experimentation, it appears that RUSTC_WRAPPER
now needs to be an absolute path. Is that an expected change in behaviour or inadvertent?
Relevant strace snippet from one of the failing subprocesses:
[pid 91797] chdir("/home/jbp/.cargo/registry/src/github.com-1ecc6299db9ec823/scopeguard-0.3.3") = 0
[pid 91797] execve("./admin/coverage-rustc", ["./admin/coverage-rustc", "rustc", "--crate-name", "scopeguard", "/home/jbp/.cargo/registry/src/gi"..., "--crate-type", "lib", "--emit=dep-info,link", "-C", "debuginfo=2", "--cfg", "feature=\"default\"", "--cfg", "feature=\"use_std\"", "-C", "metadata=634188bf111cdf8b", "-C", "extra-filename=-634188bf111cdf8b", "--out-dir", "/home/jbp/sct.rs/target/debug/de"..., "-L", "dependency=/home/jbp/sct.rs/targ"..., "--cap-lints", "allow"], [/* 67 vars */]) = -1 ENOENT (No such file or directory)
Version: cargo 0.25.0-nightly (e08f310 2017-12-24)