Skip to content

Error trying to build over WSL path #7511

@bmc-msft

Description

@bmc-msft

Problem
When trying to build a project over a WSL mount, cargo is unable to lock Cargo.lock and generates an error

Steps

  1. Install rust in Windows
  2. Checkout a simple rust project in WSL (such as /tmp/testing)
  3. In powershell, change directories to \\wsl$\<Distro>\tmp\testing, then run cargo build

PS Microsoft.PowerShell.Core\FileSystem::\wsl$\Ubuntu\tmp\testing> cargo build --release
error: failed to lock file: \wsl$\Ubuntu\tmp\testing\Cargo.lock

Caused by:
Incorrect function. (os error 1)
PS Microsoft.PowerShell.Core\FileSystem::\wsl$\Ubuntu\tmp\testing>

Possible Solution(s)

Notes

Output of cargo version:

cargo 1.40.0-nightly (a429e8c 2019-10-04)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-filesystemArea: issues with filesystemsC-bugCategory: bugO-windowsOS: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions