Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save johnLate/9ea390dfa59a4641cfc8ff20263ce14b to your computer and use it in GitHub Desktop.
Save johnLate/9ea390dfa59a4641cfc8ff20263ce14b to your computer and use it in GitHub Desktop.
sccache issue #2122 steps to reproduce
/tmp/scc$ ls -1
foobar.cpp
sccache-dist-v0.7.1-x86_64-unknown-linux-musl.tar.gz
sccache-dist-v0.7.2-x86_64-unknown-linux-musl.tar.gz
sccache-dist-v0.8.0-x86_64-unknown-linux-musl.tar.gz
sccache-v0.7.1-x86_64-unknown-linux-musl.tar.gz
sccache-v0.7.2-x86_64-unknown-linux-musl.tar.gz
sccache-v0.8.0-x86_64-unknown-linux-musl.tar.gz
sccache.conf
scheduler.conf
server.conf
/tmp/scc$ cat scheduler.conf
public_addr="127.0.0.1:9001"
[client_auth]
type="token"
token="123"
[server_auth]
type="DANGEROUSLY_INSECURE"
/tmp/scc$ cat server.conf
cache_dir="/tmp/scc/toolchains"
public_addr="127.0.0.1:9002"
scheduler_url="http://127.0.0.1:9001"
[builder]
type="overlay"
build_dir="/tmp/scc/build"
bwrap_path="/usr/bin/bwrap"
[scheduler_auth]
type="DANGEROUSLY_INSECURE"
/tmp/scc$ cat sccache.conf
[cache.disk]
dir="/tmp/scc/cache"
[dist]
scheduler_url="http://127.0.0.1:9001"
cache_dir="/tmp/scc/cache-dist"
[dist.auth]
type="token"
token="123"
/tmp/scc$ tar --strip-components=1 --wildcards -xf sccache-v0.8.0-x86_64-unknown-linux-musl.tar.gz '*/sccache'
/tmp/scc$ tar --strip-components=1 --wildcards -xf sccache-dist-v0.8.0-x86_64-unknown-linux-musl.tar.gz '*/sccache-dist'
/tmp/scc$ ./sccache-dist --version && ./sccache --version
sccache 0.8.0
sccache 0.8.0
/tmp/scc$ ./sccache-dist scheduler --config ./scheduler.conf
/tmp/scc$ sudo ./sccache-dist server --config server.conf &
[1] 1657869
/tmp/scc$ SCCACHE_CONF=/tmp/scc/sccache.conf ./sccache --dist-status
{"SchedulerStatus":["http://127.0.0.1:9001/",{"num_servers":1,"num_cpus":8,"in_progress":0}]}
/tmp/scc$ cat foobar.cpp
foobar;
/tmp/scc$ SCCACHE_CONF=/tmp/scc/sccache.conf ./sccache g++ -c foobar.cpp -o foobar.o
foobar.cpp:1:1: error: 'foobar' does not name a type
1 | # 0 "foobar.cpp"
| ^~~~~~
sccache: Compiler killed by signal 1
/tmp/scc$ SCCACHE_CONF=/tmp/scc/sccache.conf ./sccache g++ -c foobar.cpp -o foobar.o
/tmp/scc$ echo $? ; file foobar.o
0
foobar.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
/tmp/scc$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment