Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap using set_times on a read-only file #127849

Closed
ChrisDenton opened this issue Jul 17, 2024 · 0 comments · Fixed by #127850
Closed

Bootstrap using set_times on a read-only file #127849

ChrisDenton opened this issue Jul 17, 2024 · 0 comments · Fixed by #127850
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. O-windows Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@ChrisDenton
Copy link
Member

@jieyouxu noticed that bootstrap is now failing on a clean Windows build:

thread 'main' panicked at src\core\download.rs:711:13:
llvm_config_file.set_times(file_times) failed with Access is denied. (os error 5)

This fails due to the file being opened as read-only:

let llvm_config_file = t!(File::open(llvm_config));
t!(llvm_config_file.set_times(file_times));

This could be fixed using windows specific permissions but it'd be simpler to just use OpenOptions with write(true).

@ChrisDenton ChrisDenton added the C-bug Category: This is a bug. label Jul 17, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 17, 2024
@jieyouxu jieyouxu added O-windows Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 17, 2024
@bors bors closed this as completed in f99f61b Jul 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jul 17, 2024
Rollup merge of rust-lang#127850 - jieyouxu:bootstrap-llvm-config, r=onur-ozkan

bootstrap: open `llvm-config` as r+w

This previously failed on Windows and prevented building on Windows for compiler stuff because the `llvm-config` file was open as read-only.

Tested locally on a Windows machine.

Fixes rust-lang#127849.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. O-windows Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants