mach bootstrap on M1 fails with "killed: 9"
Categories
(Firefox Build System :: Bootstrap Configuration, defect)
Tracking
(firefox89 fixed)
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: lth, Assigned: glandium)
Details
Attachments
(2 files)
I followed these instructions: https://docs.google.com/document/d/1N5yfEVEISofMmjAxfj3xXONGwyQYBSilsfXqux_M6TM/edit?usp=sharing. Since I had followed older instructions, I uninstalled rust as explained. I then tried to bootstrap in my (updated, but not clean) tree. Mach quits with "Killed: 9".
Reporter | ||
Comment 1•4 years ago
|
||
Reinstalling rust does not fix the problem, FWIW.
Comment 2•4 years ago
|
||
A few questions for you:
- Can you post the log? Perhaps there's information that will help determine the failure cause in the log.
- Can you reproduce the failure on a clean
central
? - What's in your
mozconfig
?
Seems that there needs to be a os check for M1 Macs built into one of the scripts that mach bootstrap calls.
I am continuing to search for it, but have yet to find it.
I fixed this issue by individually running the following commands:
'brew install terminal-notifier'
'brew install watchman'
'brew install gnu-tar'
After that, './mach bootstrap' works perfectly.
Reporter | ||
Comment 7•4 years ago
|
||
Thanks! I did the same, but with an interesting wrinkle: I already had watchman installed, and in order to get bootstrap to work I had to 'brew reinstall watchman', ie, something was not right about that package.
Comment 8•4 years ago
|
||
Glandium, you're more familiar with M1 Macs than me - do you have a better idea of what's going on here?
Assignee | ||
Comment 9•4 years ago
|
||
Your python is x86-64, not arm64. If it were arm64, it wouldn't try to install stuff from homebrew at all. We should detect this situation, since, other than causing these sorts of problems, it has a huge impact on build times.
Reporter | ||
Comment 10•4 years ago
|
||
Weird, since all the pythons seem to have an arm64 personality:
$ file /usr/bin/python
/usr/bin/python: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/python (for architecture arm64e): Mach-O 64-bit executable arm64e
$ file /usr/bin/python2
/usr/bin/python2: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/python2 (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/python2 (for architecture arm64e): Mach-O 64-bit executable arm64e
$ file /opt/homebrew/bin/python3
/opt/homebrew/bin/python3: Mach-O 64-bit executable arm64
Assignee | ||
Comment 11•4 years ago
|
||
Does which python3
point to one of those?
Reporter | ||
Comment 12•4 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #11)
Does
which python3
point to one of those?
Yes, it does:
$ which python3
/opt/homebrew/bin/python3
$ ls -l /opt/homebrew/bin/python3
lrwxr-xr-x 1 lhansen admin 38 Apr 12 08:54 /opt/homebrew/bin/python3 -> ../Cellar/python@3.9/3.9.4/bin/python3
$ file /opt/homebrew/bin/python3
/opt/homebrew/bin/python3: Mach-O 64-bit executable arm64
Assignee | ||
Comment 13•4 years ago
|
||
Then I guess your tree is old?
Reporter | ||
Comment 14•4 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #13)
Then I guess your tree is old?
It shouldn't be, because I updated on Friday last week in order to do some testing. It was old before that, I had probably not updated in several weeks (not primary dev system). I noticed the build instructions had changed, so ...
Assignee | ||
Comment 15•4 years ago
|
||
What does python3 -c "import platform; print(platform.machine())"
say?
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 16•4 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #15)
What does
python3 -c "import platform; print(platform.machine())"
say?
$ python3 -c "import platform; print(platform.machine())"
arm64
Assignee | ||
Comment 17•4 years ago
|
||
As per discussion on Matrix yesterday, it's not clear what was wrong but it works now, and it must have been a stale x86-64 python. I'll make bootstrap fail if it's run with an emulated python.
Assignee | ||
Comment 18•4 years ago
|
||
Updated•4 years ago
|
Comment 19•4 years ago
|
||
Comment 20•4 years ago
|
||
Comment 21•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fb11e35d4f73
https://hg.mozilla.org/mozilla-central/rev/ffc825cc89d2
Description
•