Skip to content

"cargo build" failed to lock Cargo.lock (os error 95) #4096

@kozo2

Description

@kozo2

cargo build failed to lock Cargo.lock in a supercomputer environment.

klogin9$ pwd
~/hello_world
klogin9$ tree
.
|-- Cargo.toml
`-- src
    `-- main.rs

1 directory, 2 files
klogin9$ cat Cargo.toml
[package]

name = "hello_world"
version = "0.0.1"
authors = [ "Your name <[email protected]>" ]
klogin9$ cat src/main.rs
fn main() {
    println!("Hello, world!");
}
klogin9$ cargo --version
cargo 0.20.0-nightly (397359840 2017-05-18)
klogin9$ RUST_LOG=debug cargo build
DEBUG:cargo::build: executing; cmd=cargo-build; args=["~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo", "build"]
DEBUG:cargo::core::workspace: find_root - trying /volume1/~/Cargo.toml
DEBUG:cargo::core::workspace: find_root - trying /volume1/home/-------/Cargo.toml
DEBUG:cargo::core::workspace: find_root - trying /volume1/home/Cargo.toml
DEBUG:cargo::core::workspace: find_root - trying /volume1/Cargo.toml
DEBUG:cargo::core::workspace: find_root - trying /Cargo.toml
DEBUG:cargo::core::workspace: find_members - only me as a member
DEBUG:cargo::core::registry: load/missing  file:///volume1/~/hello_world
DEBUG:cargo::sources::config: loading: file:///volume1/~/hello_world
DEBUG:cargo::core::resolver: initial activation: hello_world v0.0.1 (file:///volume1/~/hello_world)
DEBUG:cargo: exit_with_error; err=CliError { error: Some(ChainedError { error: failed to write /volume1/~/hello_world/Cargo.lock, cause: ChainedError { error: failed to lock file: /volume1/~/hello_world/Cargo.lock, cause: Operation not supported (os error 95) } }), unknown: false, exit_code: 101 }
error: failed to write /volume1/~/hello_world/Cargo.lock

Caused by:
  failed to lock file: /volume1/~/hello_world/Cargo.lock

Caused by:
  Operation not supported (os error 95)
klogin9$

On the other hand, rustc worked well.

$ cd src/
$ rustc --version
rustc 1.19.0-nightly (81734e0e0 2017-05-22)
$ rustc main.rs
$ ls
main  main.rs
$ ./main
Hello, world!
$

Do you have any idea what (os error 95) means?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions