mach create-mach-environment fails on Apple Silicon mac
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: glandium, Unassigned)
References
(Blocks 1 open bug)
Details
(but this might not be specific to Apple Silicon, this could be a macOS 11 thing)
It fails with:
Python 3 mach environment created.
New python executable in /Users/glandium/.mozbuild/_virtualenvs/mach_py2/bin/python
ERROR: The executable /Users/glandium/.mozbuild/_virtualenvs/mach_py2/bin/python is not functioning
ERROR: It thinks sys.prefix is '/Users/glandium/gecko-dev' (should be u'/Users/glandium/.mozbuild/_virtualenvs/mach_py2')
ERROR: virtualenv is not compatible with this system or executable
Error running mach:
['create-mach-environment']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file create-mach-environment| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
Exception: Failed to create virtualenv: /Users/glandium/.mozbuild/_virtualenvs/mach_py2 (virtualenv.py retcode: 100)
File "/Users/glandium/gecko-dev/python/mozbuild/mozbuild/mach_commands.py", line 1518, in create_mach_environment
manager.build(sys.executable)
File "/Users/glandium/gecko-dev/python/mozbuild/mozbuild/virtualenv.py", line 513, in build
self.create(python)
File "/Users/glandium/gecko-dev/python/mozbuild/mozbuild/virtualenv.py", line 263, in create
self.virtualenv_root, result))
WARNING! Failed to create a Python 2 mach environment.
Comment 1•4 years ago
|
||
The error suggests to me that virtualenv
itself (or at least, our version of it) doesn't really work on either Apple Silicon or macOS 11, at least on Python 2.
Unfortunately we're also on a super old version of virtualenv
, so that might be the root cause as well. Bug 1654457 tracks that.
Are you able to install virtualenv
and create a Python 2 virtualenv
yourself? If so, that would suggest bug 1654457 would fix this. (I would attempt to reproduce myself but cannot for obvious reasons.)
Reporter | ||
Comment 2•4 years ago
|
||
I confirm I can reproduce with a locally installed virtualenv of the same version as we have in-tree, and cannot reproduce with a locally installed virtualenv 20.0.31.
Comment 3•4 years ago
|
||
Cool. I'll resolve this as a dupe then. (In the meantime, if you didn't already know, you can set MACH_USE_SYSTEM_PYTHON
in case you need to run py2 mach
commands and this is blocking you.)
Description
•