红联Linux门户
Linux帮助

make: *** [out/host/linux-x86/obj32/lib/libartd.so] Error 1

发布时间:2017-02-03 10:11:34来源:linux网站作者:alex哈哈
ubuntu16.04编译android6.0出现编译失败现象:
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.
ART_HOST_CLANG := false
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-dev
libx11-dev lib32z-dev
ccache libgl1-mesa-dev
libxml2-utils
xsltproc unzip m4 && sudo apt-get update
步骤三:
不用clean继续开始编译
 
本文永久更新地址:http://www.linuxdiyf.com/linux/28118.html