Closed Bug 1560826 Opened 5 years ago Closed 5 years ago

./mach bootstrap failing with error code 1

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

67 Branch
defect
Not set
normal

Tracking

(firefox69 fixed)

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: ruthra, Assigned: glandium)

References

Details

Attachments

(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:
https://developer.mozilla.org/en-US/docs/Artifact_builds.

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 https://files.pythonhosted.org/packages/e5/a7/b6ae4ec1e1beda335e0
    4be7fc5ebe4ff65e6dccff266f6e6d233a3cc6a9e/mercurial-5.0.1.tar.gz
    ERROR: Complete output from command python setup.py 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
    p.py", line 1271, in <module>
    root=os.path.abspath(os.path.dirname(file))))
    File "contrib/python-zstandard\setup_zstd.py", line 145, in get_c_extensio
    n
    compiler.initialize()
    File "c:\mozilla-build\python\lib\distutils\msvc9compiler.py", line 383, i
    n initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
    File "c:\mozilla-build\python\lib\site-packages\setuptools\msvc.py", line
    147, in msvc9_query_vcvarsall
    return EnvironmentInfo(arch, ver).return_env()
    File "c:\mozilla-build\python\lib\site-packages\setuptools\msvc.py", line
    1228, in return_env
    [self.VCIncludes,
    File "c:\mozilla-build\python\lib\site-packages\setuptools\msvc.py", line
    877, in VCIncludes
    return [os.path.join(self.si.VCInstallDir, 'Include'),
    File "c:\mozilla-build\python\lib\site-packages\setuptools\msvc.py", line
    556, in VCInstallDir
    raise distutils.errors.DistutilsPlatformError(msg)
    distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 9.0 is require
    d. Get it from http://aka.ms/vcpython27
    ----------------------------------------
    ERROR: Command "python setup.py egg_info" failed with error code 1 in c:\users\l
    enovo\appdata\local\temp\pip-install-caygi6\Mercurial
    Error running mach:
['bootstrap']

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

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
bootstrapper.bootstrap()
File "f:\mozilla-source\mozilla-central\python/mozboot\mozboot\bootstrap.py",
line 432, in bootstrap
hg_installed, hg_modern = self.instance.ensure_mercurial_modern()
File "f:\mozilla-source\mozilla-central\python/mozboot\mozboot\mozillabuild.py
", line 57, in ensure_mercurial_modern
self.run([self.which('pip'), 'install', '--upgrade', 'Mercurial'])
File "f:\mozilla-source\mozilla-central\python/mozboot\mozboot\mozillabuild.py
", line 108, in run
subprocess.check_call(command, stdin=sys.stdin)
File "c:\mozilla-build\python\lib\subprocess.py", 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 http://aka.ms/vcpython27, bootstrap worked fine.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years 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
Status: RESOLVED → REOPENED
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 mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/14659558eaad
Backout changeset c9732a51552b (bug 1364511). r=nalexander
https://hg.mozilla.org/integration/autoland/rev/bd4a8fb77389
Only install mercurial versions that have wheels. r=nalexander
https://hg.mozilla.org/integration/autoland/rev/cac1aaff7d7b
Make bootstrap upgrade mercurial when it is older than 4.8. r=nalexander
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: