出现编译失败现象:
trip: libpagemap_32 (out/target/product/xx/obj_arm/lib/libpagemap.so)
target Strip: librilutils_32 (out/target/product/xx/obj_arm/lib/librilutils.so)target Strip: libtinyxml_32 (out/target/product/xx/obj_arm/lib/libtinyxml.so)
clang: error: linker command Failed with exit code 1 (use -v to see invocation)
drivers/soc/qcom/Kconfig:310:warning: choice value used outside its choice group
drivers/soc/qcom/Kconfig:315:warning: choice value used outside its choice group
#
# configuration written to .config
make[2]: Leaving directory '/home/xx/xx/6.0/android/xx/out/target/product/xx/obj/KERNEL_OBJ'
make[1]: Leaving directory '/home/xx/xx/6.0/android/xx/kernel'
make[1]: Entering directory '/home/xx/xx/6.0/android/xx/kernel'
make[2]: Entering directory '/home/xx/xx/6.0/android/xx/out/target/product/xx/obj/KERNEL_OBJ'
build/core/host_shared_library_internal.mk:51: recipe for target 'out/host/linux-x86/obj/lib/libart.so' Failed
make: *** [out/host/linux-x86/obj/lib/libart.so] Error 1
原因:
ubuntu16.04 clang编译器导致的问题,在ubuntu14.04上正常,
解决方案:
步骤一:
关闭clang,修改art/build/Android.common_build.mk,中将host 默认编辑器使用clang关掉,找到WITHOUT_HOST_CLANG
修改如下
# Host.
ART_HOST_CLANG := false
ifneq ($(WITHOUT_HOST_CLANG),true)
# By default,host builds use clang for better warnings.
endif
步骤二:
sudo apt-get install git-core gnupg flex bison gperf build-essentialzip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386lib32ncurses5-dev x11proto-core libx11 lib32z ccache libgl1-mesa libxml2-utils xsltproc unzip m4 && sudo apt-get update
步骤三:
不用clean继续开始编译
参考资料:http://blog.csdn.net/fuchaosz/article/details/51487585
原文链接:https://www.f2er.com/ubuntu/354733.html