Skip to content

x perf benchmark Fails on Windows: Cannot Find rustc Executable #141281

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

Closed
Sol-Ell opened this issue May 20, 2025 · 0 comments
Closed

x perf benchmark Fails on Windows: Cannot Find rustc Executable #141281

Sol-Ell opened this issue May 20, 2025 · 0 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@Sol-Ell
Copy link
Contributor

Sol-Ell commented May 20, 2025

Summary

Running x perf benchmark on Windows fails due to an invalid path to the rustc executable.


Command Used

./x perf benchmark some-benchmark

Expected Behavior

The path to rustc should include the platform-specific executable suffix by appending std::env::consts::EXE_SUFFIX.

Reference:

let rustc = sysroot.join("bin/rustc");


Actual Behavior

Building bootstrap
   Compiling bootstrap v0.0.0 (C:\Users\user\Desktop\projects\rust\src\bootstrap)
    Finished `dev` profile [unoptimized] target(s) in 10.72s
Building stage0 tool collector (x86_64-pc-windows-msvc)
    Finished `release` profile [optimized] target(s) in 1.73s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Using database `C:\Users\user\Desktop\projects\rust\build\tmp\rustc-perf\results\results.db`
collector error: failed to canonicalize rustc executable "C:\\Users\\user\\Desktop\\projects\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\bin/rustc"

Caused by:
    The system cannot find the file specified. (os error 2)
Command has failed. Rerun with -v to see more details.

Bootstrap Configuration (bootstrap.toml)

# See bootstrap.example.toml for documentation of available options
profile = "library"
change-id = 140732

Operating System

Windows 11


Git Commit

> git rev-parse HEAD
a8e4c68dcb4dc1e48a0db294c5323cab0227fcb9

Additional Context

The error seems to be caused by using a forward slash (/) instead of a backslash (\) in the rustc path, and by not appending .exe on Windows. Adding the correct executable suffix should resolve the issue.

@Sol-Ell Sol-Ell added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. labels May 20, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 20, 2025
@onur-ozkan onur-ozkan removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 21, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 21, 2025
…s, r=Kobzol

Allow `x perf` to find rustc.exe on Windows

Related issue: rust-lang#141281
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 21, 2025
Rollup merge of rust-lang#141283 - Sol-Ell:fix-benchmarking-on-windows, r=Kobzol

Allow `x perf` to find rustc.exe on Windows

Related issue: rust-lang#141281
@Sol-Ell Sol-Ell closed this as completed May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

3 participants