Closed Bug 1626098 Opened 5 years ago Closed 5 years ago

mach bootstrap fails on Ubuntu 20.04

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

Desktop
Linux
defect
Not set
critical

Tracking

(firefox77 fixed)

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: BenB, Assigned: Sylvestre)

References

Details

Attachments

(1 file)

Environment:

  • Ubuntu 20.04

Reproduction:

  • Check out source code
  • Run ./mach bootstrap

Actual result:

  • Executing as root: sudo apt-get install autoconf2.13 build-essential nodejs python-pip python-setuptools unzip uuid zip python2.7 python2.7-dev

  • E: Package »python-pip« has no installation candidate

  • This is because python 2 is deprecated and python 3 is the standard now, but the Debian maintainers, in their unending wisdom, have not put python 3 in the "python-foo" package, but created python3-foo and python2.7-foo packages, and the python-foo packages are deprecated. This of course breaks all install scripts that reference python packages. However, python2.7-pip does not exist, only python3-pip. Python 2 is really deprecated.

Expected result:

  • python3-pip and python3-setuptools is installed

Workaround:

  • sudo apt install python3-pip python3-setuptools python3-dev
  • ./mach bootstrap --no-system-changes

Importance:

  • Prevents everybody on Ubuntu 20.04 (which will be released in a few weeks) from building Firefox, unless they find the workaround above.
Severity: normal → critical
Component: General → Bootstrap Configuration

Should be easy to fix

Assignee: nobody → sledru

Compare also bug 1626103.

Hi Sylvestre, thanks for the quick patch!

(Sorry for commenting on the patch here, but Phab refuses my login, due to lack of multi-factor auth.)

I tried the patch and it does not work. You need to change python-pip to python3-pip. With this change, it works.

However, I see in the same file further down that there is already python3-pip mentioned, if Python3 is installed.

Attachment #9136939 - Attachment description: Bug 1626098 - mach bootstrap - Only install python-pip on Ubuntu < 20.04 r=#firefox-build-system-reviewers → Bug 1626098 - mach bootstrap - Only install python-pip on Ubuntu < 20.04 and Debian != "bulleyes" r=#firefox-build-system-reviewers
Attachment #9136939 - Attachment description: Bug 1626098 - mach bootstrap - Only install python-pip on Ubuntu < 20.04 and Debian != "bulleyes" r=#firefox-build-system-reviewers → Bug 1626098 - mach bootstrap - Only install python-pip on Ubuntu < 20.04 and Debian != "bullseye" r=#firefox-build-system-reviewers
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e374a51c77ba mach bootstrap - Only install python-pip on Ubuntu < 20.04 and Debian != "bullseye" r=firefox-build-system-reviewers,rstewart
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77

Thank you!

This doesn't work on unstable/sid. (also fails if lsb-release is not installed)

Flags: needinfo?(sledru)

(In reply to Mike Hommey [:glandium] from comment #10)

This doesn't work on unstable/sid. (also fails if lsb-release is not installed)

Same problem for me.

So, the issue is that I am not sure to detect if a package is available.
Glandium suggested that we could do an apt-cache show <package>
but the issue is that if there is any pinning (ex: a debian testing with stable as an available repo) done on the distro, it will fail.

Flags: needinfo?(sledru)

How about apt-cache policy?

Flags: needinfo?(sledru)

For a particular version/setup of Debian GNU/Linux, I found a manual workaround. YMMV.
https://bugzilla.mozilla.org/show_bug.cgi?id=1630345#c5

I think it has been fixed now

Flags: needinfo?(sledru)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: