rust-lang / rust-lang/cargo

cargo build on Google Drive File Stream fails to link or copy .dSYM

Open
#8,401 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-filesystem S-needs-design
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

I have tried my first cargo project on a virtual disk of Google Drive File Stream (Version: 39.0.10.0) on top of Macbook Pro's Apple File System(APFS). But it fails to cargo build. If I create my cargo project directly on APFS, this error will not appear.

The relevant item of mount is:

drivefs       on         /Volumes/GoogleDrive  (dfsfuse_DFS,              local,    nodev,        nosuid,     synchronous,  mounted  by  khoguan)

The output of rustc -vV is:

rustc 1.44.1 (c7087fe00 2020-06-17)
binary: rustc
commit-hash: c7087fe00d2ba919df1d813c040a5d47e43b0fe7
commit-date: 2020-06-17
host: x86_64-apple-darwin
release: 1.44.1
LLVM version: 9.0

Here is the output of CARGO_LOG=cargo::util::paths=trace cargo build:

   Compiling hello_world v0.1.0 (/Volumes/GoogleDrive/My Drive/hello_world)
[2020-06-22T03:11:07Z DEBUG cargo::util::paths] invocation time for "/Volumes/GoogleDrive/My Drive/hello_world/target/debug/.fingerprint/hello_world-6706d124191574b7" is 1592795467.000000000s
warning: Hard linking files in the incremental compilation cache failed. Copying files instead. Consider moving the cache directory to a file system which supports hard linking in session dir `/Volumes/GoogleDrive/My Drive/hello_world/target/debug/incremental/hello_world-3lr0nf7wfwzik/s-folk4weenq-3aqig3-working`

warning: 1 warning emitted

[2020-06-22T03:11:07Z DEBUG cargo::util::paths] linking /Volumes/GoogleDrive/My Drive/hello_world/target/debug/deps/hello_world to /Volumes/GoogleDrive/My Drive/hello_world/target/debug/hello_world
[2020-06-22T03:11:07Z DEBUG cargo::util::paths] link failed Function not implemented (os error 78). falling back to fs::copy
[2020-06-22T03:11:07Z DEBUG cargo::util::paths] linking /Volumes/GoogleDrive/My Drive/hello_world/target/debug/deps/hello_world.dSYM to /Volumes/GoogleDrive/My Drive/hello_world/target/debug/hello_world.dSYM
[2020-06-22T03:11:07Z DEBUG cargo::util::paths] link failed Operation not supported (os error 45). falling back to fs::copy
error: failed to link or copy `/Volumes/GoogleDrive/My Drive/hello_world/target/debug/deps/hello_world.dSYM` to `/Volumes/GoogleDrive/My Drive/hello_world/target/debug/hello_world.dSYM`

Caused by:
  the source path is not an existing regular file

Originally posted by @khoguan in https://github.com/rust-lang/cargo/issues/4671#issuecomment-647252121

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce cargo build for a first project on Google Drive File Stream and compare it with APFS, using the provided rustc version and mount details. Start with the cargo::util::paths trace around hard-linking and copying, then verify that the .dSYM artifact builds successfully on the virtual disk without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.