Closed Bug 1709934 Opened 4 years ago Closed 4 years ago

Bootstrapping Firefox on CentOS 7 has Rust, Pip issues

Categories

(Firefox Build System :: Bootstrap Configuration, defect, P5)

78 Branch
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: wmrieker, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

https://davidwalsh.name/how-to-build-firefox
hg clone https://hg.mozilla.org/mozilla-central/
cd mozilla-central
./mach bootstrap

Actual results:

...
stable-x86_64-unknown-linux-gnu updated - rustc 1.52.0 (88f19c6da 2021-05-03)

error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rustfmt' for target 'x86_64-unknown-linux-gnu'; did you mean 'rust-std'?
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 bootstrap| 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:

subprocess.CalledProcessError: Command '['/home/mrieker/.cargo/bin/rustup', 'component', 'add', 'rustfmt']' returned non-zero exit status 1.

File "/home/mrieker/mozilla-central/python/mozboot/mozboot/mach_commands.py", line 50, in bootstrap
bootstrapper.bootstrap(self.settings)
File "/home/mrieker/mozilla-central/python/mozboot/mozboot/bootstrap.py", line 361, in bootstrap
self.instance.ensure_rust_modern()
File "/home/mrieker/mozilla-central/python/mozboot/mozboot/base.py", line 799, in ensure_rust_modern
self.upgrade_rust(rustup)
File "/home/mrieker/mozilla-central/python/mozboot/mozboot/base.py", line 852, in upgrade_rust
subprocess.check_call([rustup, "component", "add", "rustfmt"])
File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)

Expected results:

naively expected build to succeed

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Bootstrap Configuration' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

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

There was a Rust release (1.52) that came out today, and perhaps it interfered with the bootstrapping.

A couple things for you to try:

  1. /home/mrieker/.cargo/bin/rustup component add rustfmt, to see if it is still failing.
    • If it worked now, then run ./mach bootstrap again, and it should succeed.
  2. If rustup still isn't able to add the component, then can you run the following commands, pasting their results here?
    • rustup show
    • rustup toolchain list
    • rustup component list
Flags: needinfo?(wmrieker)
ok so I think the problem is that I didn't have rust installed, so I did: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh so maybe update the install script to install rust if not present but then I get (should I file a separate bug)?:
Attachment #9220790 - Attachment is obsolete: true
Flags: needinfo?(wmrieker)

ok so I think the problem is that I didn't have rust installed, so I did:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
so maybe update the install script to install rust if not present

but then I get (should I file a separate bug)?:

see 'Attached file output from ./mach bootstrap — Details' above

ok so I think the problem is that I didn't have rust installed

Based on the stack trace in your first comment, the bootstrap script did find rustup. I'm unsure how it located rustup but then failed afterwards. More details would be helpful here, though if you already reinstalled rust then it might be hard to track down how this happened.

but then I get (should I file a separate bug)?:

Are you on Ubuntu or Debian? If so, are you perhaps missing the python3-wheel package?
Try apt install python3-wheel, and try again. If that resolves the problem, let me know.

Flags: needinfo?(wmrieker)

Ah, look at that:

Mike, can you confirm that you're on Debian? Also, is there any chance you installed python3-pip with --no-install-recommends?

I'm using CentOS 7. btw, I did not RE-install rust, I installed it for the First Time. So I think this script simply needs to check if rust is installed and try to install it or tell user to install it.

I don't know rust (or python for that matter). Fortunately what I want to look at is in Http2Session.cpp which is C++ which I know fairly well.

Flags: needinfo?(wmrieker)
Summary: ./mach bootstrap failure as on https://davidwalsh.name/how-to-build-firefox → Bootstrapping Firefox on CentOS 7 has Rust, Pip issues

I believe that CentOS 7 is being phased out.
I don't quite have the time to fully dig in here, but feel free to let me know if you find out why the bootstrap script is misbehaving.

Priority: -- → P5

ok well I've switched to using ubuntu for this little project and it builds there, so it's fine by me to close this if you want, though I suspect if it doesn't build on CentOS, it probably doesn't build on RedHat or Fedora if that matters.

👍 can confirm that it's at least happy on Fedora.
Glad it's working for you on Ubuntu, marking as wontfix.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: