2016-08-10 22 views
2

私はUbuntu 16.04を実行しているIntel i5マシンのソースからAndroid 5.1.1_r38をビルドしようとしています。ソースからAndroid 5.1.1をビルドする - コンパイルエラー

Nexus 6のバイナリを追加し、端末で「ランチ」を実行した後でそのオプションを選択しました。時間ほどランニングした後

、私に次のエラー

external/chromium_org/third_party/yasm/source/patched-yasm/tools/genmacro/genmacro.c:90: error: unsupported reloc 43 

    external/chromium_org/third_party/yasm/source/patched-yasm/tools/genmacro/genmacro.c:48: error: unsupported reloc 43 

    external/chromium_org/third_party/yasm/source/patched-yasm/tools/genmacro/genmacro.c:55: error: unsupported reloc 43 

    external/chromium_org/third_party/yasm/source/patched-yasm/tools/genmacro/genmacro.c:68: error: unsupported reloc 43 

    clang: error: linker command failed with exit code 1 (use -v to see invocation) 

    build/core/host_executable_internal.mk:31: recipe for target 'out/host/linux-x86/obj32/EXECUTABLES/third_party_yasm_genmacro_x86_host_gyp_intermediates/genmacro' failed 

    make: *** [out/host/linux-x86/obj32/EXECUTABLES/third_party_yasm_genmacro_x86_host_gyp_intermediates/genmacro] Error 1 

    make: *** Waiting for unfinished jobs.... 

    prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/EXECUTABLES/third_party_yasm_genmodule_x86_host_gyp_intermediates/third_party/yasm/source/patched-yasm/libyasm/genmodule.o: unsupported reloc 43 against global symbol stderr 

    prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/EXECUTABLES/third_party_yasm_genmodule_x86_host_gyp_intermediates/third_party/yasm/source/patched-yasm/libyasm/genmodule.o: unsupported reloc 43 against global symbol stderr 

    prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/EXECUTABLES/third_party_yasm_genmodule_x86_host_gyp_intermediates/third_party/yasm/source/patched-yasm/libyasm/genmodule.o: unsupported reloc 43 against global symbol stderr 

    prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/EXECUTABLES/third_party_yasm_genmodule_x86_host_gyp_intermediates/third_party/yasm/source/patched-yasm/libyasm/genmodule.o: unsupported reloc 43 against global symbol stderr 

    external/chromium_org/third_party/yasm/source/patched-yasm/libyasm/genmodule.c:87: error: unsupported reloc 43 

    external/chromium_org/third_party/yasm/source/patched-yasm/libyasm/genmodule.c:63: error: unsupported reloc 43 

    external/chromium_org/third_party/yasm/source/patched-yasm/libyasm/genmodule.c:174: error: unsupported reloc 43 

    external/chromium_org/third_party/yasm/source/patched-yasm/libyasm/genmodule.c:183: error: unsupported reloc 43 

    host StaticLib: third_party_yasm_genperf_libs_x86_host_gyp_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/third_party_yasm_genperf_libs_x86_host_gyp_intermediates/third_party_yasm_genperf_libs_x86_host_gyp.a) 

    clang: error: linker command failed with exit code 1 (use -v to see invocation) 


    build/core/host_executable_internal.mk:31: recipe for target 'out/host/linux-x86/obj32/EXECUTABLES/third_party_yasm_genmodule_x86_host_gyp_intermediates/genmodule' failed 


    make: *** [out/host/linux-x86/obj32/EXECUTABLES/third_party_yasm_genmodule_x86_host_gyp_intermediates/genmodule] Error 1 

を与えた場合、私はのapt-get updateを実行し、クロバー作り、他の何かが、私は注意して(と考えることができました。私はと非常に新たなんですUbuntuの)

答えて

1

は、次のように変更を適用してみてください。

WORKING_DIRECTORY$ repo diff 
project build/ 
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 := \ 

も参照してください: https://groups.google.com/forum/#!topic/android-building/op5ZbyEfakE

0

私はHost_x86_common.mkを変更しますが、問題は残ります。最後に

、私はこのようなart/build/Android.common_build.mkを、変更します。

# Clang build support. 

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

は幸い、これは私がエラーを修正するのに役立ちます。

私が使ったこのヒントは、15th floor

です
関連する問題