Skip to content

Unable to build with on Windows 10 with MinGW nor MSVC #117567

Closed
@samuelpmish

Description

@samuelpmish

Hi, I'm trying to build on Windows and running into problems.


I'm following the readme and starting with a clean Windows 10 machine, installing git, python and cmake with winget.

From there, with the MinGW build I use pacman to install the listed packages, and invoke

python x.py setup user && python x.py build && python x.py install

After a while, it eventually fails with the error message

   Compiling clap_complete v4.4.3
   Compiling build_helper v0.1.0 (C:\actions-runner\_work\enzyme\rust\src\tools\build_helper)
    Finished dev [unoptimized] target(s) in 31.59s
thread 'main' panicked at src\core\config\config.rs:1156:74:
called `Result::unwrap()` on an `Err` value: Os { code: 3, kind: NotFound, message: "The system cannot
 find the path specified." }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:47

Which is similar to #105696. In that issue, they mention that the main readme instructions are wrong (but still haven't been updated) and that git installed by pacman is the source of the problem, so I removed it and reran the python scripts (from a mingw terminal)

$ python x.py setup user && python x.py build && python x.py install
Building bootstrap
    Finished dev [unoptimized] target(s) in 0.17s
error: no `setup` rules matched ["user"]

I'm not sure what to make of this error, so I thought I'd also try building with the MSVC toolchain and see if that works.


For the MSVC build, I downloaded visual studio and installed the Windows 10 SDK and C++ x64/86 build tools packages. Then, when running x.py again from cmd.exe I get the same kind of error

> python x.py setup user
Building bootstrap
    Finished dev [unoptimized] target(s) in 0.12s
error: no `setup` rules matched ["user"]

Can anyone help me understand what I'm doing wrong?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-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