Problem
I need to compile firefox on Windows. I downloaded the source tarball (as I did not want the entire commit history for building, I just wanted the head commit) and the Mozillabuild environment. Mozilla also recommends downloading a compressed tarball if an user wants to build a specific release. However, the tool used for dependencies for Firefox, mach bootstrap doesn't work on tarballs, it spits out
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 Python 3 (3.7.4) is new enough.
Your version of Python 2 (2.7.16) is new enough.
Error running mach:
['bootstrap']
This is a user error and does not appear to be a bug in mach.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
mach.util.UserError: Could not identify the root directory of your checkout! Are you running `mach bootstrap` in an hg or git clone?
File "c:\mozilla-source\python/mozboot/mozboot/mach_commands.py", line 58, in bootstrap
bootstrapper.bootstrap()
File "c:\mozilla-source\python/mozboot\mozboot\bootstrap.py", line 403, in bootstrap
env=self.instance._hg_cleanenv(load_hgrc=True), hg=which("hg")
File "c:\mozilla-source\python/mozboot\mozboot\bootstrap.py", line 644, in current_firefox_checkout
"Could not identify the root directory of your checkout! "
What I've Tried
After reading the docs a bit more, I tried doing an artifact build and it spits out the same error.
How to reproduce
- Windows 7 x64 on x86_64(Intel 64)
- Download and Install MozillaBuild 3.3
- Start %HOMEDRIVE%\mozilla-build\start-shell.bat
- Download Firefox xzipped tar from mozilla's ftp interface
- Run
xz -dk firefox-84.0.source.tar.xzandtar -xvf firefox-84.0.source.tar - CD onto extracted directory and run
./mach bootstrapand respond with 2 to the interactive question.