cachepot
cachepot copied to clipboard
sccache test failure when ccache is installed
Whenever ccache
is present in fedora, running a C
or C++
unittest, it fails consistently. I assume CC
is set, and for testcases we should probably unset it - that interferes with sccache.
Not sure if we need detection logic for that or not.
sccache: Starting the server...
test test_sccache_command ... FAILED
failures:
---- test_sccache_command stdout ----
[2021-05-05T06:50:28Z TRACE system::harness] sccache --stop-server
[2021-05-05T06:50:28Z TRACE system] start server
[2021-05-05T06:50:28Z TRACE system] run_sccache_command_test: gcc
[2021-05-05T06:50:28Z TRACE system] fs::copy("tests/test.c", "/tmp/sccache_system_testUPZyWN/test.c")
[2021-05-05T06:50:28Z TRACE system] fs::copy("tests/test_err.c", "/tmp/sccache_system_testUPZyWN/test_err.c")
[2021-05-05T06:50:28Z TRACE system] compile
thread 'test_sccache_command' panicked at 'Unexpected failure.
code-2
stderr=```sccache: error: failed to execute compile
sccache: caused by: Compiler not supported: "/usr/bin/ccache: invalid option -- \'E\'\nUsage:\n ccache [options]\n ccache compiler [compiler options]\n compiler [compiler options] (via symbolic link)\n\nCommon options:\n -c, --cleanup delete old files and recalculate size counters\n (normally not needed as this is done\n automatically)\n -C, --clear clear the cache completely (except configuration)\n --config-path PATH operate on configuration file PATH instead of the\n default\n -d, --directory PATH operate on cache directory PATH instead of the\n default\n --evict-older-than AGE remove files older than AGE (unsigned integer\n with a d (days) or s (seconds) suffix)\n -F, --max-files NUM set maximum number of files in cache to NUM (use\n 0 for no limit)\n -M, --max-size SIZE set maximum size of cache to SIZE (use 0 for no\n limit); available suffixes: k, M, G, T (decimal)\n and Ki, Mi, Gi, Ti (binary); default suffix: G\n -X, --recompress LEVEL recompress the cache to level LEVEL (integer or\n \"uncompressed\") using the Zstandard algorithm;\n see \"Cache compression\" in the manual for details\n -o, --set-config KEY=VAL set configuration item KEY to value VAL\n -x, --show-compression show compression statistics\n -p, --show-config show current configuration options in\n human-readable format\n -s, --show-stats show summary of configuration and statistics\n counters in human-readable format\n -z, --zero-stats zero statistics counters\n\n -h, --help print this help text\n -V, --version print version and copyright information\n\nOptions for scripting or debugging:\n --checksum-file PATH print the checksum (64 bit XXH3) of the file at\n PATH\n --dump-manifest PATH dump manifest file at PATH in text format\n --dump-result PATH dump result file at PATH in text format\n --extract-result PATH extract data stored in result file at PATH to the\n current working directory\n -k, --get-config KEY print the value of configuration key KEY\n --hash-file PATH print the hash (160 bit BLAKE3) of the file at\n PATH\n --print-stats print statistics counter IDs and corresponding\n values in machine-parsable format\n\nSee also the manual on <https://ccache.dev/documentation.html>.\n"
command="/media/supersonic1t/projects/sccache/target/debug/sccache" "/usr/bin/ccache" "-c" "test.c" "-o" "test.o"
code=2
stdout=``````
stderr=```sccache: error: failed to execute compile
sccache: caused by: Compiler not supported: "/usr/bin/ccache: invalid option -- 'E'\nUsage:\n ccache [options]\n ccache compiler [compiler options]\n compiler [compiler options] (via symbolic link)\n\nCommon options:\n -c, --cleanup delete old files and recalculate size counters\n (normally not needed as this is done\n automatically)\n -C, --clear clear the cache completely (except configuration)\n --config-path PATH operate on configuration file PATH instead of the\n default\n -d, --directory PATH operate on cache directory PATH instead of the\n default\n --evict-older-than AGE remove files older than AGE (unsigned integer\n with a d (days) or s (seconds) suffix)\n -F, --max-files NUM set maximum number of files in cache to NUM (use\n 0 for no limit)\n -M, --max-size SIZE set maximum size of cache to SIZE (use 0 for no\n limit); available suffixes: k, M, G, T (decimal)\n and Ki, Mi, Gi, Ti (binary); default suffix: G\n -X, --recompress LEVEL recompress the cache to level LEVEL (integer or\n "uncompressed") using the Zstandard algorithm;\n see "Cache compression" in the manual for details\n -o, --set-config KEY=VAL set configuration item KEY to value VAL\n -x, --show-compression show compression statistics\n -p, --show-config show current configuration options in\n human-readable format\n -s, --show-stats show summary of configuration and statistics\n counters in human-readable format\n -z, --zero-stats zero statistics counters\n\n -h, --help print this help text\n -V, --version print version and copyright information\n\nOptions for scripting or debugging:\n --checksum-file PATH print the checksum (64 bit XXH3) of the file at\n PATH\n --dump-manifest PATH dump manifest file at PATH in text format\n --dump-result PATH dump result file at PATH in text format\n --extract-result PATH extract data stored in result file at PATH to the\n current working directory\n -k, --get-config KEY print the value of configuration key KEY\n --hash-file PATH print the hash (160 bit BLAKE3) of the file at\n PATH\n --print-stats print statistics counter IDs and corresponding\n values in machine-parsable format\n\nSee also the manual on https://ccache.dev/documentation.html.\n"
', /home/bernhard/.cargo/registry/src/github.com-1ecc6299db9ec823/assert_cmd-1.0.2/src/assert.rs:158:13
stack backtrace:
0: rust_begin_unwind
at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/panicking.rs:493:5
1: std::panicking::begin_panic_fmt
at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/panicking.rs:435:5
2: assert_cmd::assert::Assert::success
at /home/bernhard/.cargo/registry/src/github.com-1ecc6299db9ec823/assert_cmd-1.0.2/src/assert.rs:158:13
3: system::test_basic_compile
at ./tests/system.rs:109:5
4: system::run_sccache_command_tests
at ./tests/system.rs:363:5
5: system::test_sccache_command
at ./tests/system.rs:440:13
6: system::test_sccache_command::{{closure}}
at ./tests/system.rs:417:1
7: core::ops::function::FnOnce::call_once
at /home/bernhard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
8: core::ops::function::FnOnce::call_once
at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failures:
test_sccache_command
Just tried running a simple compilation with -E
and it seems that both of my gcc and clang are happy, versions:
gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0
Ubuntu clang version 11.0.0-2
And I can confirm that this fails with ccache version 3.7.11
when running
xanewok@faerun-dev:~$ ccache -E file.c
ccache: invalid option -- 'E'