[Moto G6 Plus ROMs, Kernels, Recoveries, & Other De] jxda77:
Error when building RR7 from source

Trying to build RR 7.0.2 from source but it's failing. Something seems to be wrong with the SEPolicies:

2 warnings generated.
[ 27% 30528/112384] build /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/reqd_policy_mask.cil
/bkp/resurrectionremix/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/reqd_policy_mask.conf
/bkp/resurrectionremix/out/host/linux-x86/bin/checkpolicy: policy configuration loaded
/bkp/resurrectionremix/out/host/linux-x86/bin/checkpolicy: writing CIL to /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/reqd_policy_mask.cil
[ 27% 30529/112384] build /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows
[B]FAILED:[/B] /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows
/bin/bash -c "(rm -f /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows ) && (ASAN_OPTIONS=detect_leaks=0 /bkp/resurrectionremix/out/host/linux-x86/bin/checkpolicy -M -c 30 -o /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/policy.conf )"
[B]device/rr/sepolicy/qcom/dynamic/hal_lineage_livedisplay_qti.te:3:ERROR 'unknown type hal_lineage_livedisplay_qti' at token ';' on line 42517:
allow hal_lineage_livedisplay_qti qdisplay_service:service_manager find;
# Do not use add_service() as hal_graphics_composer_default may be the provider as well
checkpolicy: error(s) encountered while parsing configuration[/B]
/bkp/resurrectionremix/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/policy.conf
[ 27% 30530/112384] build /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.cil
/bkp/resurrectionremix/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.conf
/bkp/resurrectionremix/out/host/linux-x86/bin/checkpolicy: policy configuration loaded
/bkp/resurrectionremix/out/host/linux-x86/bin/checkpolicy: writing CIL to /bkp/resurrectionremix/out/target/product/evert/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.cil.tmp
[ 27% 30537/112384] target StaticLib: libv8 (/bkp/resurrectionremix/out/target/product/evert/obj/STATIC_LIBRARIES/libv8_intermediates/libv8.a)

How to resolve this? Got to get digging in the commits... perhaps somebody who is more updated can give an explanation?

Ok. There is a problem with SELinux policies for LiveDisplay. SImple fix is just to remove these SELinux policies:

hal_lineage_livedisplay_*.te

in source tree under

device/rr/sepolicy/
device/motorola/...../sepolicy

That will make it compile.