Closed Bug 675572 Opened 13 years ago Closed 13 years ago

Build a NDK r7b including a fresh toolchain (gcc 4.6, binutils 2.22 with gold)

Categories

(Release Engineering :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Assigned: jhford)

References

Details

(Whiteboard: [android][toolchain])

Attachments

(7 files, 10 obsolete files)

(deleted), patch
Details | Diff | Splinter Review
(deleted), patch
Details | Diff | Splinter Review
(deleted), text/plain
Details
(deleted), patch
Details | Diff | Splinter Review
(deleted), patch
jhford
: review+
jhford
: checked-in+
Details | Diff | Splinter Review
(deleted), patch
rail
: review+
Details | Diff | Splinter Review
(deleted), patch
mozilla
: review+
Details | Diff | Splinter Review
No description provided.
Attached file RPM spec file (obsolete) (deleted) —
This spec file allows to build a NDK r6 with gcc 4.6.1, binutils 2.21.53 with gold as default. It should also be future-proof for new versions of gcc, binutils, mpfr, mpc, and gmp. It should also build an x64 toolchain if built for x64 buildbots, though I haven't tested that part (but I did test building the x64 toolchain). Note the %files sections is a bit nasty, setting everything as 755. I'll also attach the three files (one source and two patches) that are not downloadable.
Assignee: nobody → mh+mozilla
Attached file ndk-build-r6.tar.bz2 (obsolete) (deleted) —
This file is actually a tarball of what you get under src/build when running the following command in the NDK tree: ./build/tools/download-toolchain-sources.sh src
Attached patch ndk-build-tools.patch (obsolete) (deleted) — Splinter Review
Patch adding an option for mpc (which is a new requirement for gcc 4.6 that gcc 4.4 didn't have), adds --with-pic to build libstdc++ as PIC, and --enable-gold=default to build gold and enable it by default.
Attached patch ndk-gcc.patch (deleted) — Splinter Review
GCC patch for proper bionic (android libc) support. Bug filed upstream: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49930
Component: General → Release Engineering
Product: Fennec → mozilla.org
QA Contact: general → release
Version: Trunk → other
Assignee: mh+mozilla → bear
Whiteboard: [android][toolchain]
In order to build a package suitable for buildbots, all that should be required is: - get the 4 attachments from this bug - get the sources corresponding to what is in the .spec file: http://dl.google.com/android/ndk/android-ndk-r6-linux-x86.tar.bz2 ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.1/gcc-4.6.1.tar.bz2 ftp://sourceware.org/pub/binutils/snapshots/binutils-2.21.53.tar.bz2 ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2 http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz http://mpfr.loria.fr/mpfr-3.0.1/mpfr-3.0.1.tar.bz2 ftp://sourceware.org/pub/gdb/releases/gdb-6.6.tar.bz2 - put all that in /usr/src/redhat/SOURCES - run rpmbuild -bb android-ndk.spec
I'll take a stab at building an NDK using GCC/GDB sources from Linaro and patches from https://github.com/mkedwards/crosstool-ng .
(In reply to Michael K. Edwards from comment #6) > I'll take a stab at building an NDK using GCC/GDB sources from Linaro and > patches from https://github.com/mkedwards/crosstool-ng . Sorry I missed your IRC poke... Feel free to assign the bug to you and then punt it back to me when you have finished. Just please do document the steps closely so I can duplicate them on the RelEng side. thanks!
Good news on this: We (Linaro) are planning to release an NDK with the Linaro toolchain (and libraries from the Linaro Android build). I can't give any guarantees as to when it's going to happen, or even if it's going to happen (this is just internal planning so far), but the current plans are to make it happen soonish (possibly as early as the 2011.10 release).
Assignee: bear → m.k.edwards
I'll work with bero on this one and ensure that what we and Linaro put together builds working Firefox Mobile and Boot to Gecko images.
Status: NEW → ASSIGNED
Attached file RPM spec file (obsolete) (deleted) —
This freshens the RPM file. I only refreshed software versions to the latest releases, and ndk to r6b. I didn't care about gdb, and mpfr 3.0.1 is kept instead of mpfr 3.1.0 because 3.1.0's libtool is broken, and this breaks the build.
Attachment #549784 - Attachment is obsolete: true
Attached file ndk-build-r6b.tar.bz2 (obsolete) (deleted) —
Attachment #549787 - Attachment is obsolete: true
Attached patch ndk-build-tools.patch (deleted) — Splinter Review
New version of the patch for NDK r7b
Attachment #549789 - Attachment is obsolete: true
Attached file ndk-build-r7b.tar.bz2 (deleted) —
Attachment #602857 - Attachment is obsolete: true
Attached patch gold-thumb-plt-2.22.diff (deleted) — Splinter Review
This is an additional patch, from nfroyd, to improve the situation with thumb->arm stubs for plt calls with gold.
Attached file RPM spec file (obsolete) (deleted) —
This adds the newly attached patch. With this spec file, the instructions as per comment 14, except you need the 5 attachments, instead of 4.
Attachment #604860 - Attachment is obsolete: true
Summary: Build a NDK including a fresh toolchain (gcc 4.6, binutils 2.21.* with gold) → Build a NDK r7b including a fresh toolchain (gcc 4.6, binutils 2.22 with gold)
I'm running the steps in a rpmbuild environment now
(In reply to Mike Hommey [:glandium] from comment #14) > - wget ftp://sourceware.org/pub/gdb/releases/gdb-6.6.tar.bz2 Presumably this is for gdb-on-the-device...but still, why are we using such an old version?
(In reply to Nathan Froyd (:froydnj) from comment #19) > (In reply to Mike Hommey [:glandium] from comment #14) > > - wget ftp://sourceware.org/pub/gdb/releases/gdb-6.6.tar.bz2 > > Presumably this is for gdb-on-the-device...but still, why are we using such > an old version? Because it's for the ndk we're going to use on the build bots. It doesn't matter what version of gdb is provides, it's not going to be used. Also, 6.6 is what comes with the original ndk, and last time I tried to build a ndk with a recent gdb, it failed. Arguably, it was with r5c or r6b, but that doesn't matter much.
Attachment #607243 - Flags: review?(jhford)
Attached file RPM spec file (obsolete) (deleted) —
update version number for gdb source tarball
Attachment #606144 - Attachment is obsolete: true
FYI - the command line I'm running for rpmbuild is rpmbuild -bb --target=i686 ... this is now being test deployed to some of our staging builders to make sure the ndk-r7b install doesn't overwrite the current ndk-r5c install
Attachment #607243 - Flags: review?(jhford) → review+
Attached file RPM spec file (obsolete) (deleted) —
changed name of spec and rpm target file - this allows the ndk to exist along side of the current installed ndk rpm
Attachment #607244 - Attachment is obsolete: true
this ndk is live in our staging puppet - going to let it update to the other linux builders and then check on it later tonight/tomorrow morning
When can this be deployed live?
let me check on why this isn't deployed
Assignee: m.k.edwards → bear
Comment on attachment 607323 [details] RPM spec file committed changeset 53:7680e65337e6
Attachment #607323 - Flags: review+
Attachment #607323 - Flags: checked-in+
Comment on attachment 607243 [details] [diff] [review] change to puppet-manifest to install ndk r7b committed changeset 551:f2332877c84d
Attachment #607243 - Flags: checked-in+
Comment on attachment 607243 [details] [diff] [review] change to puppet-manifest to install ndk r7b backed out because the RPM was built with a conflicting package name which caused puppet's install_rpm to become confused. the rpm needs to be rebuilt with a correct Name: tag.
Attachment #607243 - Flags: checked-in+ → checked-in-
Comment on attachment 607323 [details] RPM spec file >%define ndk_name android-ndk7 <snip> >%define ndk_dir %{ndk_name}-%{ndk_ver} >Name: android-ndk To fix this, the Name: should actually be: Name: %ndk_name >Summary: An interpreted, interactive, object-oriented programming language. >Version: %{ndk_ver} >Release: 0moz1
Attached patch RPM spec file (obsolete) (deleted) — Splinter Review
used % define for Name instead of hardcoded android-ndk
Attachment #607323 - Attachment is obsolete: true
Attachment #612379 - Flags: review?(jhford)
Comment on attachment 612379 [details] [diff] [review] RPM spec file looks good!
Attachment #612379 - Flags: review?(jhford) → review+
Blocks: 745956
I'm going to look at deploying this
Assignee: bear → jhford
I've built the following RPM: [cltbld@mv-moz2-linux-ix-slave01 rpmbuild.jhford]$ rpm -qpi RPMS/i686/android-ndk7-r7b-0moz2.i686.rpm Name : android-ndk7 Relocations: (not relocatable) Version : r7b Vendor: (none) Release : 0moz2 Build Date: Mon 23 Apr 2012 10:30:55 AM PDT Install Date: (not installed) Build Host: mv-moz2-linux-ix-slave01.build.mtv1.mozilla.com Group : Java Source RPM: android-ndk7-r7b-0moz2.src.rpm Size : 269515343 License: ??? Signature : (none) Summary : An interpreted, interactive, object-oriented programming language. Description : android-ndk7 I'm going to test the deployment through puppet now
Attached patch fix the ndk7 rpm, correctly (deleted) — Splinter Review
Fix the specfile to build correctly
Attachment #612379 - Attachment is obsolete: true
Attachment #617534 - Flags: review?(rail)
Attachment #617534 - Flags: review?(rail) → review+
Comment on attachment 607243 [details] [diff] [review] change to puppet-manifest to install ndk r7b re-landed with 0moz2 instead of 0moz1 http://hg.mozilla.org/build/puppet-manifests/rev/c07c2a4ecd6a
Attachment #607243 - Flags: checked-in- → checked-in+
Attached patch remove android-ndk-r4c (deleted) — Splinter Review
This is so that our VMs have some disk space. Our oldest shipping version of Fennec uses r5c explicitly: http://hg.mozilla.org/releases/mozilla-release/file/default/mobile/xul/config/mozconfigs/android/release
Attachment #617708 - Flags: review?(aki)
Comment on attachment 617708 [details] [diff] [review] remove android-ndk-r4c *stamp*
Attachment #617708 - Flags: review?(aki) → review+
r7b is deployed and r4c is removed. The fallout caused by this deployment has been resolved and I am seeing resolution right now.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: