You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Determine the msys/python environment requirements for Servo on Windows #9168
Related to #1908, in order to get Servo working on Windows we need to figure out the python installations and MSYS-related requirements for the build environment to work.
In both cases, we are having problems related to pip installs during bootstrapping. In the first case, everything seems to download and get installed, but the packages are then not available in subsequent builds, seemingly because the installation is not finalized. Suggestions have been that the patches are incomplete and might require additional changes to pip and some of the site-related python code.
In the second case, packages end up both locally and globally installed by pip (that is, pip list from a shell shows them globally installed, not just to the virtualenv). But, we still get errors about a missing toml package.
Install both the native and MSYS versions of python.
To avoid confusion, there's actually three possible versions of python --
The native win32 python. This comes from python.org. In this python, sys.platform == "win32", os.path.sep == "", os.name == "nt"
A MSYS2 python. This is the "msys2/python2" package, and is installed in /usr/bin/python. In this python, sys.platform == "msys", os.path.sep == "/", os.name == "posix"
A mingw64 python. This is the "mingw64/mingw-w64-x86_64-python2" package, installed in /mingw64/bin/python. In this python, sys.platform == "win32", os.path.sep == "/", os.name == "nt"
I ignored the MSYS2 python entirely, but maybe that was a mistake. That python uses the msys posix emulation layer, at might be the closest thing that might "just work". To get pip etc there, you have to install the "msys2/python-setuptools" package, then use "/usr/bin/easy_install-2.7 pip virtualenv".
If I do that, and then run "./mach build -d" from a MSYS2 shell (not MINGW64!), and run it as Administrator (required so that os.symlink() can work, otherwise virtualenv errors out there).... things progress to downloading a rustc nightly!
mingw-w64-x86_64-python2 is required by mingw-w64-x86_64-gdb, so it can't easily be removed (without also removing gdb), but you can rename /mingw64/bin/python2.exe and python2.7.exe to python2-mingw64.exe etc. Now if I run ./mach build -d from within a mingw64 shell, I'm downloading the proper rust nightly. (This was easily fixable in a msys shell too, but I suspect that this is going to result in more happiness, since gcc etc in the mingw64 env is more what we want)
So, build seems to be going now. What I did, from a MINGW64 shell started as Administrator (right click, run as Administrator; or check run as Administrator in something like ConEmu).
I was not aware there are two different pythons in msys2. I have tried the mingw64 version, but virtualenv is not working there. I will try the msys version to see if it makes any difference for #10596.
I have researched and documented an effective way to have windows environments set up for 32 and 64 bits in Windows 7. I assume this will work in all windowses.
Please see documentation I posted in this ticket. #12356
Activity
vvuk commentedon Jan 6, 2016
To avoid confusion, there's actually three possible versions of python --
I ignored the MSYS2 python entirely, but maybe that was a mistake. That python uses the msys posix emulation layer, at might be the closest thing that might "just work". To get pip etc there, you have to install the "msys2/python-setuptools" package, then use "/usr/bin/easy_install-2.7 pip virtualenv".
If I do that, and then run "./mach build -d" from a MSYS2 shell (not MINGW64!), and run it as Administrator (required so that os.symlink() can work, otherwise virtualenv errors out there).... things progress to downloading a rustc nightly!
vvuk commentedon Jan 6, 2016
mingw-w64-x86_64-python2 is required by mingw-w64-x86_64-gdb, so it can't easily be removed (without also removing gdb), but you can rename /mingw64/bin/python2.exe and python2.7.exe to python2-mingw64.exe etc. Now if I run ./mach build -d from within a mingw64 shell, I'm downloading the proper rust nightly. (This was easily fixable in a msys shell too, but I suspect that this is going to result in more happiness, since gcc etc in the mingw64 env is more what we want)
vvuk commentedon Jan 6, 2016
So, build seems to be going now. What I did, from a MINGW64 shell started as Administrator (right click, run as Administrator; or check run as Administrator in something like ConEmu).
jasonwilliams commentedon Feb 4, 2016
@vvuk is there a better fix for this long term?
vvuk commentedon Feb 4, 2016
No idea. The better fix is to not use python in the build system (and especially not use virtualenv etc.), but that ship has sailed.
zbynekwinkler commentedon Apr 14, 2016
I am slowly getting something to build (see #10596 and #10595). The steps I used:
I was not aware there are two different pythons in msys2. I have tried the mingw64 version, but virtualenv is not working there. I will try the msys version to see if it makes any difference for #10596.
zbynekwinkler commentedon Apr 14, 2016
Well, it fails even sooner while "Compiling hbs-pow-sys v0.2.0" saying virtualenv is not working (it hardcodes win32 python).
zeusintuivo commentedon Jul 18, 2016
I have researched and documented an effective way to have windows environments set up for 32 and 64 bits in Windows 7. I assume this will work in all windowses.
Please see documentation I posted in this ticket. #12356
larsbergstrom commentedon Aug 12, 2016
See comments in #10665 (comment)