[Android Q&A, Help & Troubleshooting] Veritas06:
I'm working on getting LineageOS 15.1 to my Planet Gemini PDA, but seem to be running into issues when compiling from source.

At the moment, it looks like it's the kernel giving me trouble:

v3ritas@lat-e7250 ~/Development/LOS/kernel/planet/mt6797 $ make clean
CLEAN .
drivers/misc/mediatek/ext_disp/common/test/Makefile:63: "lwlwlw"
*MTK_GPU_VERSION 1 =
*MTK_PLATFORM:
$CONFIG_MTK_GPU_COMMON_DVFS_SUPPORT is []
*MTK_PLATFORM:
drivers/misc/mediatek/pmic/mt6336/Makefile:12: MT6336_E1
drivers/misc/mediatek/secwidevine/classicdrm/Makefile:19: "custom build secwidevine"
"custom build secwidevinemdw"
CLEAN usr
CLEAN .tmp_versions

#### build completed successfully (3 seconds) ####

v3ritas@lat-e7250 ~/Development/LOS/kernel/planet/mt6797 $ make mrproper
drivers/misc/mediatek/ext_disp/common/test/Makefile:63: "lwlwlw"
*MTK_GPU_VERSION 1 =
*MTK_PLATFORM:
$CONFIG_MTK_GPU_COMMON_DVFS_SUPPORT is []
*MTK_PLATFORM:
drivers/misc/mediatek/pmic/mt6336/Makefile:12: MT6336_E1
drivers/misc/mediatek/secwidevine/classicdrm/Makefile:19: "custom build secwidevine"
"custom build secwidevinemdw"
CLEAN scripts/basic
CLEAN scripts/dtc
CLEAN scripts/kconfig
CLEAN scripts/mod
CLEAN scripts
CLEAN include/config include/generated arch/arm64/include/generated
CLEAN .config .version include/generated/uapi/linux/version.h

#### build completed successfully (3 seconds) ####

v3ritas@lat-e7250 ~/Development/LOS/kernel/planet/mt6797 $ ARCH=arm64 CROSS_COMPILE=/usr/bin/aarch64-linux-gnu- make defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
*** Default configuration is based on 'defconfig'
warning: (ARM64) selects DT_IDLE_STATES which has unmet direct dependencies (CPU_IDLE)
warning: (ARM64) selects DT_IDLE_STATES which has unmet direct dependencies (CPU_IDLE)
#
# configuration written to .config
#

#### build completed successfully (2 seconds) ####

v3ritas@lat-e7250 ~/Development/LOS/kernel/planet/mt6797 $ ARCH=arm64 CROSS_COMPILE=/usr/bin/aarch64-linux-gnu- make
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (ARM64) selects DT_IDLE_STATES which has unmet direct dependencies (CPU_IDLE)
warning: (ARM64) selects DT_IDLE_STATES which has unmet direct dependencies (CPU_IDLE)
CHK include/config/kernel.release
UPD include/config/kernel.release
WRAP arch/arm64/include/generated/asm/bug.h
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/checksum.h
WRAP arch/arm64/include/generated/asm/clkdev.h
WRAP arch/arm64/include/generated/asm/cputime.h
WRAP arch/arm64/include/generated/asm/current.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/dma-contiguous.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/errno.h
WRAP arch/arm64/include/generated/asm/ftrace.h
WRAP arch/arm64/include/generated/asm/hash.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/ioctl.h
WRAP arch/arm64/include/generated/asm/ioctls.h
WRAP arch/arm64/include/generated/asm/ipcbuf.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
WRAP arch/arm64/include/generated/asm/kvm_para.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/mman.h
WRAP arch/arm64/include/generated/asm/msgbuf.h
WRAP arch/arm64/include/generated/asm/mutex.h
WRAP arch/arm64/include/generated/asm/pci.h
WRAP arch/arm64/include/generated/asm/pci-bridge.h
WRAP arch/arm64/include/generated/asm/poll.h
WRAP arch/arm64/include/generated/asm/preempt.h
WRAP arch/arm64/include/generated/asm/resource.h
WRAP arch/arm64/include/generated/asm/rwsem.h
WRAP arch/arm64/include/generated/asm/scatterlist.h
WRAP arch/arm64/include/generated/asm/sections.h
WRAP arch/arm64/include/generated/asm/segment.h
WRAP arch/arm64/include/generated/asm/sembuf.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/shmbuf.h
WRAP arch/arm64/include/generated/asm/simd.h
WRAP arch/arm64/include/generated/asm/sizes.h
WRAP arch/arm64/include/generated/asm/socket.h
WRAP arch/arm64/include/generated/asm/sockios.h
WRAP arch/arm64/include/generated/asm/swab.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/termbits.h
WRAP arch/arm64/include/generated/asm/termios.h
WRAP arch/arm64/include/generated/asm/topology.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/types.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
WRAP arch/arm64/include/generated/asm/xor.h
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
HOSTCC scripts/basic/bin2c
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm64/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.h
HOSTCC scripts/dtc/dtc-lexer.lex.o
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/pnmtologo
HOSTCC scripts/conmakehash
HOSTCC scripts/sortextable
CC init/main.o
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_initrd.o
LD init/mounts.o
CC init/noinitramfs.o
CC init/initramfs.o
CC init/calibrate.o
CC init/init_task.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
GEN usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
LDS arch/arm64/kernel/vdso/vdso.lds
VDSOA arch/arm64/kernel/vdso/gettimeofday.o
VDSOA arch/arm64/kernel/vdso/note.o
VDSOA arch/arm64/kernel/vdso/sigreturn.o
VDSOL arch/arm64/kernel/vdso/vdso.so.dbg
OBJCOPY arch/arm64/kernel/vdso/vdso.so
AS arch/arm64/kernel/vdso/vdso.o
LD arch/arm64/kernel/vdso/built-in.o
VDSOSYM arch/arm64/kernel/vdso/vdso-offsets.h
CC arch/arm64/kernel/cputable.o
CC arch/arm64/kernel/debug-monitors.o
AS arch/arm64/kernel/entry.o
CC arch/arm64/kernel/irq.o
CC arch/arm64/kernel/fpsimd.o
AS arch/arm64/kernel/entry-fpsimd.o
CC arch/arm64/kernel/process.o
CC arch/arm64/kernel/ptrace.o
CC arch/arm64/kernel/setup.o
CC arch/arm64/kernel/signal.o
CC arch/arm64/kernel/sys.o
CC arch/arm64/kernel/stacktrace.o
CC arch/arm64/kernel/time.o
CC arch/arm64/kernel/traps.o
CC arch/arm64/kernel/io.o
CC arch/arm64/kernel/vdso.o
AS arch/arm64/kernel/hyp-stub.o
CC arch/arm64/kernel/psci.o
CC arch/arm64/kernel/cpu_ops.o
CC arch/arm64/kernel/insn.o
CC arch/arm64/kernel/return_address.o
CC arch/arm64/kernel/cpuinfo.o
CC arch/arm64/kernel/cpu_errata.o
CC arch/arm64/kernel/alternative.o
AS arch/arm64/kernel/psci-call.o
AS arch/arm64/kernel/sys32.o
AS arch/arm64/kernel/kuser32.o
CC arch/arm64/kernel/signal32.o
CC arch/arm64/kernel/sys_compat.o
CC arch/arm64/kernel/../../arm/kernel/opcodes.o
CC arch/arm64/kernel/arm64ksyms.o
CC arch/arm64/kernel/module.o
CC arch/arm64/kernel/smp.o
CC arch/arm64/kernel/smp_spin_table.o
CC arch/arm64/kernel/topology.o
CC arch/arm64/kernel/perf_regs.o
CC arch/arm64/kernel/perf_event.o
CC arch/arm64/kernel/hw_breakpoint.o
AS arch/arm64/kernel/sleep.o
CC arch/arm64/kernel/suspend.o
CC arch/arm64/kernel/jump_label.o
CC arch/arm64/kernel/efi.o
CC arch/arm64/kernel/efi-stub.o
AS arch/arm64/kernel/efi-entry.o
CC arch/arm64/kernel/pci.o
LD arch/arm64/kernel/built-in.o
AS arch/arm64/kernel/head.o
LDS arch/arm64/kernel/vmlinux.lds
CC arch/arm64/mm/dma-mapping.o
CC arch/arm64/mm/extable.o
CC arch/arm64/mm/fault.o
CC arch/arm64/mm/init.o
AS arch/arm64/mm/cache.o
CC arch/arm64/mm/copypage.o
CC arch/arm64/mm/flush.o
CC arch/arm64/mm/ioremap.o
CC arch/arm64/mm/mmap.o
CC arch/arm64/mm/pgd.o
CC arch/arm64/mm/mmu.o
CC arch/arm64/mm/context.o
AS arch/arm64/mm/proc.o
CC arch/arm64/mm/pageattr.o
CC arch/arm64/mm/hugetlbpage.o
LD arch/arm64/mm/built-in.o
CC arch/arm64/net/bpf_jit_comp.o
LD arch/arm64/net/built-in.o
CC arch/arm64/kvm/../../../virt/kvm/kvm_main.o
CC arch/arm64/kvm/../../../virt/kvm/coalesced_mmio.o
CC arch/arm64/kvm/../../../arch/arm/kvm/arm.o
CC arch/arm64/kvm/../../../arch/arm/kvm/mmu.o
CC arch/arm64/kvm/../../../arch/arm/kvm/mmio.o
CC arch/arm64/kvm/../../../arch/arm/kvm/psci.o
CC arch/arm64/kvm/../../../arch/arm/kvm/perf.o
CC arch/arm64/kvm/emulate.o
CC arch/arm64/kvm/inject_fault.o
CC arch/arm64/kvm/regmap.o
AS arch/arm64/kvm/hyp.o
AS arch/arm64/kvm/hyp-init.o
CC arch/arm64/kvm/handle_exit.o
CC arch/arm64/kvm/guest.o
CC arch/arm64/kvm/reset.o
CC arch/arm64/kvm/sys_regs.o
CC arch/arm64/kvm/sys_regs_generic_v8.o
CC arch/arm64/kvm/../../../virt/kvm/arm/vgic.o
CC arch/arm64/kvm/../../../virt/kvm/arm/vgic-v2.o
AS arch/arm64/kvm/vgic-v2-switch.o
CC arch/arm64/kvm/../../../virt/kvm/arm/vgic-v3.o
AS arch/arm64/kvm/vgic-v3-switch.o
CC arch/arm64/kvm/../../../virt/kvm/arm/arch_timer.o
LD arch/arm64/kvm/kvm.o
LD arch/arm64/kvm/built-in.o
CC arch/arm64/crypto/sha1-ce-glue.o
AS arch/arm64/crypto/sha1-ce-core.o
LD arch/arm64/crypto/sha1-ce.o
CC arch/arm64/crypto/sha2-ce-glue.o
AS arch/arm64/crypto/sha2-ce-core.o
LD arch/arm64/crypto/sha2-ce.o
CC arch/arm64/crypto/ghash-ce-glue.o
AS arch/arm64/crypto/ghash-ce-core.o
LD arch/arm64/crypto/ghash-ce.o
CC arch/arm64/crypto/aes-ce-cipher.o
CC arch/arm64/crypto/aes-ce-ccm-glue.o
AS arch/arm64/crypto/aes-ce-ccm-core.o
LD arch/arm64/crypto/aes-ce-ccm.o
CC arch/arm64/crypto/aes-glue-ce.o
AS arch/arm64/crypto/aes-ce.o
LD arch/arm64/crypto/aes-ce-blk.o
CC arch/arm64/crypto/aes-glue-neon.o
AS arch/arm64/crypto/aes-neon.o
LD arch/arm64/crypto/aes-neon-blk.o
LD arch/arm64/crypto/built-in.o
CC kernel/fork.o
CC kernel/exec_domain.o
CC kernel/panic.o
CC kernel/cpu.o
In file included from include/linux/memory_hotplug.h:6:0,
from include/linux/mmzone.h:796,
from include/linux/topology.h:32,
from include/linux/sched.h:42,
from ./arch/arm64/include/asm/compat.h:25,
from ./arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/fs.h:10,
from include/linux/proc_fs.h:8,
from kernel/cpu.c:6:
kernel/cpu.c:58:26: error: static declaration of ‘cpu_chain’ follows non-static declaration
static RAW_NOTIFIER_HEAD(cpu_chain);
^
include/linux/notifier.h:113:27: note: in definition of macro ‘RAW_NOTIFIER_HEAD’
struct raw_notifier_head name = \
^
include/linux/notifier.h:193:33: note: previous declaration of ‘cpu_chain’ was here
extern struct raw_notifier_head cpu_chain;
^
make[1]: *** [scripts/Makefile.build:258: kernel/cpu.o] Error 1
make: *** [Makefile:939: kernel] Error 2

#### failed to build some targets (22 seconds) ####

v3ritas@lat-e7250 ~/Development/LOS/kernel/planet/mt6797 $

Any chance someone can help me out with the errors I'm receiving at the end?

Thanks in advance.