-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Unable to build with on Windows 10 with MinGW nor MSVC #117567
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Comments
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Nov 4, 2023
Try doing |
ChrisDenton
added
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Nov 4, 2023
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this issue
Feb 26, 2024
Improvements to building and CI for mingw/msys I was getting error messages when trying to follow the build instructions the mingw build for Rust, and managed to track the issue down to an incomparability of Rust's bootstrap program with MSYS2's version of git. Essentially, the problem is that MSYS2's git works in emulated unix-y paths, but bootstrap expects a Windows path. I found a workaround for this by using relative paths instead of absolute paths. Along with that fix, this PR also updates the build instructions for MinGW to be compatible with modern versions of MSYS2, and some changes to CI to make sure that MSYS2's version of git is tested. In particular, I'm suggesting using the [MSYS2 github action](https://github.com/marketplace/actions/setup-msys2) specially made for this purpose, which is much less hacky than the old approach and gives us more control of what packages are installed. I also cleaned up as many alternate versions of key tools as I could find from PATH, to avoid accidental usage, and cleaned up some abuses of the `CUSTOM_MINGW` environment variable. This fixes rust-lang/rust#105696 and fixes rust-lang/rust#117567
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this issue
Apr 7, 2024
Improvements to building and CI for mingw/msys I was getting error messages when trying to follow the build instructions the mingw build for Rust, and managed to track the issue down to an incomparability of Rust's bootstrap program with MSYS2's version of git. Essentially, the problem is that MSYS2's git works in emulated unix-y paths, but bootstrap expects a Windows path. I found a workaround for this by using relative paths instead of absolute paths. Along with that fix, this PR also updates the build instructions for MinGW to be compatible with modern versions of MSYS2, and some changes to CI to make sure that MSYS2's version of git is tested. In particular, I'm suggesting using the [MSYS2 github action](https://github.com/marketplace/actions/setup-msys2) specially made for this purpose, which is much less hacky than the old approach and gives us more control of what packages are installed. I also cleaned up as many alternate versions of key tools as I could find from PATH, to avoid accidental usage, and cleaned up some abuses of the `CUSTOM_MINGW` environment variable. This fixes rust-lang/rust#105696 and fixes rust-lang/rust#117567
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this issue
Apr 27, 2024
Improvements to building and CI for mingw/msys I was getting error messages when trying to follow the build instructions the mingw build for Rust, and managed to track the issue down to an incomparability of Rust's bootstrap program with MSYS2's version of git. Essentially, the problem is that MSYS2's git works in emulated unix-y paths, but bootstrap expects a Windows path. I found a workaround for this by using relative paths instead of absolute paths. Along with that fix, this PR also updates the build instructions for MinGW to be compatible with modern versions of MSYS2, and some changes to CI to make sure that MSYS2's version of git is tested. In particular, I'm suggesting using the [MSYS2 github action](https://github.com/marketplace/actions/setup-msys2) specially made for this purpose, which is much less hacky than the old approach and gives us more control of what packages are installed. I also cleaned up as many alternate versions of key tools as I could find from PATH, to avoid accidental usage, and cleaned up some abuses of the `CUSTOM_MINGW` environment variable. This fixes rust-lang/rust#105696 and fixes rust-lang/rust#117567
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
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
andcmake
withwinget
.From there, with the MinGW build I use pacman to install the listed packages, and invoke
After a while, it eventually fails with the error message
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 bypacman
is the source of the problem, so I removed it and reran the python scripts (from a mingw terminal)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 fromcmd.exe
I get the same kind of errorCan anyone help me understand what I'm doing wrong?
Thanks
The text was updated successfully, but these errors were encountered: