打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Ubuntu16 编译源码出错 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 43prebuilts/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 43prebuilts/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 43prebuilts/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 43libnativehelper/JNIHelp.cpp:310: error: unsupported reloc 43libnativehelper/JNIHelp.cpp:311: error: unsupported reloc 43libnativehelper/JNIHelp.cpp:332: error: unsupported reloc 43libnativehelper/JNIHelp.cpp:322: error: unsupported reloc 43libnativehelper/JNIHelp.cpp:338: error: unsupported reloc 43libnativehelper/JniConstants.cpp:89: error: unsupported reloc 43libnativehelper/JniConstants.cpp:90: error: unsupported reloc 43

 

解决方法(一)

修改 build/core/clang/HOST_x86_common.mk

diff --git a/core/clang/HOST_x86_common.mk b/core/clang/HOST_x86_common.mkindex 0241cb6..77547b7 100644--- a/core/clang/HOST_x86_common.mk+++ b/core/clang/HOST_x86_common.mk@@ -8,6 +8,7 @@ ifeq ($(HOST_OS),linux) CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS :=    --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)    --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot +  -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin    -no-integrated-as  CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS := \  

 但是对我而言 错误仍在

 

解决方法(二)

修改 art/build/Android.common_build.mk

# Host.ART_HOST_CLANG := falseifneq ($(WITHOUT_HOST_CLANG),true)  # By default, host builds use clang for better warnings.  ART_HOST_CLANG := trueendif

改为

# Host.ART_HOST_CLANG := falseifeq ($(WITHOUT_HOST_CLANG),false)  # By default, host builds use clang for better warnings.  ART_HOST_CLANG := trueendif

仍然不起作用

 

解决方法(三)

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

这个之后,编译通过。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
iTOP-RK3568开发板Android kernel移植-单独编译内核
GLIBC库交叉编译
linux centos 7 安装Mysql5.7.25数据库步骤
bazel remote executor--- buildfarm
iOS 警告收录及科学快速的消除方法
docker镜像选型
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服