错误如下

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

解决方法(一)

修改 build/core/clang/HOST_x86_common.mk

diff --git a/core/clang/HOST_x86_common.mk b/core/clang/HOST_x86_common.mk index 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 := false ifneq ($(WITHOUT_HOST_CLANG),true)   # By default, host builds use clang for better warnings.   ART_HOST_CLANG := true endif

改为

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

仍然不起作用

解决方法(三)

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

这个之后,编译通过。

Ubuntu16 编译源码出错 unsupported reloc 43的更多相关文章

  1. Ubuntu16 编译源码安装MXNet 可变卷积Deformable-ConvNets GPU版

    [引言]最近接手了公司的关于虫子识别的项目,使用MXNet框架开发,但是实际用的是Deformable-ConvNets. Deformable-ConvNets为微软研究研究院提出的可变卷积网络,可 ...

  2. 【流媒体开发】VLC Media Player - Android 平台源码编译 与 二次开发详解 (提供详细800M下载好的编译源码及eclipse可调试播放器源码下载)

    作者 : 韩曙亮  博客地址 : http://blog.csdn.net/shulianghan/article/details/42707293 转载请注明出处 : http://blog.csd ...

  3. error: unsupported reloc 43

    在Ubuntu 16.04.5 LTS编译android 5.1报错 [19:17:13.062]libnativehelper/JniInvocation.cpp:165: error: unsup ...

  4. LINUX下编译源码时所需提前安装的常用依赖包列表

    yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-deve ...

  5. Ubuntu编译源码程序依赖查找方法

    ubuntu平时编译源码程序的时候会提示缺少相关的库或是头文件,可以按照以下两种方法进行查找,然后再安装相应的软件包. 1.使用apt-file查找头文件 安装apt-file sudo apt-ge ...

  6. ubuntu配置android开发环境和编译源码遇到的一些问题

    ---------------------------------------------环境变量设置--------------------------------------------- 1.设 ...

  7. Centos7服务器中通过编译源码安装MySQL

    基于在Centos7服务器上使用 yum 安装MySQL5.7到默认路径 在修改文件存储位置的时候,折腾了一番没有将成功将datadir修改为我想要的位置 我决定再尝试一下通过编译源码来自定义安装: ...

  8. 通过清华大学镜像下载Android源码并编译源码

    之前看源码都是在Windows下用SourceInsight看,虽然达到了研究源码的效果,但终究还是有遗憾...趁着周末,准备在Ubuntu虚拟机上下载编译源码. 之前下源码时,有了解一些Androi ...

  9. Ubuntu下Ruby的下载和编译源码安装

    1.Ruby的下载 Ruby可以在Ruby 官网上下载,如果想获取更多的Ruby版本,可以到淘宝镜像网站下载. 2.Ruby的编译源码安装 解压 首先把下载下来的源码压缩包解压到自己指定的目录 编译安 ...

随机推荐

  1. ARC中__weak;__strong;__unsafe_unretained;修饰词

    测试代码: // Human.h代码 @interface Human : NSObject @property (nonatomic, weak) Cat *pinkCat; @property ( ...

  2. VueJS坎坷之路111---_self.$scopedSlots.default is not a function

    VueJs + Element 话不多说,直接贴错: _self.$scopedSlots.default is not a function <el-table stripe border r ...

  3. 【转】MFC编辑框自动换行,垂直滚动条自动下移

    1.新建一个编辑框控件(Edit Control),将其多行(Multiline)前面打勾(属性设置为True),Auto HScroll前面的勾去掉(属性设置False),这样就可以实现每一行填满后 ...

  4. mysql关联查询

    mysql数据库的统计------生成统计信息 1.distinct:在一组之中将各个唯一的值找出来,如找出所有的品牌种类 mysql>select distinct brand_kind fr ...

  5. Linux下打包解压命令

    tar 压缩: tar -cvjpf etc.tar.bz2 /etc //-c为创建一个打包文件,相应的-f后面接创建的文件的名称,使用了.tar.bz2后缀,-j标志使用bzip2压缩,最后面为具 ...

  6. CSS清除浮动8大方法

    CSS清除浮动是每一位web前端工程师都要掌握的技术,也是让每一位刚入门的前端工程师感到头疼的问题, 下面就来讲一下CSS清除浮动的原理和各种解决方法,大家可以根据实际情况选择最佳的解决方案. 在用D ...

  7. BZOJ 4919: [Lydsy1706月赛]大根堆

    F[x][i]表示x的子树中取的数字<=i的最大值,线段树合并优化DP 写得很难看,并不知道好看的写法 #include<cstdio> #include<algorithm& ...

  8. Python虚拟机之异常控制流(四)

    Python虚拟机中的异常控制流 先前,我们分别介绍了Python虚拟机之if控制流(一).Python虚拟机之for循环控制流(二)和Python虚拟机之while循环控制结构(三).这一章,我们来 ...

  9. JAVA 基础--开发环境 vscode 搭建

    对于使用 Visual Studio Code 的 Java 开发者来说,Language Support for Java(TM) by Red Hat 扩展提供了非常好的语言特性支持,比如智能感知 ...

  10. 修改Echarts 图表的坐标轴的文本的排列位置

    option.xAxis.axisLabel['interval'] = 0 option.xAxis.axisLabel['formatter'] = function(value,index){ ...