Ubuntu 17.04编译Tiny4412 Android5.0源代码

Ubuntu 17.04编译Tiny4412 Android5.0源代码跟Ubuntu 12.04一样,我解开了4412的Android5.0源代码。因为前面这篇文章已经安装了一些开发环境,所以这里不再哆嗦。

还是和这篇文章一样的:

遇到下面这个错误:

Ubuntu 17.04编译Tiny4412 Android5.0源代码

那么,这次就有经验了,直接用下面这个解决方法:

clang编辑器的问题,在art/build/Android.common_build.mk 中将host 默认编辑器使用clang关掉,找到WITHOUT_HOST_CLANG

关闭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
本以为平安无事,既然Android6.0都编译通过了,5.0应该是没问题的,没想到的事,接下来报了下面的这个错误:
我去,感觉神坑,为什么ubuntu17.04没有做到上下兼容:

最开始是遇到下面这个错误:

libnativehelper/JniConstants.cpp:103: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:104: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:105: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:106: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:107: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:108: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:109: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:110: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:111: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:112: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:113: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:114: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:115: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:116: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:117: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:118: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:119: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:120: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:121: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:122: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:123: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:124: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:125: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:126: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:127: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:128: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:129: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:130: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:131: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:132: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:133: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:134: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:135: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:136: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:137: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:138: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:139: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:140: error: unsupported reloc 43
libnativehelper/toStringArray.cpp:21: error: unsupported reloc 43
libnativehelper/toStringArray.cpp:21: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:40: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:45: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
host C++: libc++ <= external/libcxx/src/algorithm.cpp
host C++: libc++ <= external/libcxx/src/bind.cpp
build/core/host_shared_library_internal.mk:44: recipe for target 'out/host/linux-x86/obj32/lib/libnativehelper.so' failed
make: *** [out/host/linux-x86/obj32/lib/libnativehelper.so] Error 1
make: *** 正在等待未完成的任务....

于是找到解决方法:

cp /usr/bin/ld.gold  <source_android>/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld

然后make update-api,在make

解决地址:

本以为平安无事,结果,又出现了下面的错误:

于是又找到对于的解决方法:

也就是下面这个帖子:

I'm trying to build Cyanogenmod 12.1 for a device for which there already exist nightlies (hlte - Samsung Galaxy Note 3), but am encountering some problems building.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/13881.html