[OnePlus 2 Q&A, Help & Troubleshooting] Forever Alone:
Hello guys while compiling kernel for OpT (MM), I am getting this error.. how to solve this?

Error 1

rohan@rohantech:~/android/kernel/oneplus2$ make -j4

scripts/kconfig/conf --silentoldconfig Kconfig

warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)

warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))

warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)

warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))

...

scripts/asn1_compiler.c: In function ‘render_out_of_line_list’:

scripts/asn1_compiler.c:1341:3: warning: enumeration value ‘NOT_COMPOUND’ not handled in switch [-Wswitch]

switch (e->compound) {

^

scripts/asn1_compiler.c:1341:3: warning: enumeration value ‘CHOICE’ not handled in switch [-Wswitch]

scripts/asn1_compiler.c:1341:3: warning: enumeration value ‘ANY’ not handled in switch [-Wswitch]

scripts/asn1_compiler.c:1341:3: warning: enumeration value ‘TYPE_REF’ not handled in switch [-Wswitch]

scripts/asn1_compiler.c:1341:3: warning: enumeration value ‘TAG_OVERRIDE’ not handled in switch [-Wswitch]

...

In file included from drivers/media/platform/msm/camera_v2/sensor/vl6180/src/vl6180x_i2c.c:42:0:

drivers/media/platform/msm/camera_v2/sensor/vl6180/inc/vl6180x_i2c.h:16:23: fatal error: stmvl6180.h: No such file or directory

#include "stmvl6180.h"

^

compilation terminated.

scripts/Makefile.build:308: recipe for target 'drivers/media/platform/msm/camera_v2/sensor/vl6180/src/vl6180x_i2c.o' failed

make[7]: *** [drivers/media/platform/msm/camera_v2/sensor/vl6180/src/vl6180x_i2c.o] Error 1

scripts/Makefile.build:455: recipe for target 'drivers/media/platform/msm/camera_v2/sensor/vl6180' failed

make[6]: *** [drivers/media/platform/msm/camera_v2/sensor/vl6180] Error 2

scripts/Makefile.build:455: recipe for target 'drivers/media/platform/msm/camera_v2/sensor' failed

make[5]: *** [drivers/media/platform/msm/camera_v2/sensor] Error 2

scripts/Makefile.build:455: recipe for target 'drivers/media/platform/msm/camera_v2' failed

make[4]: *** [drivers/media/platform/msm/camera_v2] Error 2

scripts/Makefile.build:455: recipe for target 'drivers/media/platform/msm' failed

make[3]: *** [drivers/media/platform/msm] Error 2

scripts/Makefile.build:455: recipe for target 'drivers/media/platform' failed

make[2]: *** [drivers/media/platform] Error 2

scripts/Makefile.build:455: recipe for target 'drivers/media' failed

make[1]: *** [drivers/media] Error 2

make[1]: *** Waiting for unfinished jobs....

...

Makefile:824: recipe for target 'drivers' failed

make: *** [drivers] Error 2

Please tell guys how to fix this error :(

Error 2

rohan@rohantech:~/android/kernel/oneplus2$ make clean

CLEAN .

CLEAN arch/arm64/kernel/vdso

CLEAN arch/arm64/kernel

CLEAN crypto/asymmetric_keys

CLEAN kernel

CLEAN lib

CLEAN net/wireless

CLEAN security/selinux

CLEAN usr

scripts/Makefile.clean:17: /home/rohan/android/kernel/oneplus2/arch/arm64/boot/qcom/Makefile: No such file or directory

make[2]: *** No rule to make target '/home/rohan/android/kernel/oneplus2/arch/arm64/boot/qcom/Makefile'. Stop.

scripts/Makefile.clean:94: recipe for target 'arch/arm64/boot/qcom' failed

make[1]: *** [arch/arm64/boot/qcom] Error 2

/home/rohan/android/kernel/oneplus2/arch/arm64/Makefile:92: recipe for target 'archclean' failed

make: *** [archclean] Error 2

rohan@rohantech:~/android/kernel/oneplus2$

Error 3(FIXED)

FIXED:

[CODE]rohan@rohantech:~/android/kernel/oneplus2$ make msm8994-OnePlus2_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2503:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:567:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
jump->offset = r->len - 1;
^
scripts/kconfig/menu.c:528:19: note: ‘jump’ was declared here
struct jump_key *jump;
^
HOSTLD scripts/kconfig/conf
arch/arm64/configs/msm8994-OnePlus2_defconfig:685:warning: unexpected data
warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)
warning: (SND_SOC_APQ8074 && SND_SOC_MSM8994) selects SND_SOC_MSM_HDMI_CODEC_RX which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && FB_MSM_MDSS_HDMI_PANEL && (SND_SOC_MSM8974 || SND_SOC_APQ8084 || SND_SOC_MSM8994))
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)
warning: (SND_SOC_APQ8074 && SND_SOC_MSM8994) selects SND_SOC_MSM_HDMI_CODEC_RX which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && FB_MSM_MDSS_HDMI_PANEL && (SND_SOC_MSM8974 || SND_SOC_APQ8084 || SND_SOC_MSM8994))
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
#
# configuration written to .config
#
rohan@rohantech:~/android/kernel/oneplus2$ make -j4
Makefile:609: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
Makefile:800: *** multiple target patterns. Stop.[/CODE]

please help this noob ;_; I am using this kernel source : [url]https://github.com/OnePlusOSS/android_kernel_oneplus_msm8994/tree/oneplus/6.0.1[/url] and wanna build a kernel for ParanoidAndroid ROM.. if it's wrong one then pls do guide me the right kernel.. :)

EDIT: Fixed with this command :
[B]export SUBARCH=arm64[/B]
[B]export CROSS_COMPILE=/home/rohan/android/kernel/toolchain1/bin/aarch64-linux-android-[/B]