Java error building AOSP 10

286 views
Skip to first unread message

Brian Moore

unread,
Nov 23, 2019, 9:15:36 PM11/23/19
to Android Building

I've been building AOSP for my pixel devices for a few versions now, but I'm running into an issue in the release of Android 10.

I'm working with 10.0.0 r10, building for Pixel 3 (blueline).
I have the Google and QCom vendor binaries in the vendor/ tree, just as I've always done.
I do a normal build process as shown in the attached file, and it always fails at the same point.

I broke down the cluster of commands that it was failing on, and found it was this specific statement throwing the error:

java -jar out/host/linux-x86/framework/RecoveryImageGenerator.jar --image_width $((1080 - 10)) --text_name recovery_installing --font_dir out/target/product/blueline/obj/PACKAGING/recovery_font_files_intermediates --resource_dir bootable/recovery/tools/recovery_l10n/res/ --output_file out/target/product/blueline/obj/PACKAGING/recovery_text_res_intermediates//installing_text.png --center_alignment

I found that if I ran this part of the build with Java 8 instead of Java 9 (by modifying my default PATH), it worked. 
But using Java 8 for the entire build causes other errors, and from what I have read, Android 10 is supposed to be built with Java 9 only.

The only thing that I'm doing differently than with builds of previous versions of Android is that I am building without the vendor/opengapps tree, because OpenGapps hasn't created a repository for Android 10.  However, I'm pretty sure that Google apps are not required just for a stock AOSP build.

Any idea what the problem could be?  I'm thinking I must have some configuration wrong on my end, because I'm basically building the unmodified source directly from Google.
aosp_10_error.txt

Dan Willemsen

unread,
Nov 23, 2019, 10:17:10 PM11/23/19
to Android Building
That's strange, I've got no idea why you're hitting it, but that we haven't seen it anywhere else.

I've filed https://issuetracker.google.com/145064117 with my findings so far.

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/e5f6f455-2fb9-4d26-bb8e-a0fecece260f%40googlegroups.com.

Daniel Fullmer

unread,
Nov 23, 2019, 10:41:40 PM11/23/19
to Android Building
I believe I've encountered this error in the past. I was able to work around this by installing freetype / fontconfig (can't recall if one or both are necessary).

Dan Willemsen

unread,
Nov 23, 2019, 10:58:48 PM11/23/19
to Android Building
Yep, I've reproduced this on minimal installs of both ArchLinux and Ubuntu. `apt install fontconfig` fixes it on Ubuntu. On Arch, I had to install fontconfig and a font (I tried ttf-droid) before it started working.

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.

Brian Moore

unread,
Nov 24, 2019, 4:51:35 PM11/24/19
to Android Building

Thanks Dan & Daniel.  I am building on Arch Linux.  I checked and saw that I already had fontconfig installed.  I installed ttf-droid, and it looks like the build process has made it past the error point.
Not finished yet, but I think you've probably solved the mystery.

John W. Blue

unread,
Nov 29, 2019, 8:48:09 AM11/29/19
to android-...@googlegroups.com

> Android 10 is supposed to be built with Java 9 only.

 

Are you sure?  I had the impression that if you were building master then, yes, Java 9.  Others are indicating that Java 8 is the way to go:

 

https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-android-android-10-0-0

 

It would be nice to have some definitive direction on the topic.

 

I was able to complete an AOSP 10 build using Java 8 on Ubuntu 16.04.  It dumped about three times and one of those was a Java error that I did not record.  Since I like to use ccache (and did not run make clobber) each time it hung I restarted make and eventually it was able to get it built.  On the other hand, building AOSP 9 PQ3A.190801 for Pixel XL sails without any problems on the same workstation.

 

The only issue that I am having with my build of AOSP 10 is that it has intent complaints about com.android.messaging during texting.  I have not spent any time figuring that one out since it feels like it might be a build glitch due to the aforementioned errors.

 

John

--

--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.

Dan Willemsen

unread,
Dec 2, 2019, 3:54:15 PM12/2/19
to Android Building
On Fri, Nov 29, 2019 at 5:47 AM John W. Blue <john...@rrcic.com> wrote:

> Android 10 is supposed to be built with Java 9 only.

 

Are you sure?  I had the impression that if you were building master then, yes, Java 9.  Others are indicating that Java 8 is the way to go:

 

https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-android-android-10-0-0

 

It would be nice to have some definitive direction on the topic. 


Android 9 and 10 both include their own Java JDKs, so it does not matter what's installed on your machine. Many instructions on that page are outdated and unnecessary. source.android.com should have slightly better instructions for the vanilla AOSP build (but it's far from perfect as well -- we tend to keep instructions there longer than necessary, as users are often building things far older than we normally look at).
 

I was able to complete an AOSP 10 build using Java 8 on Ubuntu 16.04.  It dumped about three times and one of those was a Java error that I did not record.


What does your machine look like? CPU/RAM/Disk
 

Since I like to use ccache (and did not run make clobber) each time it hung I restarted make and eventually it was able to get it built.  On the other hand, building AOSP 9 PQ3A.190801 for Pixel XL sails without any problems on the same workstation.


We no longer distribute ccache, as incremental builds are far more reliable these days. You should really never need to run `make clobber` unless you want to clean up disk space (in which case just removing the out/ directory is the same as clean/clobber). There are still cases where you should run `m installclean`, but that should only require a few minutes to re-copy things, nothing like a full build.

- Dan
 
Reply all
Reply to author
Forward
0 new messages