Skip to content

Access Denied Error when x.py tries to rebuild bootstrap #109630

Closed
@Teapot4195

Description

@Teapot4195

It appears that x is creating the build folder with the incorrect permissions.

Steps to reproduce

  • Clean install.
  • Run ./x.ps1 build
  • Run any command (like ./x.py test tidy) that rebuilds anything that's already been built using the other shell.
  • Observe the following error
error: failed to remove file `C:/msys64/home/siyua/rust/build/bootstrap\debug\rustc.exe`

Caused by:
  Access is denied. (os error 5)
warning: build failed, waiting for other jobs to finish...
error: failed to remove file `C:/msys64/home/siyua/rust/build/bootstrap\debug\bootstrap.exe`

Caused by:
  Access is denied. (os error 5)
failed to run: C:/msys64/home/siyua/rust/build/x86_64-pc-windows-gnu/stage0/bin/cargo.exe build --manifest-path C:/msys64/home/siyua/rust/src/bootstrap/Cargo.toml

Workaround

Navigate to the rust build folder, open properties, navigate to the security tab and make sure that the Users section has permissions for Modify

Head is at ef03fda339923e659d3d3ca3321de887316d2807.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustC-bugCategory: This is a bug.O-windowsOperating system: WindowsS-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions