[Xiaomi Redmi Note 4 [Snapdragon] ROMs, Kernels, Re] Curi0:
I did these commands after cloning the source and setting the toolchain

make clean && make mrproper
export ARCH=arm64
export SUBARCH=arm64
make franco_defconfig

Then when I run make -j8 it gives this error (I ran make again in the output below so that the unneeded stuff doesn't show)

CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
kernel/Makefile:133: *** No X.509 certificates found ***
CHK kernel/config_data.h
CC drivers/ras/ras.o
CC drivers/platform/msm/ipa/ipa_v2/ipa.o
CC drivers/platform/msm/spmi/spmi.o
CC drivers/regulator/core.o
CC drivers/rtc/rtc-lib.o
CC drivers/scsi/scsi.o
CC drivers/sensors/sensors_ssc.o
In file included from drivers/platform/msm/ipa/ipa_v2/ipa_trace.h:135:0,
from drivers/platform/msm/ipa/ipa_v2/ipa.c:41:
include/trace/define_trace.h:83:43: fatal error: ./ipa_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
scripts/Makefile.build:257: recipe for target 'drivers/platform/msm/ipa/ipa_v2/ipa.o' failed
make[5]: *** [drivers/platform/msm/ipa/ipa_v2/ipa.o] Error 1
scripts/Makefile.build:402: recipe for target 'drivers/platform/msm/ipa/ipa_v2' failed
make[4]: *** [drivers/platform/msm/ipa/ipa_v2] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/platform/msm/ipa' failed
make[3]: *** [drivers/platform/msm/ipa] Error 2
make[3]: *** Waiting for unfinished jobs....
CC drivers/scsi/hosts.o
CC drivers/rtc/hctosys.o
CC drivers/net/ethernet/msm/rndis_ipa.o
CC drivers/ras/debugfs.o
LD drivers/sensors/built-in.o
CC drivers/platform/msm/spmi/spmi-resources.o
CC drivers/slimbus/slimbus.o
CC drivers/rtc/systohc.o
LD drivers/ras/built-in.o
CC drivers/scsi/scsi_ioctl.o
CC drivers/platform/msm/spmi/spmi-pmic-arb.o
AS drivers/soc/qcom/idle-v8.o
In file included from drivers/net/ethernet/msm/rndis_ipa_trace.h:81:0,
from drivers/net/ethernet/msm/rndis_ipa.c:32:
include/trace/define_trace.h:83:43: fatal error: ./rndis_ipa_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
scripts/Makefile.build:257: recipe for target 'drivers/net/ethernet/msm/rndis_ipa.o' failed
make[4]: *** [drivers/net/ethernet/msm/rndis_ipa.o] Error 1
scripts/Makefile.build:402: recipe for target 'drivers/net/ethernet/msm' failed
make[3]: *** [drivers/net/ethernet/msm] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/net/ethernet' failed
make[2]: *** [drivers/net/ethernet] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/net' failed
make[1]: *** [drivers/net] Error 2
make[1]: *** Waiting for unfinished jobs....
CC drivers/soc/qcom/cpu_ops.o
CC drivers/soc/qcom/msm_rq_stats.o
CC drivers/rtc/class.o
CC drivers/regulator/dummy.o
CC drivers/scsi/constants.o
CC drivers/rtc/interface.o
CC drivers/soc/qcom/cpuss_dump.o
CC drivers/slimbus/slim-msm.o
CC drivers/regulator/fixed-helper.o
CC drivers/platform/msm/spmi/qpnp-int.o
CC drivers/soc/qcom/memory_dump_v2.o
CC drivers/regulator/helpers.o
CC drivers/scsi/scsicam.o
CC drivers/slimbus/slim-msm-ngd.o
CC drivers/regulator/devres.o
CC drivers/rtc/rtc-dev.o
CC drivers/soc/qcom/ddr-health.o
CC drivers/scsi/scsi_error.o
CC drivers/regulator/of_regulator.o
CC drivers/soc/qcom/watchdog_v2.o
CC drivers/platform/msm/spmi/spmi-dbgfs.o
CC drivers/soc/qcom/common_log.o
CC drivers/rtc/rtc-proc.o
CC drivers/rtc/rtc-sysfs.o
CC drivers/regulator/fixed.o
CC drivers/soc/qcom/cpu_pwr_ctl.o
CC drivers/soc/qcom/socinfo.o
CC drivers/rtc/qpnp-rtc.o
LD drivers/platform/msm/spmi/built-in.o
scripts/Makefile.build:402: recipe for target 'drivers/platform/msm' failed
make[2]: *** [drivers/platform/msm] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/platform' failed
make[1]: *** [drivers/platform] Error 2
CC drivers/soc/qcom/boot_stats.o
LD drivers/rtc/rtc-core.o
CC drivers/regulator/mem-acc-regulator.o
CC drivers/soc/qcom/rpm-smd.o
CC drivers/regulator/fan53555.o
LD drivers/slimbus/built-in.o
CC drivers/regulator/msm_gfx_ldo.o
CC drivers/soc/qcom/event_timer.o
LD drivers/rtc/built-in.o
CC drivers/soc/qcom/rpm-smd-debug.o
CC drivers/soc/qcom/spm.o
CC drivers/scsi/scsi_lib.o
CC drivers/regulator/rpm-smd-regulator.o
CC drivers/soc/qcom/spm_devices.o
CC drivers/regulator/qpnp-regulator.o
CC drivers/soc/qcom/scm.o
CC drivers/regulator/spm-regulator.o
CC drivers/soc/qcom/scm-boot.o
CC drivers/soc/qcom/mpm-of.o
CC drivers/soc/qcom/smem.o
CC drivers/soc/qcom/smem_debug.o
CC drivers/regulator/cpr-regulator.o
CC drivers/soc/qcom/smd.o
CC drivers/regulator/cpr3-regulator.o
CC drivers/regulator/cpr3-util.o
CC drivers/soc/qcom/smd_debug.o
CC drivers/soc/qcom/smd_private.o
CC drivers/scsi/scsi_lib_dma.o
CC drivers/soc/qcom/smd_init_dt.o
CC drivers/soc/qcom/smsm_debug.o
CC drivers/soc/qcom/glink.o
CC drivers/scsi/scsi_scan.o
CC drivers/soc/qcom/glink_debugfs.o
CC drivers/soc/qcom/glink_ssr.o
CC drivers/regulator/cpr3-hmss-regulator.o
CC drivers/soc/qcom/glink_loopback_server.o
CC drivers/soc/qcom/glink_smd_xprt.o
CC drivers/scsi/scsi_sysfs.o
CC drivers/soc/qcom/glink_smem_native_xprt.o
CC drivers/soc/qcom/smem_log.o
CC drivers/regulator/cpr3-mmss-regulator.o
CC drivers/regulator/cpr4-apss-regulator.o
CC drivers/regulator/cprh-kbss-regulator.o
CC drivers/soc/qcom/smp2p.o
CC drivers/scsi/scsi_devinfo.o
CC drivers/soc/qcom/smp2p_debug.o
CC drivers/regulator/qpnp-labibb-regulator.o
CC drivers/soc/qcom/smp2p_sleepstate.o
CC drivers/soc/qcom/smp2p_loopback.o
CC drivers/soc/qcom/smp2p_test.o
CC drivers/scsi/scsi_sysctl.o
CC drivers/soc/qcom/smp2p_spinlock_test.o
CC drivers/soc/qcom/qmi_interface.o
CC drivers/regulator/stub-regulator.o
CC drivers/scsi/scsi_proc.o
CC drivers/soc/qcom/ipc_router_smd_xprt.o
CC drivers/regulator/kryo-regulator.o
CC drivers/soc/qcom/memshare/heap_mem_ext_v01.o
CC drivers/soc/qcom/rpm_rbcpr_stats_v2.o
CC drivers/soc/qcom/cpaccess64.o
CC drivers/soc/qcom/qdsp6v2/apr.o
CC drivers/scsi/scsi_trace.o
CC drivers/soc/qcom/memshare/msm_memshare.o
CC drivers/soc/qcom/rpm_stats.o
CC drivers/soc/qcom/rpm_master_stat.o
LD drivers/regulator/built-in.o
CC drivers/soc/qcom/rpm_rail_stats.o
CC drivers/soc/qcom/system_stats.o
CC drivers/scsi/scsi_pm.o
CC drivers/soc/qcom/perf_event_l2.o
CC drivers/soc/qcom/rpm_log.o
CC drivers/soc/qcom/qdsp6v2/apr_v2.o
CC drivers/soc/qcom/msm_tz_smmu.o
CC drivers/soc/qcom/peripheral-loader.o
LD drivers/soc/qcom/memshare/built-in.o
CC drivers/soc/qcom/subsys-pil-tz.o
CC drivers/soc/qcom/pil-q6v5.o
CC drivers/soc/qcom/qdsp6v2/apr_tal.o
CC drivers/soc/qcom/pil-msa.o
CC drivers/scsi/ufs/ufs-qcom.o
CC drivers/soc/qcom/pil-q6v5-mss.o
CC drivers/soc/qcom/msm_performance.o
CC drivers/soc/qcom/qdsp6v2/voice_svc.o
CC drivers/soc/qcom/subsystem_notif.o
CC drivers/soc/qcom/subsystem_restart.o
CC drivers/soc/qcom/ramdump.o
CC drivers/soc/qcom/qdsp6v2/msm_audio_ion.o
CC drivers/soc/qcom/sysmon.o
CC drivers/soc/qcom/sysmon-qmi.o
CC drivers/soc/qcom/qdsp6v2/adsp-loader.o
CC drivers/soc/qcom/secure_buffer.o
CC drivers/scsi/sd.o
CC drivers/soc/qcom/icnss.o
CC drivers/scsi/ufs/ufs-qcom-ice.o
CC drivers/soc/qcom/wlan_firmware_service_v01.o
LD drivers/soc/qcom/qdsp6v2/built-in.o
CC drivers/soc/qcom/bam_dmux.o
CC drivers/soc/qcom/scm-xpu.o
CC drivers/soc/qcom/serial_num.o
CC drivers/scsi/sg.o
CC drivers/scsi/ufs/ufshcd.o
CC drivers/scsi/ufs/ufs_quirks.o
CC drivers/scsi/ufs/ufshcd-pltfrm.o
CC drivers/scsi/ufs/ufs-debugfs.o
CC drivers/scsi/ufs/ufs-qcom-debugfs.o
CC drivers/scsi/ch.o
LD drivers/scsi/scsi_mod.o
LD drivers/scsi/sd_mod.o
LD drivers/soc/qcom/built-in.o
LD drivers/soc/built-in.o
LD drivers/scsi/ufs/built-in.o
LD drivers/scsi/built-in.o
Makefile:946: recipe for target 'drivers' failed
make: *** [drivers] Error 2