I am trying to build AOSP from source for the Nexus 6P and encountering the following error. This issue started happening with branch android-8.0.0_r17 (OPR5.170623.007) and has continued in branch android-8.0.0_r31 (OPR5.170623.011). Branches prior to *_r17 did not have this issue for me.
[ 85% 69912/81560] Building with...rmediates/with-local/classes.de
ninja: build stopped: subcommand failed.
01:31:54 ninja failed with: exit status 1
make: *** [build/core/main.mk:21: run_soong_ui] Error 1
#### make failed to build some targets (42:12 (mm:ss)) ####
Similar questions have been asked before, but the suggestion to increase the Java heap size(here also) did not work for me. Nor did syncing the repo again, syncing repo with a single tread, or building with a single thread (in suspicion of running out of memory). prebuilt/misc/linux-x86/bison/bison does exist (as suggested here and here). The question has also been unanswered on XDA Developers for branch *_12.
My base system is Arch Linux (4.13.11-1-hardened), virtualenv in place (to use Python2 as python), and JAVA_HOME = /usr/lib/jvm/java-8-openjdk. I'm out of ideas and would really like to continue developing my Android projects. Any suggestions?