GNOME Bugzilla – Bug 770631
NDK 12 has all ABIs enabled by default
Last modified: 2016-09-04 07:17:40 UTC
We should provide a better way of using this, e.g. by having all ABIs in a single tarball and having our Android.mk automatically point at the correct subdirectories in there according to the ABI. This needs cerbero changes: build all ABIs into one tarball and changes to our example applications (like here https://cgit.freedesktop.org/gstreamer/gst-examples/tree/playback/player/android/app/src/main/jni/Android.mk#n12 )
And this is a problem because now by default our applications fail to build unless the ABIs are correctly specified and everything is set up accordingly. Which is far from trivial unless we change some things.
Created attachment 334650 [details] [review] recipes: Install to the appropriate prefix instead of install dir This makes sure that files are correctly installed in the case of universal builds.
Created attachment 334651 [details] [review] cerbero: Allow alternate arch configs in universal builds This allows us to specify universal_archs as a map of arch -> config file (which can be None). If specified, the config file provides overrides to the default config for that architecture. This is useful on Android, for example, where we want to specify DistroVersion as Lollipop+ for ARM64 and x86-64, but use a lower version for the other arches.
Created attachment 334652 [details] [review] android: Add a universal build This is currently just the arch packages each in its own subdirectory, with some duplication of common files. Enough for us to be able to dist all of this and use it to build apps, though.
Created attachment 334653 [details] [review] Patch for gst-player to use the universal build I am able to build against all ABIs except MIPS with this patch. Only tested on my phone (arm64, I think), though.
Also still making sure that I didn't break non-universal builds.
Review of attachment 334652 [details] [review]: ::: cerbero/packages/__init__.py @@ +71,3 @@ + if self.config.target_arch == Architecture.UNIVERSAL: + # For the universal architecture, collect files from each + # sub-archtecture This probably breaks the iOS universal builds, no? For that it was not needed before, but now this code would also run. Why?
(In reply to Sebastian Dröge (slomo) from comment #7) > Review of attachment 334652 [details] [review] [review]: > > ::: cerbero/packages/__init__.py > @@ +71,3 @@ > + if self.config.target_arch == Architecture.UNIVERSAL: > + # For the universal architecture, collect files from each > + # sub-archtecture > > This probably breaks the iOS universal builds, no? For that it was not > needed before, but now this code would also run. Why? Yikes, that's true. I initially did this in the Android packager and then moved it up because it seemed necessary. The OS X universal packager does a try/catch on the packaging. Not sure if that's why it works already. I'll move this back into the Android packager unless you have a better idea.
I don't :) Change that and merge, thanks!
All merged, and the gst-player example in gst-examples is also updated. 1.9.2 will contain the old and the new binaries now, after 1.9.2 I'll only upload the universal ones (but we need to update the tutorials first then).