title: ninja: error: ...libmemalloc_intermediates/export_includes', needed by ..., missing and no known rule to make it
body: <p>I am attempting to build Cardinal (nougat) for Lithium (Xiaomi Mi Mix). I must say first: I have succeeded in some android rom builds before, all LineageOS based. This is one of several attempts at compiling an AOSP based one and, as before, I enconunter immediate problems due to a general mismatch of rom and device/vendor sources. I research as extensively as I can all of them and can fix some, but others are tough to crack for me.</p>
  
  <p>As this one:</p>
  
  <pre><code>ninja: Entering directory `.'
  ninja: error: '/home/albertoduqe/cardinal/out/target/product/lithium/obj_arm/SHARED_LIBRARIES/libmemalloc_intermediates/export_includes', needed by '/home/albertoduqe/cardinal/out/target/product/lithium/obj_arm/SHARED_LIBRARIES/copybit.msm8996_intermediates/import_includes', missing and no known rule to make it
  build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
  make: *** [ninja_wrapper] Error 1
  make: Leaving directory '/home/albertoduqe/cardinal'
  
  #### make failed to build some targets (52 seconds) ####
  </code></pre>
  
  <p>I have searched all over StackOverflow, XDA and googlesource for libmemalloc and I can't find much. It is supposed to be some Qcom display LOCAL_MODULE and I find it referenced here, for example: 
  <a href="https://github.com/LineageOS/android_hardware_qcom_display/blob/cm-14.1/msm8996/libgralloc/Android.mk" rel="nofollow noreferrer">https://github.com/LineageOS/android_hardware_qcom_display/blob/cm-14.1/msm8996/libgralloc/Android.mk</a></p>
  
  <p>I have those and (I believe) the rest of hardware/qcom (as well as vendor and device/qcom) sources in my local working tree, so I have no idea of what am I missing, if it is a repo that I do not have synced, or a synced one that I should replace for another, or maybe some change in some mk file that's causing the fail.</p>
  
  <p>Any hint will be appreciated. Thanks!</p>