Open
Description
When run on a project located on a NFS mount, cargo fails to lock the build directory.
Expected behavior:
# cd /tmp
# cargo new --bin bin
Created binary (application) `bin` project
# cd bin
# cargo run & cargo run
Blocking waiting for file lock on build directory
Compiling bin v0.1.0 (file:///tmp/bin)
Finished dev [unoptimized + debuginfo] target(s) in 0.57 secs
Running `target/debug/bin`
Hello, world!
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/bin`
Hello, world!
Actual behavior (my /home is NFSv4 mounted, with no lock-related options on the mount):
# cd $HOME/src
# cargo new --bin bin
Created binary (application) `bin` project
# cd bin
# cargo run & cargo run
Compiling bin v0.1.0 (file:///home/bruce/src/bin)
Compiling bin v0.1.0 (file:///home/bruce/src/bin)
error: failed to remove /home/bruce/src/bin/target/debug/deps/bin-291ef6a9e055a048.0.o: No such file or directory (os error 2)
error: failed to remove /home/bruce/src/bin/target/debug/deps/bin-291ef6a9e055a048.crate.metadata.o: No such file or directory (os error 2)
error: failed to remove /home/bruce/src/bin/target/debug/deps/bin-291ef6a9e055a048.crate.allocator.o: No such file or directory (os error 2)
Finished dev [unoptimized + debuginfo] target(s) in 0.90 secs
Running `target/debug/bin`
Finished dev [unoptimized + debuginfo] target(s) in 0.96 secs
Running `target/debug/bin`
Hello, world!
Hello, world!
I'm using cargo 0.22.0 (3423351 2017-10-06) on Gentoo Linux, kernel 4.9.52.