Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 763567 - dev-lang/rust fails to compile when sccache wrapper is present with error: Connection to server timed out
Summary: dev-lang/rust fails to compile when sccache wrapper is present with error: C...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-04 19:05 UTC by tt_1
Modified: 2021-07-24 13:45 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (rust-cant-find-server-with-sccache.log,7.08 KB, text/x-log)
2021-01-04 19:05 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2021-01-04 19:05:23 UTC
Created attachment 681049 [details]
build log

how to reproduce: emerge sccache, add this to make.conf: 

RUSTC_WRAPPER=/usr/bin/sccache
SCCACHE_DIR=/sccache
SCCACHE_MAX_FRAME_LENGTH=104857600

modelled from: https://wiki.gentoo.org/wiki/Sccache#Initial_setup


now, if you're going to reinstall or upgrade dev-lang/rust, it fails to configure: 

>>> Compiling source in /var/tmp/portage/dev-lang/rust-1.46.0/work/rustc-1.46.0-src ...
running: /var/tmp/portage/dev-lang/rust-1.46.0/work/rust-stage0/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.46.0/work/rustc-1.46.0-src/src/bootstrap/Cargo.toml --verbose --locked --frozen
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/usr/bin/sccache /var/tmp/portage/dev-lang/rust-1.46.0/work/rust-stage0/bin/rustc - --crate-name ___ --print=file-names -Lnative=/usr/lib/llvm/10/lib64 -Cdebuginfo=2 -C linker=x86_64-pc-linux-gnu-gcc -Wrust_2018_idioms -Wunused_lifetimes -Dwarnings --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: Connection to server timed out

Traceback (most recent call last):
  File "./x.py", line 11, in <module>
    bootstrap.main()
  File "/var/tmp/portage/dev-lang/rust-1.46.0/work/rustc-1.46.0-src/src/bootstrap/bootstrap.py", line 981, in main
    bootstrap(help_triggered)
  File "/var/tmp/portage/dev-lang/rust-1.46.0/work/rustc-1.46.0-src/src/bootstrap/bootstrap.py", line 948, in bootstrap
    build.build_bootstrap()
  File "/var/tmp/portage/dev-lang/rust-1.46.0/work/rustc-1.46.0-src/src/bootstrap/bootstrap.py", line 733, in build_bootstrap
    run(args, env=env, verbose=self.verbose)
  File "/var/tmp/portage/dev-lang/rust-1.46.0/work/rustc-1.46.0-src/src/bootstrap/bootstrap.py", line 143, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /var/tmp/portage/dev-lang/rust-1.46.0/work/rust-stage0/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.46.0/work/rustc-1.46.0-src/src/bootstrap/Cargo.toml --verbose --locked --frozen
Comment 1 tt_1 2021-01-04 20:33:57 UTC
problem solved by removing sccache prior to emerging dev-lang/rust

here's emerge -pv dev-lang/rust: 

[ebuild   R    ] dev-lang/rust-1.46.0:stable/1.46::gentoo  USE="rustfmt system-llvm -clippy -debug -doc -libressl -miri -nightly -parallel-compiler -rls -system-bootstrap -wasm" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse2" LLVM_TARGETS="AArch64 (X86) -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ -WebAssembly -XCore" 0 KiB



basically this shouldn't happen, as there is local sccache archive to look at for sccache, and also I didn't even had all the cloud and distributed enabled in the first place:

emerge -pv sccache 

[ebuild  N    ~] dev-util/sccache-0.2.13::gentoo  USE="-azure -debug -dist-client -dist-server -gcs -memcached -redis -s3" 27.182 KiB
Comment 2 orbea 2021-01-25 03:30:02 UTC
I experienced this problem when rebuilding dev-util/sccache and when building www-client/firefox. It seems to be fixed when installing the 9999 live sccache ebuild.

Possibly it could be fixed by upgrading sccache to 0.2.15?

https://github.com/mozilla/sccache/releases/tag/v0.2.15
Comment 3 tt_1 2021-02-14 09:13:37 UTC
I haven't tried again yet, can you confirm it's fixed in 0.2.15? The I can maybe turn this into a bump request.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2021-03-02 17:46:41 UTC
0.2.15 landed recently, so no bump request required ;-)
Comment 5 tt_1 2021-03-02 17:58:40 UTC
great, do you have any information yet wether this has been truly fixed?
Comment 6 orbea 2021-03-02 18:06:11 UTC
This is fixed with 0.2.15 on my end.
Comment 7 Georgy Yakovlev archtester gentoo-dev 2021-07-24 06:11:39 UTC
old versions gone, closing.
Comment 8 orbea 2021-07-24 13:45:41 UTC
I recently ran into this again with the newer versions, but was able to resolve it (For now) by deleting the existing cache directory and letting sccache to regenerate it.