[Redmi Note 8 ROMs, Kernels, Recoveries, & Other De] M.Tullius:
Debugging build errors

I'm trying to build the rom for willow, but get some build errors.

Does anyone konw what I'm doing wrong?

My build script is

repo init -u git://github.com/LineageOS/android.git -b lineage-17.1
mkdir .repo/local_manifests
cp ../roomservice.xml .repo/local_manifests/
repo sync -j13
source build/envsetup.sh
brunch lineage_willow-userdebug > b3out.log

where roomservice.xml is

<manifest>
<project path="device/xiaomi/willow" name="Xiaomi-trinket-dev/android_device_xiaomi_willow" remote="github" revision="lineage-17.1" />
<project path="device/xiaomi/sm6125-common" name="Xiaomi-trinket-dev/android_device_xiaomi_sm6125-common" remote="github" revision="lineage-17.1" />
<project path="kernel/xiaomi/sm6125" name="Xiaomi-trinket-dev/android_kernel_xiaomi_sm6125" remote="github" revision="lineage-17.1" />
<project path="vendor/xiaomi/willow" name="Xiaomi-trinket-dev/vendor_xiaomi_willow" remote="github" revision="lineage-17.1" />
<project path="vendor/xiaomi/sm6125-common" name="Xiaomi-trinket-dev/vendor_xiaomi_sm6125-common" remote="github" revision="lineage-17.1" />
</manifest>

I'm building on Arch linux (note I'm able to build aosp 10 for a generic device).

The build starts fine, but around 78% it fails. The relevant lines seem to be

[ 78% 91280/115861] build out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/installing_text.png
FAILED: out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/installing_text.png out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/installing_security_text.png out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/erasing_text.png out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/error_text.png out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/no_command_text.png out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/cancel_wipe_data_text.png out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/factory_data_reset_text.png out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/try_again_text.png out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/wipe_data_confirmation_text.png out/target/product/willow/obj/PACKAGING/recovery_text_res_intermediates/wipe_data_menu_header_text.png
/bin/bash -c "(rm -rf out/target/product/willow/obj/PACKAGING/recovery_font_files_intermediates ) && (mkdir -p out/target/product/willow/obj/PACKAGING/recovery_font_files_intermediates ) && ...
Exception in thread "main" java.lang.InternalError: java.lang.reflect.InvocationTargetException
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:86)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at java.desktop/java.awt.Font.<init>(Font.java:618)
at java.desktop/java.awt.Font.createFont(Font.java:1224)
at com.android.recovery.tools.ImageGenerator.loadFontsByLocale(ImageGenerator.java:393)
at com.android.recovery.tools.ImageGenerator.createGraphics(ImageGenerator.java:492)
at com.android.recovery.tools.ImageGenerator.generateImage(ImageGenerator.java:605)
at com.android.recovery.tools.ImageGenerator.main(ImageGenerator.java:755)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:84)
... 8 more
Caused by: java.lang.NullPointerException
at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1288)
at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:765)
at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:440)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:385)
at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35)
at java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:56)
... 13 more

where ... in 3rd line stand for around 40k other letters :), and then it ends with

ninja: build stopped: subcommand failed.
20:59:04 ninja failed with: exit status 1

Does anyone see whether I'm making some stupid mistake, or missing something obvious, or whether my build enviroment is missing something?

I must also mention that when I do 'brunch', I get a couple of 'Build sandboxing disabled due to nsjail error.' messages, but I'm not sure it is important.

Thanks.