zoukankan      html  css  js  c++  java
  • 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 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

    这个之后,编译通过。

  • 相关阅读:
    Helvetic Coding Contest 2017 online mirror (teams allowed, unrated) J
    ROS_Kinetic_19 群机器人框架示例(micros swarm framework)
    ROS_Kinetic_18 使用V-Rep3.3.1和Matlab2015b(vrep_ros_bridge)续
    ROS_Kinetic_17 使用V-Rep3.3.1(vrep_ros_bridge)
    USB OTG原理+ ID 检测原理
    高通QSD MSM APQ区别
    qualcomm memory dump 抓取方法
    msm8974 camera driver添加新摄像头kernel hal修改
    现代控制理论-章节组织结构和仿真应用案例详细分析
    ROS_Kinetic_16 ubuntu中安装使用Matlab和ROS
  • 原文地址:https://www.cnblogs.com/blowing-in-the-wind/p/6518076.html
Copyright © 2011-2022 走看看