The Mesa Graphics Library Developers Are Considering Dropping Android AOSP Support
The developers of the Mesa graphics library, mainly used to provide OpenGL and Vulkan API support on Linux desktop systems, are debating if they should drop Mesa's support for the Android Open Source Project (AOSP) operating system. It would still be possible to build Mesa using the Android NDK toolchain.
The Mesa graphics library is not only used by desktop and laptop computers running GNU/Linux distributions, it is also used to provide OpenGL ES graphics capabilities on a wide range of smartphones, tablets and other hardware running the Android operating system.
The Mesa graphics library can currently be built for the Android in two different ways:
- It can be built into the Android OS using an older
- It can be built out-of-tree using the meson build system and the Android Native Development Kit (NDK)
Both methods are currently documented at docs.mesa3d.org/android.html.
Several prominent Mesa developers are currently discussing if they should rid Mesa of all support for the
Android.mk build system. Intel-employed Mesa developer Jason Ekstrand has opened a Mesa issue proposing a total eradication of the
Android.mk build system.
Android.mk is currently used by the Android Open Source Project (AOSP) so the change would affect community-maintained Android builds as well as the Android-x86 project.
There are, apparently, several issues with maintaining
"Android's arrogancy is frustrating"
Intel's Jason Ekstrand explained his reasoning for dropping Android.mk build support in a reply to an objection against doing so in the Mesa issue he opened this way:
"The Android.mk build system is 12K LOC of hand-rolled build system that only a couple of developers in the Mesa community understand or even know how to use/test. Maintaining it is a serious burden. It's not too bad when you just add a file. But every time someone adds or changes a code generator (this happens more often than you'd think), they either forget about Android.mk or they code it blind and then spend 2 weeks going back-and-forth with one of the two people who know how to test Android.mk trying to make it work."
Some in Mesa leadership positions believe that it is inevitable that
Android.mk support will eventually be removed from Mesa.
"I think that will happen when Google drops support for it, they don't seem interested in working with the communities for Android builds."
Others in the Mesa developer community believe that those using the
Android.mk build system should be discouraged from doing so.
"ChromeOS is already using meson. It's just AOSP and Android x86 that need Android.mk.
I wonder if we can wean them off somehow?"
Building Mesa using
Android.mk is, at best, difficult with the current code.
"The one time I tried to build mesa for AOSP I had to do additional work anyway. I had to hardcode some stuff. Considering how limited is Android.mk, i can't see any sane way to maintain it. At this point, it might make more sense to look at how to build mesa using ndk's toolchain using usual mesa build system, and integrate the resulting into AOSP. (that's what several OEMs actually migrated to)"
One alternative to completely removing the
Android.mk build system would be to make it a wrapper for meson. That would be more maintainable in the long run.
"No one is arguing that maintaining Android.mk is sane. :)
IMO, a tiny Android.mk that invokes meson is the way to go."
It is not certain that Mesa will drop support for the
Android.mk build system, but it does seem very likely.
"The issue has been filed and the MR made. We'll see how many android people crawl out of the woodwork and how much work they're willing to donate to keep their beloved build system alive.
Like most things in Mesa, I don't mind having it in the tree if I never have to touch it.
Unfortunately, people like to complain when it breaks without submitting patches."
Other Mesa developers appear to have completely different priorities when it comes to things they'd like to remove from the Mesa git tree:
"I still have deleting the tegra one [in drivers/video/] on my todo list"
We can only guess what those developing and maintaining community Android ROMs for older Android devices will do if/when Mesa drops support for Android AOSP. Android-x86, a special Android distribution for regular computers, will also have to find some alternative solution. It is not certain that Mesa will drop
Android.mk and Android AOSP support, but it does seem to be both likely and inevitable.