-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
./configure fails on Windows/MSYS2 #34489
Comments
Non-MSYS2 cmake from cmake.org installed globally gives the same errors as |
Ha, it's actually Python is at fault here, not CMake. So the solution is to make the LLVM build system to use (roughly speaking) "C:\Python27\python.exe" instead of "/usr/bin/python2" somehow. I solved this locally by hard-coding the |
@petrochenkov Maybe the buildbots just don't have msys python installed, or if they do they have the standard windows python in the PATH first so it gets used instead of msys python? |
This is very likely. If we look at some random buildbot logs, like http://buildbot.rust-lang.org/builders/auto-win-gnu-64-opt/builds/4667/steps/configure/logs/stdio we see than a custom version of Python is not passed to However, Python is installed with |
@petrochenkov Which is why I don't bother building Rust with the configure/make hell and just invoke rustbuild directly. Solves all sorts of problems, such as this issue. |
@retep998 |
@petrochenkov See, you're still using configure/make hell when you do it like that. I'm invoking |
Yes, buildbots are using windows python. |
I can't reproduce it on my own local install using whatever old msys2 I'm on. Have to set up a new env. |
@petrochenkov interesting! This sounds like what this block is trying to catch as this error looks very familiar to me. (tracked down to python when we failed to build LLVM awhile ago as well) |
Note that if the default instructions on how to build Rust on Windows are now broken in the README that's pretty serious and we should try to fix that pronto (e.g. correct the docs). @petrochenkov I'm curious, does that check not work for you? That is, is it not firing when it perhaps should be firing? |
I must be blind, I never noticed this check o_O
It fires only for MSVC flavor builds, but after #34055 the problem exists for GNU builds as well (I use GNU, readme instructions also refer to GNU). |
I think what should be done is 1) docs fixed 2) Python version check performed for GNU builds 3)
I never tried this actually, I'll check if this works. This is probably the best thing to put into README.md if it does, much simpler than installing |
@petrochenkov oh duh, right! If you have that check for both GNU and MSVC builds, does it prevent the build altogether? If that works then I agree with your 1/2/3! |
Yes. |
Excellent! Do you want to send a PR to the configure script or shall I? |
Could you do this? |
Sure, thanks for the investigation and the report! |
|
The LLVM build system is somewhat picky about which Python is used to build it as it's known to be incompatible with the default `python2` package that ships with MinGW. This was previously detected for MSVC builds but the logic was left out for MinGW by accident (now that we've switched to cmake builds for LLVM everywhere). This corrects the `./configure` check and also updates the `README.md` accordingly. Additionally, a number of instructions were updated to work with the most recent copy of MSYS2. Closes rust-lang#34489
configure: Check for valid Python on MinGW as well The LLVM build system is somewhat picky about which Python is used to build it as it's known to be incompatible with the default `python2` package that ships with MinGW. This was previously detected for MSVC builds but the logic was left out for MinGW by accident (now that we've switched to cmake builds for LLVM everywhere). This corrects the `./configure` check and also updates the `README.md` accordingly. Additionally, a number of instructions were updated to work with the most recent copy of MSYS2. Closes #28260 Closes #34489
The PR causing this is #34055
cc @brson @alexcrichton
How to reproduce: simply run
./configure
on fresh or not so fresh clone of Rust repo using relatively recent MSYS2 (msys2-x86_64-20160205
).cmake package used:
mingw64/mingw-w64-x86_64-cmake 3.4.1-1
Errors:
All the files reported by CMake as missing actually exist, so there is probably some mis-translation between Linux-style msys file paths and Windows paths or something like that.
Non-mingw cmake package (
msys/cmake 3.2.3-1
) gives other errors (EDIT: irrelevant):The text was updated successfully, but these errors were encountered: