ubuntu17.04编译Tiny4412 Android5.0源代码

简介: 跟着ubuntu12.04一样,我解开了4412的Android5.0源代码。因为前面这篇文章已经安装了一些开发环境,所以这里不再哆嗦。还是和这篇文章一样的:http://blog.csdn.

跟着ubuntu12.04一样,我解开了4412的Android5.0源代码。

因为前面这篇文章已经安装了一些开发环境,所以这里不再哆嗦。

还是和这篇文章一样的:

http://blog.csdn.net/morixinguan/article/details/70190518

遇到下面这个错误:

这里写图片描述

那么,这次就有经验了,直接用下面这个解决方法:

clang编辑器的问题,在art/build/Android.common_build.mk 中将host 默认编辑器使用clang关掉,找到WITHOUT_HOST_CLANG

关闭clang:

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

本以为平安无事,既然Android6.0都编译通过了,5.0应该是没问题的,没想到的事,接下来报了下面的这个错误:

我去,感觉神坑,为什么ubuntu17.04没有做到上下兼容:

最开始是遇到下面这个错误:

libnativehelper/JniConstants.cpp:103: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:104: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:105: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:106: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:107: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:108: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:109: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:110: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:111: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:112: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:113: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:114: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:115: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:116: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:117: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:118: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:119: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:120: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:121: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:122: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:123: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:124: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:125: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:126: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:127: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:128: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:129: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:130: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:131: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:132: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:133: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:134: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:135: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:136: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:137: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:138: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:139: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:140: error: unsupported reloc 43
libnativehelper/toStringArray.cpp:21: error: unsupported reloc 43
libnativehelper/toStringArray.cpp:21: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:40: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:45: 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
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
host C++: libc++ <= external/libcxx/src/algorithm.cpp
host C++: libc++ <= external/libcxx/src/bind.cpp
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
make: *** 正在等待未完成的任务....
于是找到解决方法:

cp /usr/bin/ld.gold   <source_android>/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld 
然后make update-api,在make

解决地址:http://blog.csdn.net/u014770862/article/details/52624851

本以为平安无事,结果,又出现了下面的错误:


于是又找到对于的解决方法:

也就是下面这个帖子:

http://stackoverflow.com/questions/35134193/make-aosp-out-host-linux-x86-obj-lib-libc-so-error-1-when-building-cya

 

I'm trying to build Cyanogenmod 12.1 for a device for which there already exist nightlies (hlte - Samsung Galaxy Note 3), but am encountering some problems building.

I'm using a Ubuntu 14.04-based Docker container (Dockerfile at https://github.com/jameshiew/docker-aosp-builder/blob/a3fef049e9963db42a9168207d590a82638181b7/Dockerfile) - I've tried to match the environment as described at https://source.android.com/source/initializing.html as closely as possible.

The first thing I did was do repo init -u https://github.com/CyanogenMod/android.git -b cm-12.1 in a blank directory then repo sync which all checked out fine.

Then I did breakfast cm_hlte-userdebug (to check out repos relevant to my device) then added <project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" /> to a local manifest and repo synced again to get propietary blobs for my device.

I then did lunch cm_hlte-userdebug && mka but kept getting odd errors of the sort libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43 thrown about.

After looking at this discussion on Cyanogenmod's gerrit by people having the same problem - http://review.cyanogenmod.org/#/c/120824/ - and another discussion on Debian's bug tracker - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808206), I did make clean, cleared the ccache and tried WITHOUT_HOST_CLANG=true mka. The build progressed further (no more unsupported reloc errors) but now (in separate two runs) it is stopping at the same point (error output below).

The main error is:

prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/aosp/out/host/linux-x86/obj/lib/libc++.so] Error 1

Fuller output:

Install: /aosp/out/host/linux-x86/lib/libc++.so
...
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_handlers.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(exception.o): multiple definition of 'std::unexpected()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_handlers.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_alloc::what() const'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_length::what() const'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_new_length::what() const'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_alloc::~bad_alloc()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_length::~bad_array_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_new_length::~bad_array_new_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_length::~bad_array_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_length::~bad_array_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_new_length::~bad_array_new_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_new_length::~bad_array_new_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_alloc::~bad_alloc()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_alloc::~bad_alloc()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::set_new_handler(void (*)())'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_handlers.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::get_new_handler()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_handlers.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_alloc::bad_alloc()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_alloc::bad_alloc()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_new_length::bad_array_new_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_length::bad_array_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_new_length::bad_array_new_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(new.o): multiple definition of 'std::bad_array_length::bad_array_length()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(cxa_new_delete.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::logic_error::what() const'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::runtime_error::what() const'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::runtime_error::~runtime_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::underflow_error::~underflow_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::underflow_error::~underflow_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::underflow_error::~underflow_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::overflow_error::~overflow_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::overflow_error::~overflow_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::overflow_error::~overflow_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::range_error::~range_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::range_error::~range_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::range_error::~range_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::runtime_error::~runtime_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::runtime_error::~runtime_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::logic_error::~logic_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::out_of_range::~out_of_range()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::out_of_range::~out_of_range()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::out_of_range::~out_of_range()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::length_error::~length_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::length_error::~length_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::length_error::~length_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::invalid_argument::~invalid_argument()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::invalid_argument::~invalid_argument()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::invalid_argument::~invalid_argument()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::domain_error::~domain_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::domain_error::~domain_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::domain_error::~domain_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::logic_error::~logic_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): multiple definition of 'std::logic_error::~logic_error()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(stdexcept.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_cast::what() const'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_typeid::what() const'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_typeid::~bad_typeid()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_typeid::~bad_typeid()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_typeid::~bad_typeid()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_cast::~bad_cast()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_cast::~bad_cast()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_cast::~bad_cast()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_cast::bad_cast()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_typeid::bad_typeid()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_cast::bad_cast()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): multiple definition of 'std::bad_typeid::bad_typeid()'
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: /aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a(typeinfo.o): previous definition here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/aosp/out/host/linux-x86/obj/lib/libc++.so] Error 1
make: *** Waiting for unfinished jobs....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
make: Leaving directory `/aosp'

I have looked around quite a bit but am not sure what the problem might be at this point; whether it's related to the compiler, the checked out code (or lack of), the environment, or something else. Would anyone have some hint at a glance of what the problem might be?

share improve this question
 
后面怎么解决,看开帖子的回复:

You can try this in your android root path:cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld

这次就成功了,哎,太坑。。。。


目录
相关文章
|
3天前
|
Linux 编译器 开发工具
Android内核的编译过程
Android内核的编译过程
|
2天前
|
Ubuntu 编译器 C++
Ubuntu系统下编译OpenCV4.8源码
本文档介绍了在Ubuntu系统下编译和安装OpenCV4.8的简单步骤:首先,通过wget命令下载源码包,然后解压;接着,安装必要的编译器和第三方库支持;最后,在源码目录创建build文件夹,执行cmake和make安装。整个过程包括下载、安装依赖和编译安装三个主要步骤。
17 6
|
3天前
|
移动开发 jenkins 持续交付
jenkins编译H5做的android端编译卫士app记录
jenkins编译H5做的android端编译卫士app记录
|
3天前
|
Android开发
在android源码中编译ADW_Launcher
在android源码中编译ADW_Launcher
10 2
|
3天前
|
Ubuntu Linux 开发工具
建立ubuntu下基于eclipse的android开发环境
建立ubuntu下基于eclipse的android开发环境
|
3天前
|
Ubuntu Android开发
Android Froyo基于32 bit ubuntu 10.10编译问题
Android Froyo基于32 bit ubuntu 10.10编译问题
|
4天前
|
Ubuntu Android开发 数据安全/隐私保护
【Android平板编程】远程Ubuntu服务器Code-Server编程写代码
【Android平板编程】远程Ubuntu服务器Code-Server编程写代码
|
5天前
|
Shell 开发工具 Android开发
android 修改kernel编译版本信息
android 修改kernel编译版本信息
13 0
|
5天前
|
Ubuntu
ubuntu下使用ndk编译libevnet
ubuntu下使用ndk编译libevnet
9 1
|
5天前
|
Ubuntu
ubuntu编译rk3588异常
ubuntu编译rk3588异常
12 0