Closed
Description
When I run this sequence of commands:
docker run --rm -it ubuntu:xenial
apt update
apt install wget
wget https://sh.rustup.rs -O rustup.sh
chmod ugo+x rustup.sh
./rustup.sh -y --default-toolchain nightly
source $HOME/.cargo/env
rustc -vV
I get this error:
rustc 1.40.0-nightly (7979016af 2019-10-20)
binary: rustc
commit-hash: 7979016aff545f7b41cc517031026020b340989d
commit-date: 2019-10-20
host: x86_64-unknown-linux-gnu
release: 1.40.0-nightly
error: failed to find a `codegen-backends` folder in the sysroot candidates:
* /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu
* /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu
This happens due to the statx
syscall failing with EPERM. I believe Docker uses seccomp to limit which system calls may be made, and the statx
call is too new, so it's not whitelisted. Because the syscall fails with EPERM instead of ENOSYS, the fallback to regular stat
doesn't work.
Host kernel: 4.15.0-65-generic
docker version
Client:
Version: 17.03.2-ce
API version: 1.27
Go version: go1.6.2
Git commit: f5ec1e2
Built: Thu Jul 5 23:07:48 2018
OS/Arch: linux/amd64
Server:
Version: 17.03.2-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.6.2
Git commit: f5ec1e2
Built: Thu Jul 5 23:07:48 2018
OS/Arch: linux/amd64
Experimental: false