从源代码构建Android:不支持的重定位43 [英] Building Android from sources: unsupported reloc 43

查看:115
本文介绍了从源代码构建Android:不支持的重定位43的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编译Android 5.1.1时,我会收到许多类似这样的错误:

When I'm compiling Android 5.1.1, I get dozens of errors like this:

...
...
...
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

我尝试构建带有或不带有clang以及使用不同版本的clang的源.但是在较新的分支机构中,需要使用clang,并且make不能没有它就开始.

I've tried building sources with and without clang, and with different versions of clang. But on newer branches, clang is a requirement and make doesn't start without it.

怎么了?

推荐答案

一个人应该应用此补丁以使事情正常运行

One should apply this patch to get the things working https://android-review.googlesource.com/#/c/223100/

在android源代码目录中打开build/core/clang/HOST_x86_common.mk文件添加这些行. core/clang/HOST_x86_common.mk"rel =" noreferrer>链接

Open build/core/clang/HOST_x86_common.mk file in your android source code directory with some editor add these lines, as mentioned in this link

对于Android Lollipop或更早的版本,请确保在应用此补丁时保留-no-integrated-as.确保各行的连续性正确(除了最后一行,每行末尾的\).

For Android Lollipop or any earlier version, make sure to keep -no-integrated-as while applying this patch. Make sure the line continuations are proper(\ at the end of each line except the last line).

但是,-no-integrated-as在棉花糖中被删除了.

But, -no-integrated-as is removed in Marshmallow.

这篇关于从源代码构建Android:不支持的重定位43的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆