Closed Bug 1560826 Opened 1 year ago Closed 1 year ago

./mach bootstrap failing with error code 1


(Firefox Build System :: Bootstrap Configuration, defect)

67 Branch
Not set


(firefox69 fixed)

Tracking Status
firefox69 --- fixed


(Reporter: ruthra, Assigned: glandium)




(4 files)

Attached file command_output.txt

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

Downloaded firefox source bundle. unbundled the repository and did a 'hg pull' and 'hg update'.

Then ran:
./mach bootstrap

Actual results:

Following error occured.
$ ./mach bootstrap
mach bootstrap is not fully implemented in MozillaBuild

Note on Artifact Mode:

Artifact builds download prebuilt C++ components rather than building
them locally. Artifact builds are faster!

Artifact builds are recommended for people working on Firefox or
Firefox for Android frontends, or the GeckoView Java API. They are unsuitable
for those working on C++ code. For more information see:

Please choose the version of Firefox you want to build:

  1. Firefox for Desktop Artifact Mode
  2. Firefox for Desktop
  3. GeckoView/Firefox for Android Artifact Mode
  4. GeckoView/Firefox for Android
    Your choice: 2
    Running pip to ensure Mercurial is up-to-date...
    DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Ple
    ase upgrade your Python as Python 2.7 won't be maintained after that date. A fut
    ure version of pip will drop support for Python 2.7.
    Collecting Mercurial
    Using cached
    ERROR: Complete output from command python egg_info:
    ERROR: Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "c:\users\lenovo\appdata\local\temp\pip-install-caygi6\Mercurial\setu", line 1271, in <module>
    File "contrib/python-zstandard\", line 145, in get_c_extensio
    File "c:\mozilla-build\python\lib\distutils\", line 383, i
    n initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
    File "c:\mozilla-build\python\lib\site-packages\setuptools\", line
    147, in msvc9_query_vcvarsall
    return EnvironmentInfo(arch, ver).return_env()
    File "c:\mozilla-build\python\lib\site-packages\setuptools\", line
    1228, in return_env
    File "c:\mozilla-build\python\lib\site-packages\setuptools\", line
    877, in VCIncludes
    return [os.path.join(, 'Include'),
    File "c:\mozilla-build\python\lib\site-packages\setuptools\", line
    556, in VCInstallDir
    raise distutils.errors.DistutilsPlatformError(msg)
    distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 9.0 is require
    d. Get it from
    ERROR: Command "python egg_info" failed with error code 1 in c:\users\l
    Error running mach:

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| 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

The details of the failure are as follows:

CalledProcessError: Command '['c:\mozilla-build\python\Scripts\pip.exe', 'in
stall', '--upgrade', 'Mercurial']' returned non-zero exit status 1

File "f:\mozilla-source\mozilla-central\python/mozboot/mozboot/mach_commands.p
y", line 43, in bootstrap
File "f:\mozilla-source\mozilla-central\python/mozboot\mozboot\",
line 432, in bootstrap
hg_installed, hg_modern = self.instance.ensure_mercurial_modern()
File "f:\mozilla-source\mozilla-central\python/mozboot\mozboot\
", line 57, in ensure_mercurial_modern[self.which('pip'), 'install', '--upgrade', 'Mercurial'])
File "f:\mozilla-source\mozilla-central\python/mozboot\mozboot\
", line 108, in run
subprocess.check_call(command, stdin=sys.stdin)
File "c:\mozilla-build\python\lib\", line 190, in check_call
raise CalledProcessError(retcode, cmd)

Expected results:

command should have completed without error.

Component: Untriaged → Bootstrap Configuration
Product: Firefox → Firefox Build System

Looks like i was missing Visual C++ 9.0 causing this issue. Once Microsoft visual C++ was installed from, bootstrap worked fine.

Closed: 1 year ago
Resolution: --- → INVALID

The actual problem is that mercurial upstream didn't publish wheels for Windows for version 5.0.1.

Assignee: nobody → mh+mozilla
Ever confirmed: true
Resolution: INVALID → ---

This makes the bootstrap behavior wrt. Mercurial consistent on all
platforms, making Windows bootstrap only upgrade Mercurial if the
version is older than MODERN_MERCURIAL_VERSION.

As a side effect, this avoids upgrading to version 5.0.1, which doesn't
come with wheels at the moment.

4.3.3 is the strict minimum required for v-c-t's config wizard, but it
is preferable people use more modern versions. We could go with 5.0, but
it feels like people still using 4.8 and 4.9 don't really need to be
bugged to update to a more recent version, they are kind of modern
enough. OTOH MozillaBuild comes with 4.5.x, and this will force an
upgrade for those.

Pushed by
Backout changeset c9732a51552b (bug 1364511). r=nalexander
Only install mercurial versions that have wheels. r=nalexander
Make bootstrap upgrade mercurial when it is older than 4.8. r=nalexander
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Duplicate of this bug: 1594140
You need to log in before you can comment on or make changes to this bug.