You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
I'm trying to compile Rust in a Docker container (on Linux/Debian) with a read-only root filesystem (--read-only), and a tmpfs to work in (--tmpfs /home/dev/build:exec). After running the ./x.py build script, I end up with the following error:
error: Read-only file system (os error 30)
failed to run: /home/dev/build/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /home/dev/build/rust/src/bootstrap/Cargo.toml
The problem is that this error message doesn't say which path it tried to write to.
I ran the failing command again with strace to find that the missing part is $HOME/.cargo:
Improve error messages on mkdir failure
This commit ensures that `fs::create_dir*` isn't called throughout Cargo
and is instead routed through our own wrapper `paths::create_dir_all`
which brings with it a few benefits:
* Gracefully handles when the directory already exists (which is the
behavior we always want anyway)
* Includes the path name in the error message of what failed
* Handles races of creating a directory by default
Closes#7304
Problem
I'm trying to compile Rust in a Docker container (on Linux/Debian) with a read-only root filesystem (
--read-only
), and a tmpfs to work in (--tmpfs /home/dev/build:exec
). After running the./x.py
build script, I end up with the following error:The problem is that this error message doesn't say which path it tried to write to.
I ran the failing command again with
strace
to find that the missing part is$HOME/.cargo
:I expected the error message to indicate which path triggered the
EROFS (Read-only file system)
error, for example:That would be more user-friendly :)
Steps
$HOME/build
(with theexec
flag enabled)https://github.com/rust-lang/rust
inside$HOME/build
./x.py
inside$HOME/build/rust
Possible Solution(s)
I couldn't locate where this specific
mkdir
occurs in the code, but I'd suggest to add the faulty path to the I/O error message.Notes
Output of
cargo version
:cargo 1.38.0-beta (e853aa976 2019-08-09)
The text was updated successfully, but these errors were encountered: