[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] .:B:.:
Yeah, derf elot helped me out in the meantime :cool:

Edit: nevermind me, the stuff below turned out not to be a Java VM problem as much as my computer choking on Android Pie with 16 GB RAM and /tmp on tmpfs.

Once I switched /tmp back to regular storage I was able to compile LineageOS 16.0 successfully. Thanks [MENTION=6979267]nailyk[/MENTION]!

I'm bumping into another problem in the meantime, Android seems to choke on having not enough memory but I have a box with plenty of RAM (16 GB) and enough free storage, and neither is being depleted when compilation fails at 99%.

I am using the following as per earlier LineageOS instructions (14.1, works fine with 15.1 as well) to keep Java from eating too much memory, I upped the 4 GB limit to 8 GB but it doesn't seem to make any difference.

export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"

From what I can see in htop the prebuilt x86 Java compiler is using -Xmx2048M either way and I cannot find out how to influence that. That being said, the error points to an x86_64 Java instance (which makes more sense).

[ 99% 111217/112096] Install: /var/media/data/code/lineage/16.0/out/target/product/lilac/system/priv-app/MmsService/MmsService.apk
[ 99% 111218/112096] build /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/LineageSetupWizard_intermediates/classes-combined.jar
[ 99% 111219/112096] Copy: /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/LineageSetupWizard_intermediates/classes.jar
[ 99% 111220/112096] Target Java: /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SettingsProvider_intermediates/classes-full-debug.jar
[ 99% 111221/112096] build /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SettingsProvider_intermediates/classes-combined.jar
[ 99% 111222/112096] Copy: /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SettingsProvider_intermediates/classes.jar
[ 99% 111223/112096] Target Java: /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SettingsIntelligence_intermediates/classes-full-debug.jar
[ 99% 111224/112096] build /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SettingsIntelligence_intermediates/classes-combined.jar
[ 99% 111225/112096] Copy: /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SettingsIntelligence_intermediates/classes.jar
[ 99% 111226/112096] Target Java: /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes-full-debug.jar
FAILED: /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes-full-debug.jar
/bin/bash -c "(rm -f /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes-full-debug.jar ) && (rm -rf /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/anno ) && (mkdir -p /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/ ) && (mkdir -p /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/anno ) && (/var/media/data/code/lineage/16.0/out/soong/host/linux-x86/bin/zipsync -d /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/srcjars -l /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/srcjar-list -f \"*.java\" /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/aapt2.srcjar ) && (if [ -s /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/java-source-list -o -s /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/srcjar-list ] ; then /var/media/data/code/lineage/16.0/out/soong/host/linux-x86/bin/soong_javac_wrapper prebuilts/jdk/jdk9/linux-x86/bin/javac -Xmaxerrs 9999999 -encoding UTF-8 -sourcepath \"\" -g -XDskipDuplicateBridges=true -XDstringConcat=inline -encoding UTF-8 -bootclasspath /var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/core-oj_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/core-lambda-stubs_intermediates/classes-header.jar -classpath /var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android.car_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/SystemUI-tags_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/SystemUI-proto_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/org.lineageos.platform.internal_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-annotations_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-arch-lifecycle-common_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/SystemUIPluginLib_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/SystemUISharedLib_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/SettingsLib_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-car_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v4_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v7-recyclerview_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v7-preference_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v7-appcompat_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v7-palette_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v14-preference_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v17-leanback_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-slices-core_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-slices-view_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-slices-builders_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-arch-core-runtime_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-arch-lifecycle-extensions_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v4_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-arch-lifecycle-runtime_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v7-recyclerview_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v7-preference_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v7-appcompat_intermediates/classes-header.jar:/var/media/data/code/lineage/16.0/out/target/common/obj/JAVA_LIBRARIES/android-support-v14-preference_intermediates/classes-header.jar -d /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes -s /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/anno -source 1.8 -target 1.8 -g:source,lines \\@/var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/java-source-list \\@/var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/srcjar-list || ( rm -rf /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes ; exit 41 ) fi ) && (prebuilts/jdk/jdk9/linux-x86/bin/jar -cf /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes-full-debug.jar @<(find /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes -type f | sort | build/soong/scripts/jar-args.sh /var/media/data/code/lineage/16.0/out/target/common/obj/APPS/SystemUI_intermediates/classes; echo \"-C /var/media/data/code/lineage/16.0/out/empty .\") )"
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006eb200000, 781189120, 0) failed; error='Not enough space' (errno=12)