Closed Bug 1544981 Opened 5 years ago Closed 5 years ago

"mach bootstrap" on macos runs brew tap caskroom/versions, it should use homebrew/cask-versions instead

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

Unspecified
macOS
defect
Not set
normal

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

Attachments

(1 file)

"mach boostrap" fails on macOS (output below).

This is because the bootstrap script taps caskroom/versions, but it should not be because this tap has been renamed to homebrew/cask-versions a long time ago. When the bootstrap taps this old location, I end up with two taps and duplicate entries for java8, which prevents the bootstrap from finishing.

Here is the tap that should be used: https://github.com/Homebrew/homebrew-cask-versions
Here is an old issue about caskroom: https://github.com/Caskroom/caskroom.github.io/pull/68

$ ./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

Looks like you have Homebrew installed. We will install all required packages via Homebrew.


We are now installing all required packages via Homebrew. You will see a lot of
output as packages are built.

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 4 taps (homebrew/cask-versions, homebrew/core, homebrew/cask and caskroom/versions).

...

Error: Cask java8 exists in multiple taps:
  homebrew/cask-versions/java8
  caskroom/versions/java8
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'/usr/local/bin/brew', u'install', u'nasm']' returned non-zero exit status 1

  File "/path/to/gecko/python/mozboot/mozboot/mach_commands.py", line 43, in bootstrap
    bootstrapper.bootstrap()
  File "/path/to/gecko/python/mozboot/mozboot/bootstrap.py", line 429, in bootstrap
    getattr(self.instance, 'install_%s_packages' % application)()
  File "/path/to/gecko/python/mozboot/mozboot/osx.py", line 196, in install_browser_packages
    getattr(self, 'ensure_%s_browser_packages' % self.package_manager)()
  File "/path/to/gecko/python/mozboot/mozboot/osx.py", line 354, in ensure_homebrew_browser_packages
    self._ensure_homebrew_packages(packages)
  File "/path/to/gecko/python/mozboot/mozboot/osx.py", line 315, in _ensure_homebrew_packages
    subprocess.check_call(cmd + ['install', package])
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)

caskroom/versions was replaced with homebrew/cask-versions in 2018.
Tap caskroom/versions instead of the old one.

If you have two taps, remove the old one using:

brew untap caskroom/versions
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/74dc09642c22
Stop tapping caskroom/versions in bootstrap for macOS r=nalexander
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

(In reply to Rob Wu [:robwu] from comment #1)

If you have two taps, remove the old one using:

brew untap caskroom/versions

It seems we need to do this manually - can we handle the homebrew error in this case and point this out instead of having the following unhelpful mach stack trace:

Looks like you have Homebrew installed. We will install all required packages via Homebrew.

Updating Homebrew...

We are now installing all required packages via Homebrew. You will see a lot of
output as packages are built.

Error: Cask adoptopenjdk8 exists in multiple taps:
  homebrew/cask-versions/adoptopenjdk8
  caskroom/versions/adoptopenjdk8
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'/usr/local/bin/brew', u'cask', u'install', u'adoptopenjdk8']' returned non-zero exit status 1

  File "/path/to/mozilla-unified/python/mozboot/mozboot/mach_commands.py", line 44, in bootstrap
    bootstrapper.bootstrap()
  File "/path/to/mozilla-unified/python/mozboot/mozboot/bootstrap.py", line 435, in bootstrap
    getattr(self.instance, 'install_%s_packages' % application)()
  File "/path/to/mozilla-unified/python/mozboot/mozboot/osx.py", line 197, in install_mobile_android_packages
    getattr(self, 'ensure_%s_mobile_android_packages' % self.package_manager)()
  File "/path/to/mozilla-unified/python/mozboot/mozboot/osx.py", line 366, in ensure_homebrew_mobile_android_packages
    self._ensure_homebrew_casks(casks)
  File "/path/to/mozilla-unified/python/mozboot/mozboot/osx.py", line 324, in _ensure_homebrew_casks
    return self._ensure_homebrew_packages(casks, extra_brew_args=['cask'])
  File "/path/to/mozilla-unified/python/mozboot/mozboot/osx.py", line 312, in _ensure_homebrew_packages
    subprocess.check_call(cmd + ['install', package])
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)

I was halfway through filing a duplicate and claiming this wasn't fixed properly...

Flags: needinfo?(rob)

I'm going to automatically untap. Don't really see a reason to keep both around.

I'll attach the patch to bug 1556413 (the most recent duplicate of this bug).

Flags: needinfo?(rob)
See Also: → 1556413
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: