Android 编译报错

《!-------------------20180516-----------------------------》

编译Android报错

复制代码
including ./vendor/mstar/supernova/projects/Android.mk ...
Export includes file: external/bluetooth/bluedroid/hci/Android.mk -- out/target/product/generic/obj/SHARED_LIBRARIES/libbt-hci_intermediates/export_includes
Export includes file: external/bluetooth/bluedroid/utils/Android.mk -- out/target/product/generic/obj/SHARED_LIBRARIES/libbt-utils_intermediates/export_includes
Export includes file: external/bluetooth/bluedroid/gki/Android.mk -- out/target/product/generic/obj/STATIC_LIBRARIES/libbt-brcm_gki_intermediates/export_includes
Export includes file: external/bluetooth/bluedroid/bta/Android.mk -- out/target/product/generic/obj/STATIC_LIBRARIES/libbt-brcm_bta_intermediates/export_includes
Export includes file: external/bluetooth/bluedroid/stack/Android.mk -- out/target/product/generic/obj/STATIC_LIBRARIES/libbt-brcm_stack_intermediates/export_includes Import includes file: out/target/product/generic/obj/SHARED_LIBRARIES/bluetooth.default_intermediates/import_includes target thumb C++: bluetooth.default <= external/bluetooth/bluedroid/main/../btif/src/btif_config_util.cpp target thumb C: bluetooth.default <= external/bluetooth/bluedroid/main/../btif/src/bluetooth.c external/bluetooth/bluedroid/main/../btif/src/bluetooth.c:415:1: error: missing initializer [-Werror=missing-field-initializers] external/bluetooth/bluedroid/main/../btif/src/bluetooth.c:415:1: error: (near initialization for 'bluetoothInterface.enter_headless_mode') [-Werror=missing-field-initializers] cc1: all warnings being treated as errors make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/bluetooth.default_intermediates/../btif/src/bluetooth.o] 错误 1
复制代码

  最后找到原因的我眼泪掉下来....

  居然是因为在编译android的之前没有source build/env...  >>>  lunch!!!我的天,还是要细心细心

《!-------------------20180516-----------------------------》
Android 编译:
Kconfig Setting :"ov5648_mipi_raw imx214_mipi_raw ov5648sub_mipi_raw imx278_mipi_raw gc5025_mipi_raw "
ProjectConfig Setting:"imx214_mipi_raw ov5648_mipi_raw ov5648sub_mipi_raw imx278_mipi_raw gc5025_mipi_raw "
***String ERROR***CONFIG_CUSTOM_KERNEL_IMGSENSOR not sync with CUSTOM_KERNEL_IMGSENSOR in ProjectConfig.mk
解决方法:
device/newmobi/newmobi6753_66t_v_l1/ProjectConfig.mk 的CUSTOM_KERNEL_IMGSENSOR = 顺序和
kernel-3.10/arch/arm64/configs/newmobi6753_66t_v_l1_debug_defconfig 的CONFIG_CUSTOM_KERNEL_IMGSENSOR=顺序和
kernel-3.10/arch/arm64/configs/newmobi6753_66t_v_l1_defconfig的CONFIG_CUSTOM_KERNEL_IMGSENSOR=顺序一致
(TARGET_PRODUCT=full_newmobi6753_66t_v_l1   newmobi6753_66t_v_l1 是编译的项目名)


《!-------------------20180517-----------------------------》

Android 编译:

/root/I7_new/XY3501_l1/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/../lib/gcc/x86_64-linux/4.6/../../../../x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/STATIC_LIBRARIES/libcompiler_rt_intermediates/libcompiler_rt.a(eprintf.o): unsupported reloc 43 against global symbol stderr
external/compiler-rt/lib/builtins/eprintf.c:32: error: unsupported reloc 43
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj32/lib/libcompiler_rt.so] Error 1
make: *** Waiting for unfinished jobs....


#### make failed to build some targets (02:06:23 (hh:mm:ss)) ####

 解决:
  1.art/build/Android.common_build.mk中把true改为false

# Host.
ART_HOST_CLANG := false
ifneq ($(WITHOUT_HOST_CLANG),false)          #ture--->false
# By default, host builds use clang for better warnings.
ART_HOST_CLANG := ture
endif

  2.执行命令,更改链接指向

ln -sf /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld

  原因:http://forum.xda-developers.com/chef-central/android/guide-how-to-setup-ubuntu-16-04-lts-t3363669/page2    的15楼  && 19楼


猜你喜欢

转载自blog.csdn.net/qingcai_yuanzi/article/details/80346135