Cannot run mach bootstrap on esr-68
Categories
(Firefox Build System :: Bootstrap Configuration, defect)
Tracking
(Not tracked)
People
(Reporter: ehsan.akhgari, Unassigned)
References
(Blocks 1 open bug)
Details
$ ./mach bootstrap
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
Executing as root: sudo apt-get install autoconf2.13 build-essential nodejs python-dev python-pip python-setuptools unzip uuid zip
Reading package lists... Done
Building dependency tree
Reading state information... Done
zip is already the newest version (3.0-11build1).
autoconf2.13 is already the newest version (2.13-68).
python-pip is already the newest version (18.1-5).
uuid is already the newest version (1.6.2-1.5build5).
build-essential is already the newest version (12.8ubuntu1).
nodejs is already the newest version (10.15.2~dfsg-2ubuntu1).
python-dev is already the newest version (2.7.17-1).
python-setuptools is already the newest version (41.1.0-1).
unzip is already the newest version (6.0-25ubuntu1).
The following packages were automatically installed and are no longer required:
libmng2 libqt4-dbus libqt4-declarative libqt4-network libqt4-script libqt4-xml libqt4-xmlpatterns libqtdbus4 libqtgui4 qdbus
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Executing as root: sudo apt-get install libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdbus-glib-1-dev libgconf2-dev libgtk-3-dev libgtk2.0-dev libpulse-dev libx11-xcb-dev libxt-dev python-dbus xvfb yasm
Reading package lists... Done
Building dependency tree
Reading state information... Done
libdbus-glib-1-dev is already the newest version (0.110-4).
libxt-dev is already the newest version (1:1.1.5-1).
yasm is already the newest version (1.3.0-2build1).
libasound2-dev is already the newest version (1.1.9-0ubuntu1).
libcurl4-openssl-dev is already the newest version (7.65.3-1ubuntu3).
libdbus-1-dev is already the newest version (1.12.14-1ubuntu2).
libgconf2-dev is already the newest version (3.2.6-5ubuntu3).
libgtk-3-dev is already the newest version (3.24.12-1ubuntu1).
libgtk2.0-dev is already the newest version (2.24.32-4ubuntu1).
libpulse-dev is already the newest version (1:13.0-1ubuntu1).
libx11-xcb-dev is already the newest version (2:1.6.8-1).
python-dbus is already the newest version (1.2.12-1).
xvfb is already the newest version (2:1.20.5+git20191008-0ubuntu1).
The following packages were automatically installed and are no longer required:
libmng2 libqt4-dbus libqt4-declarative libqt4-network libqt4-script libqt4-xml libqt4-xmlpatterns libqtdbus4 libqtgui4 qdbus
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Your version of Mercurial (4.9.1) is sufficiently modern.
Your version of Python (2.7.17rc1) is new enough.
Your version of Rust (1.37.0) is new enough.
Rust supports x86_64-unknown-linux-gnu targets.
Mozilla recommends using git-cinnabar to work with mozilla-central.
Would you like to run a few configuration steps to ensure Git is
optimally configured? (Yn):
================================================================================
Ensuring https://github.com/glandium/git-cinnabar.git is up to date at /home/ehsan/.mozbuild/git-cinnabar
Already up to date.
Your branch is up to date with 'origin/master'.
================================================================================
Downloading from https://community-tc.services.mozilla.com/api/index/v1/task/project.git-cinnabar.helper.8b9dcc227541e12ecff8713df5cbe2bc6c516432.linux.x86_64/artifacts/public/git-cinnabar-helper...
100%
To add git-cinnabar to the PATH, edit your shell initialization script, which
may be called ~/.bashrc or ~/.bash_profile or ~/.profile, and add the following
lines:
export PATH="/home/ehsan/.mozbuild/git-cinnabar:$PATH"
Then restart your shell.
Error running mach:
['artifact', 'toolchain', '--from-build', 'linux64-node']
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:
ImportError: cannot import name import_sibling_modules
File "/home/ehsan/moz/1527287/python/mozbuild/mozbuild/mach_commands.py", line 1493, in artifact_toolchain
from taskgraph.optimize import IndexSearch
File "/home/ehsan/moz/1527287/build/mach_bootstrap.py", line 393, in __call__
module = self._original_import(name, globals, locals, fromlist, level)
File "/home/ehsan/moz/1527287/taskcluster/taskgraph/optimize/__init__.py", line 24, in <module>
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 '['/usr/bin/python2.7', u'/home/ehsan/moz/1527287/mach', u'artifact', u'toolchain', u'--from-build', u'linux64-node']' returned non-zero exit status 1
File "/home/ehsan/moz/1527287/python/mozboot/mozboot/mach_commands.py", line 43, in bootstrap
bootstrapper.bootstrap()
File "/home/ehsan/moz/1527287/python/mozboot/mozboot/bootstrap.py", line 497, in bootstrap
checkout_root)
File "/home/ehsan/moz/1527287/python/mozboot/mozboot/bootstrap.py", line 371, in maybe_install_private_packages_or_exit
self.instance.ensure_node_packages(state_dir, checkout_root)
File "/home/ehsan/moz/1527287/python/mozboot/mozboot/linux_common.py", line 69, in ensure_node_packages
self.install_toolchain_artifact(state_dir, checkout_root, node.LINUX)
File "/home/ehsan/moz/1527287/python/mozboot/mozboot/base.py", line 317, in install_toolchain_artifact
subprocess.check_call(cmd, cwd=state_dir)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
Maybe this is a duplicate of the other bug, but FWIW https://bugzilla.mozilla.org/show_bug.cgi?id=1597858#c1 does not help.
Reporter | ||
Comment 3•5 years ago
|
||
Manually deleting taskcluster/taskgraph/optimize/__init__.pyc
seems to have fixed this, see bug 1597858 comment 6.
Comment 4•5 years ago
|
||
(In reply to :ehsan akhgari from comment #3)
Manually deleting
taskcluster/taskgraph/optimize/__init__.pyc
seems to have fixed this, see bug 1597858 comment 6.
Thank you for documenting this here! I just had to do the exact same thing. Unfortunately I was still left with rust/cargo errors after that, the solution for which seemed to be to tell rustup to use 1.34.0. Maybe mach told me to do this and I missed it because it was too subtle?
In any event, for the next person to stumble on this bug, you also (may) need to downgrade your rust version if you're getting cargo/rust errors. https://github.com/rust-lang/rustup#directory-overrides tells how to do a directory override. So it seems like to get ESR to build in a dir:
# get old rust
rustup install 1.34.0
# use old rust in this directory, assuming you're already in your source dir (and your objdir lives under your source dir?)
rustup override set 1.34.0
And when you're done building ESR in that directory and are moving back to the safety of nightly:
rustup override unset
Comment 5•4 years ago
|
||
Closing as esr68 is EOL
Comment 6•4 years ago
|
||
FTR, this bug should have been closed as WONTFIX. mach bootstrap
is never guaranteed to work on anything besides recent mozilla-central
s.
Comment 7•4 years ago
|
||
(In reply to Ricky Stewart from comment #6)
FTR, this bug should have been closed as WONTFIX.
mach bootstrap
is never guaranteed to work on anything besides recentmozilla-central
s.
What are developers supposed to do when they're trying to uplift a patch to a supported ESR branch and can't build the ESR locally, though?
Comment 8•4 years ago
|
||
(In reply to Andrew Sutherland [:asuth] (he/him) from comment #7)
(In reply to Ricky Stewart from comment #6)
FTR, this bug should have been closed as WONTFIX.
mach bootstrap
is never guaranteed to work on anything besides recentmozilla-central
s.What are developers supposed to do when they're trying to uplift a patch to a supported ESR branch and can't build the ESR locally, though?
Not run mach bootstrap
-- if it doesn't fail, that's by pure chance.
Developers can mach bootstrap
at mozilla-central
, which should get them reasonably close, modulo some toolchain bits (for example, maybe the ESR will require an older rustc
than we bootstrap
). Those remaining toolchain bits need to be configured manually. We don't have an automatic solution.
Comment 9•4 years ago
|
||
Should "mach bootstrap" check browser/config/version_display.txt
then and refuse to run in that case for ESR with a specific warning and a link to some in-tree docs or a chat.mozilla.org channel to ask for help in? It appears that file is what helps one distinguish between ESR and non-ESR:
Comment 10•4 years ago
|
||
Since bug 1630317 we explicitly warn for arbitrary old commits.
Comment 11•4 years ago
|
||
(In reply to Ricky Stewart from comment #10)
Since bug 1630317 we explicitly warn for arbitrary old commits.
Nice! Thanks for the reference and for the dual git/hg support and making sure that got into ESR78!
Description
•