升级到16.04,adnroid源码不能编译了

其它类软件,非上述版软件
回复
lyxlgr
帖子: 5
注册时间: 2011-05-09 22:22

升级到16.04,adnroid源码不能编译了

#1

帖子 lyxlgr » 2016-04-27 9:11

之前是15.10,编译android源码是成功的,后来更新到16.04,就不能成功编译了,直接安装16.0,也不能成功编译,都是提示这个:
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JniInvocation.o: unsupported reloc 43 against global symbol JniInvocation::jni_invocation_
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JniInvocation.o: unsupported reloc 43 against global symbol JniInvocation::jni_invocation_
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/include/c++/4.6/bits/basic_string.h:270: error: unsupported reloc 43
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/include/c++/4.6/bits/basic_string.h:270: error: unsupported reloc 43
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/include/c++/4.6/bits/basic_string.h:235: error: unsupported reloc 43
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/include/c++/4.6/bits/basic_string.h:235: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:310: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:311: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:332: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:322: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:338: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:89: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:90: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:91: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:92: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:93: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:94: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:95: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:96: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:97: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:98: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:99: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:100: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:101: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:102: error: unsupported reloc 43
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)
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: *** 正在等待未完成的任务....

#### make failed to build some targets (38:23 (mm:ss)) ####

这问题解决不了的话,就不能好好工作,只能打算安装14.04
头像
astolia
论坛版主
帖子: 6570
注册时间: 2008-09-18 13:11

Re: 升级到16.04,adnroid源码不能编译了

#2

帖子 astolia » 2016-04-27 17:35

似乎是prebuilts里的链接器与系统的编译器不兼容
https://stackoverflow.com/questions/360 ... 3/36073635
oska874
帖子: 64
注册时间: 2008-10-05 17:09

Re: 升级到16.04,adnroid源码不能编译了

#3

帖子 oska874 » 2016-05-01 16:59

我的也是,在14.04 上编译相同的android 5.1.1 就可以成功,但是在16.04 上编译就是提示

代码: 全选

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)
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: *** Waiting for unfinished jobs....
已经是正式版了,还是不能编译成功,有没有解决办法?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 升级到16.04,adnroid源码不能编译了

#4

帖子 poloshiao » 2016-05-01 17:17

看看 有沒有幫助
http://forum.xda-developers.com/chef-ce ... s-t3363669
[GUIDE] How to Setup Ubuntu 16.04 LTS Xenial Xerus for Compiling Android ROMs
共 2 頁
yhm2046
帖子: 70
注册时间: 2008-11-20 19:20

Re: 升级到16.04,adnroid源码不能编译了

#5

帖子 yhm2046 » 2016-05-27 17:05

If this issue have been solved? I have got same issue in Ubuntu16.04:

host SharedLib: libcompiler_rt_32 (out/host/linux-x86/obj32/lib/libcompiler_rt.so)
/home/elinksoft/code/8163/alps/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
build/core/host_shared_library_internal.mk:44: recipe for target 'out/host/linux-x86/obj32/lib/libcompiler_rt.so' failed
make: *** [out/host/linux-x86/obj32/lib/libcompiler_rt.so] Error 1
make: *** Waiting for unfinished jobs....
host C++: dalvikvm_32 <= art/dalvikvm/dalvikvm.cc

#### make failed to build some targets (31:47 (mm:ss)) ####
回复