aquaris-dev / android_device_bq_gohan

Android device configuration for the bq Aquaris X5 Plus
9 stars 3 forks source link

Build error: Invalid context file found #1

Closed cherryland closed 7 years ago

cherryland commented 7 years ago

When building cm-13 for gohan, I am getting the following error

Invalid context file found in /home/vagrant/android/lineage/out/target/product/gohan/obj/ETC/file_contexts_intermediates/file_contexts

Updated installation manifest

$ vi android/system/.repo/local_manifests/roomservice.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-13.0" />
  <project name="LineageOS/android_external_sony_boringssl-compat" path="external/sony/boringssl-compat" remote="github" revision="cm-13.0" />
  <project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-13.0" />
  <project name="aquaris-dev/android_device_bq_gohan" path="device/bq/gohan" remote="github" />
  <project name="aquaris-dev/android_kernel_bq_msm8976" path="kernel/bq/msm8976" remote="github" revision="cm-13.0" />
  <project name="aquaris-dev/proprietary_vendor_bq" path="vendor/bq" remote="github" revision="cm-13.0" />
</manifest>

Output

...

Building Kernel Headers
Install: /home/vagrant/android/lineage/out/target/product/gohan/root/fstab.qcom
make[1]: Entering directory '/home/vagrant/android/lineage/kernel/bq/msm8976'
target thumb C++: init <= system/core/init/bootchart.cpp
libsepol.context_from_record: type fpc_socket is not defined
libsepol.context_from_record: could not create context structure
libsepol.context_from_string: could not create context structure
libsepol.sepol_context_to_sid: could not convert u:object_r:fpc_socket:s0 to sid
/home/vagrant/android/lineage/out/target/product/gohan/obj/ETC/file_contexts_intermediates/file_contexts:  line 800 has invalid context u:object_r:fpc_socket:s0
Invalid context file found in /home/vagrant/android/lineage/out/target/product/gohan/obj/ETC/file_contexts_intermediates/file_contexts
external/sepolicy/Android.mk:157: recipe for target '/home/vagrant/android/lineage/out/target/product/gohan/obj/ETC/file_contexts_intermediates/file_contexts' failed
make: *** [/home/vagrant/android/lineage/out/target/product/gohan/obj/ETC/file_contexts_intermediates/file_contexts] Error 5
make: *** Deleting file '/home/vagrant/android/lineage/out/target/product/gohan/obj/ETC/file_contexts_intermediates/file_contexts'
make: *** Waiting for unfinished jobs....
target thumb C++: init <= system/core/init/builtins.cpp
  GEN     /home/vagrant/android/lineage/out/target/product/gohan/obj/KERNEL_OBJ/Makefile
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8X16 && SND_SOC_MSM8994) selects SND_SOC_CPE which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_WCD_CPE)
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8X16 && SND_SOC_MSM8994) selects SND_SOC_CPE which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_WCD_CPE)

...

make[1]: Leaving directory '/home/vagrant/android/lineage/kernel/bq/msm8976'
make: *** wait: No child processes.  Stop.

#### make failed to build some targets (43:55 (mm:ss)) ####
cherryland commented 7 years ago

I guess fpc_socket, file_type; has not been defined in selinux/file.ts?

alexisju commented 7 years ago

13.0 branch is not anymore maintained regarding this status http://aquaris-dev.org/blog/2017/01/21/device-status.html

cherryland commented 7 years ago

Where can I find the cm-14.1 branch then?

ribbid987 commented 7 years ago

Just comment out this line in sepolicy/file_contexts: # /dev/socket/fpce u:object_r:fpc_socket:s0 It will build and run, with all the known problems.

cherryland commented 7 years ago

Related blog post http://aquaris-dev.org/blog/2017/04/13/device-status.html