Closed Bug 1370119 Opened 3 years ago Closed 2 years ago

Upgrade android build-tools to 25.0.3

Categories

(Firefox Build System :: Android Studio and Gradle Integration, enhancement)

enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: m_kato, Assigned: nalexander)

References

(Blocks 2 open bugs)

Details

Actually, we cannot build Fennec on Windows (bug 1169873 etc).

Even if using WSL (Windows Subsystem for Linux), it cannot build it.  Because our build-tools support is 23.0.0 and 23.0.3 that is 32-bit binary and 32-bit binary doesn't support on WSL (see https://github.com/Microsoft/BashOnWindows/issues/711 etc).

If using 24.0+, it will be 64-bit binary, so I hope that we support 24.0+ build-tools.
See also Bug 1259098 and Bug 1352015, which I think depend on build-tools 24.0+.
Summary: Allow build-tools 24.0+ to support build on WSL → Upgrade android build-tools to 24.0+ to support build on WSL
25.0.3 is the latest.  This will help us build on WSL, but also is required for lots of new things including targeting Android SDK 24 and 25, I believe.

Sadly, it depends on:
- Java 1.8 (1376306), which seems easy to update;
- glib 2.14, which seems like deep rocket-science to update.

The issue is that CentOS 6, which as of two years ago we committed to supporting as a build environment (https://bugzilla.mozilla.org/show_bug.cgi?id=1189892#c0) functionally can't use glibc 2.14, AFAICT.

glandium: dustin: where was this decision codified?  Is there anything to be done here?  We're going to need to use newer Android SDKs very soon, so perhaps we can loosen the requirements for Android to build only on CentOS 7 or similar?
Flags: needinfo?(mh+mozilla)
Flags: needinfo?(dustin)
Summary: Upgrade android build-tools to 24.0+ to support build on WSL → Upgrade android build-tools to 25.0.3
(In reply to Nick Alexander :nalexander from comment #2)
> 25.0.3 is the latest.  This will help us build on WSL, but also is required
> for lots of new things including targeting Android SDK 24 and 25, I believe.
> 
> Sadly, it depends on:
> - Java 1.8 (1376306), which seems easy to update;

That was supposed to be Bug 1376306.
My understanding is that the version of glibc on the system sets a "floor" for the versions of Linux we support, and ~2yr ago when we set this up, that was still CentOS 6.  Maybe that can change now, dunno.

*However*, there's no need to run Android builds on the same Docker image as Linux builds.  They could run in a CentOS-7 image, or Ubuntu Server, or Alpine, or whatever you want.  That will require some copy-pasta from the existing desktop build images, but I don't think anything there is too magic.
Flags: needinfo?(dustin)
That can change, but the floor is still lower than glibc 2.14, unfortunately.

FWIW, I'd advocate new build docker images to be based on Debian rather than RH/Centos, which would allow to use snapshot.debian.org, and have cheap reproducibility.
Flags: needinfo?(mh+mozilla)
(In reply to Mike Hommey [:glandium] from comment #5)
> That can change, but the floor is still lower than glibc 2.14, unfortunately.

For Android builds?  I don't see a reason for Mozilla _infrastructure_ to need to support glibc <2.14, but perhaps there's another Mozilla stakeholder I'm not aware of.  Where does this floor come from?

> FWIW, I'd advocate new build docker images to be based on Debian rather than
> RH/Centos, which would allow to use snapshot.debian.org, and have cheap
> reproducibility.

I have no strong opinion, and will try to use Debian.  It was pretty easy to get CentOS 7 working, so I won't try too hard for Debian.
Flags: needinfo?(mh+mozilla)
For Android builds, no. But as long as the android builds use the same docker image as the linux builds, you can't get away with the floor for the linux builds.
Flags: needinfo?(mh+mozilla)
(In reply to Mike Hommey [:glandium] from comment #7)
> For Android builds, no. But as long as the android builds use the same
> docker image as the linux builds, you can't get away with the floor for the
> linux builds.

Roger that.  My intention is to add centos7-build{-upd} images, sibling to the existing centos6-build{-upd}, and use those for Android.  Desktop can use them at some point if the floor is raised.
Duplicate of this bug: 1319798
I have been working on this, and have the android-dependencies task working in a Debian image with build-tools 25.0.3 as of https://treeherder.mozilla.org/#/jobs?repo=try&revision=da1ac07b79b65411858197341e9136fb1fd1741f&selectedJob=125250187.

The next thing will be to get gps's patches landed from Bug 1391476 and to get the Android builds themselves working in the Debian image.  I don't know how hard that will be.
Depends on: 1391476
Depends on: 1396098
This landed as part of Bug 1366644.
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox Build System
You need to log in before you can comment on or make changes to this bug.