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樓


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章