Closed Bug 1752879 Opened 3 years ago Closed 3 years ago

Bootstrap on macOS unexpectedly requires `/usr/local/Homebrew/bin` in PATH, failing build

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

defect

Tracking

(firefox-esr91 unaffected, firefox96 unaffected, firefox97 unaffected, firefox98 fixed, firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox96 --- unaffected
firefox97 --- unaffected
firefox98 --- fixed
firefox99 --- fixed

People

(Reporter: mcomella, Assigned: ahochheiden)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When I run mach bootstrap (GeckoView full build), I get the following error:

Your environment's PATH variable lists a system path directory (/usr/bin)
before the path to your package manager's binaries (/usr/local/Homebrew/bin).
This means that the package manager's binaries likely won't be
detected properly.

Modify your shell's configuration (e.g. ~/.profile or
~/.bash_profile) to have /usr/local/Homebrew/bin appear in $PATH before /usr/bin. e.g.

    export PATH=/usr/local/Homebrew/bin:$PATH

Once this is done, start a new shell (likely Command+T) and run
this bootstrap again.

However, /usr/local/Homebrew/bin just contains the brew binary and none of the packages. I think we want to compare against /usr/local/bin/, which is where Homebrew installs all the packages (on Intel macs). I think the change in behavior is from this change in bug 1744884 on the 21st (set as blocking this bug since it's a regression).

On element...

  • Shusta mentioned M1 macs install to /opt/homebrew/bin so we should use brew --prefix to identify the path rather than hardcoding it.
  • glandium mentioned we don't rely on brew much anymore so they'd remove the check entirely

A workaround is to comment out the check, specifically these lines.

No longer blocks: 1744884
Regressed by: 1744884

Set release status flags based on info from the regressing bug 1744884

Has Regression Range: --- → yes
Assignee: nobody → ahochheiden
Pushed by ahochheiden@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e5d0988077bb Remove unnecessary check for Homebrew PATH ordering r=firefox-build-system-reviewers,glandium
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: