[Xiaomi Mi 5 Questions & Answers] cysin:
Hi there,

It's my first time to try to build LineageOS from source for Mi 5 (gemini), and I am following official instructions here wiki lineageos org gemini_build html

But I got errors after runing 'brunch gemini'. Any help are welcome, thanks very much!

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.1
LINEAGE_VERSION=14.1-20170130-UNOFFICIAL-gemini
TARGET_PRODUCT=lineage_gemini
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-31-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NMF26V
OUT_DIR=/root/android/system/out
============================================
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp: Unused source files: \
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp: Unused source files: \
build/core/binary.mk:1253: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc
build/core/binary.mk:1253: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc
./external/speex/Android.mk:56: TODOArm64: enable neon in libspeex
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
find: ‘/root/android/system/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates’: No such file or directory
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
No private recovery resources for TARGET_DEVICE gemini
build/core/java.mk:334: warning: overriding commands for target `/root/android/system/out/target/common/obj/APPS/Dialer_intermediates/src/src/org/codeaurora/presenceserv/IPresenceService.java'
build/core/java.mk:334: warning: ignoring old commands for target `/root/android/system/out/target/common/obj/APPS/Dialer_intermediates/src/src/org/codeaurora/presenceserv/IPresenceService.java'
build/core/java.mk:334: warning: overriding commands for target `/root/android/system/out/target/common/obj/APPS/Dialer_intermediates/src/src/org/codeaurora/presenceserv/IPresenceServiceCB.java'
build/core/java.mk:334: warning: ignoring old commands for target `/root/android/system/out/target/common/obj/APPS/Dialer_intermediates/src/src/org/codeaurora/presenceserv/IPresenceServiceCB.java'
build/core/base_rules.mk:316: warning: overriding commands for target `/root/android/system/out/target/product/gemini/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:316: warning: ignoring old commands for target `/root/android/system/out/target/product/gemini/root/res/images/charger/battery_fail.png'
build/core/Makefile:34: warning: overriding commands for target `/root/android/system/out/target/product/gemini/system/etc/libnfc-brcm.conf'
build/core/base_rules.mk:316: warning: ignoring old commands for target `/root/android/system/out/target/product/gemini/system/etc/libnfc-brcm.conf'
build/core/Makefile:34: warning: overriding commands for target `/root/android/system/out/target/product/gemini/system/etc/libnfc-nxp.conf'
build/core/base_rules.mk:316: warning: ignoring old commands for target `/root/android/system/out/target/product/gemini/system/etc/libnfc-nxp.conf'
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/root/android/system/out/target/product/gemini/obj/SHARED_LIBRARIES/libqminvapi_intermediates/export_includes', needed by '/root/android/system/out/target/product/gemini/obj/EXECUTABLES/readmac_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/root/android/system'

#### make failed to build some targets (45 seconds) ####