Closed Bug 1610680 Opened 4 years ago Closed 4 years ago

./mach bootstrap fails when trying to install rust

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

defect
Not set
normal

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: twkav, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36

Steps to reproduce:

I attempted to run ./mach bootstrap and chose option 2, Firefox Desktop, when prompted to choose a build type.

Actual results:

./mach bootstrap failed with the Rust installer throwing an unrecognized option error. See below. I am running Windows 10, Version 1909 (18363.592) with the latest version of Mozilla-Build installed. I do not want to use artifact mode because I want to be able to build Firefox with profile-guided optimization enabled, which would require manually building the various C++ components.

[Snip]
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
    Your version of Mercurial (5.1.2) is sufficiently modern.
    Your version of Python (2.7.16) is new enough.
    Could not find a Rust compiler.
    Will try to install Rust.
    Downloading rustup-init... Ok
    Running rustup-init...
    error: Found argument '--component' which wasn't expected, or isn't valid in this context

USAGE:
rustup-init.exe9jsw7z --default-host <default-host> --default-toolchain <default-toolchain> -y

For more information try --help
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 '[u'c:\users\twkav\appdata\local\temp\rustup-init.exe9jsw7z', u'-y', u'--default-toolchain', u'stable', u'--default-host', u'x86_64-pc-windows-msvc', u'--component
', u'rustfmt']' returned non-zero exit status 1

File "c:\ff-src\mozilla-central\python/mozboot/mozboot/mach_commands.py", line 44, in bootstrap
bootstrapper.bootstrap()
File "c:\ff-src\mozilla-central\python/mozboot\mozboot\bootstrap.py", line 462, in bootstrap
self.instance.ensure_rust_modern()
File "c:\ff-src\mozilla-central\python/mozboot\mozboot\base.py", line 718, in ensure_rust_modern
self.install_rust()
File "c:\ff-src\mozilla-central\python/mozboot\mozboot\base.py", line 782, in install_rust
'--component', 'rustfmt'])
File "c:\mozilla-build\python\lib\subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)

Expected results:

Rust should have installed correctly and ./mach bootstrap should have continued operation.

With the --component problem, this looks like a regression from bug 1609832.

Flags: needinfo?(mh+mozilla)
Regressed by: 1609832
Has Regression Range: --- → yes
Keywords: regression

Bug 1210157 added unicode_literals to the script but one use of
literals needed to stay a bytes string.

Assignee: nobody → mh+mozilla

1.9.0 is outdated, and the changes from bug 1609832 actually require 1.20.0.
1.21.1 is the latest current release.

Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/d5a70348e17c
Fix running mozboot.rust independently after bug 1210157. r=dmajor
https://hg.mozilla.org/integration/autoland/rev/ba5b020d5fe6
Fix running mozboot.rust independently on Windows. r=dmajor
https://hg.mozilla.org/integration/autoland/rev/5ec58a5c383e
Update rustup to 1.21.1. r=dmajor

Removing "on Windows" from bug description -- this affected linux as well, per dupe bug 1611000. I'm hoping the last commit (updating the rustup version) will address the issue that I was hitting there.

Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: ./mach bootstrap fails when trying to install rust on Windows under Mozilla-Build → ./mach bootstrap fails when trying to install rust under Mozilla-Build
Summary: ./mach bootstrap fails when trying to install rust under Mozilla-Build → ./mach bootstrap fails when trying to install rust
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: