从源代码构建android时出错

时间:2014-04-23 03:00:05

标签: android

我试图在Mac OSX版本10.9.2上从源代码构建Android。在这个过程中,我遇到了很多错误,但到目前为止我已经修好了,我真的卡住了,并且不知道该怎么做。

我安装的软件包是:

Xcode version 5.0.2, Python 2.7.5, and Java 1.7

这些是我用来构建它的命令:

source build/envsetup.sh
lunch aosp_arm-eng
make -j4

以下是我遇到的错误。任何帮助将不胜感激。

ake: external/qemu/android/base/containers/PodVector.h:19:20:*** Waiting for unfinished jobs.... 
error: stdint.h: No such file or directory
In file included from external/qemu/android/base/containers/StringVector.h:15,
                 from external/qemu/android/base/files/PathUtils.h:15,
                 from external/qemu/android/base/files/PathUtils.cpp:12:
external/qemu/android/base/containers/PodVector.h:19:20: error: stdint.h: No such file or directory
In file included from external/qemu/android/base/containers/StringVector.h:17,
                 from external/qemu/android/base/containers/StringVector.cpp:12:
external/qemu/android/base/StringView.h:15:20:In file included from external/qemu/android/base/containers/PodVector.cpp:15 :
error: external/qemu/android/base/memory/MallocUsableSize.h:30:29: string.h: No such file or directory
error: malloc/malloc.h: No such file or directory
external/qemu/android/base/containers/StringVector.cpp:16:19: error: stdio.h: No such file or directory
In file included from external/qemu/android/base/containers/StringVector.h:17,
                 from external/qemu/android/base/files/PathUtils.h:15,
                 from external/qemu/android/base/files/PathUtils.cpp:12:
external/qemu/android/base/StringView.h:15:20: error: string.h: No such file or directory
external/qemu/android/base/containers/PodVector.cpp:17:20: error: stdlib.h: No such file or directory
external/qemu/android/base/containers/PodVector.cpp:18:20: error: string.h: No such file or directory
external/qemu/android/base/Log.cpp: In function ‘void android::base::<unnamed>::defaultLogMessage(const android::base::LogParams&, const char*, size_t)’:
external/qemu/android/base/Log.cpp:45: error: ‘stderr’ was not declared in this scope
external/qemu/android/base/Log.cpp:51: error: ‘fprintf’ was not declared in this scope
external/qemu/android/base/Log.cpp:58: error: ‘fflush’ was not declared in this scope
external/qemu/android/base/Log.cpp:61: error: ‘exit’ was not declared in this scopeIn file included from external/qemu/android/base/containers/StringVector.h:15,
                 from external/qemu/android/base/files/PathUtils.h:15,
                 from external/qemu/android/base/files/PathUtils.cpp:12:
external/qemu/android/base/containers/PodVector.h: In member function ‘void* android::base::PodVectorBase::itemAt(size_t, size_t)’:
external/qemu/android/base/containers/PodVector.h:62: error: ‘SIZE_MAX’ was not declared in this scope

In file included from external/qemu/android/base/containers/PodVector.cpp:12:
external/qemu/android/base/containers/PodVector.h: In member function ‘void* android::base::PodVectorBase::itemAt(size_t, size_t)’:
external/qemu/android/base/containers/PodVector.h:62: error: ‘SIZE_MAX’ was not declared in this scope
In file included from external/qemu/android/base/containers/StringVector.h:15,
                 from external/qemu/android/base/containers/StringVector.cpp:12:
external/qemu/android/base/containers/PodVector.h: In member function ‘void* android::base::PodVectorBase::itemAt(size_t, size_t)’:
external/qemu/android/base/containers/PodVector.h:62: error: ‘SIZE_MAX’ was not declared in this scope
host C++: emulator-common <= external/qemu/android/base/StringView.cpp
external/qemu/android/base/containers/PodVector.h: In member function ‘const void* android::base::PodVectorBase::itemAt(size_t, size_t) const’:
external/qemu/android/base/containers/PodVector.h:68: error: ‘SIZE_MAX’ was not declared in this scope
external/qemu/android/base/containers/PodVector.h: In member function ‘const void* android::base::PodVectorBase::itemAt(size_t, size_t) const’:
external/qemu/android/base/containers/PodVector.h:68: error: ‘SIZE_MAX’ was not declared in this scope
external/qemu/android/base/Log.cpp: In constructor ‘android::base::LogString::LogString(const char*, ...)’:
external/qemu/android/base/Log.cpp:98: error: ‘::malloc’ has not been declared
external/qemu/android/base/containers/PodVector.h: In member function ‘const void* android::base::PodVectorBase::itemAt(size_t, size_t) const’:
external/qemu/android/base/containers/PodVector.h:68: error: ‘SIZE_MAX’ was not declared in this scope
external/qemu/android/base/Log.cpp:102: error: ‘vsnprintf’ was not declared in this scope
external/qemu/android/base/Log.cpp: In destructor ‘android::base::LogString::~LogString()’:
external/qemu/android/base/Log.cpp:112: error: ‘::free’ has not been declared
external/qemu/android/base/Log.cpp: In destructor ‘android::base::LogStream::~LogStream()’:
external/qemu/android/base/Log.cpp:126: error: ‘::free’ has not been declared
external/qemu/android/base/containers/PodVector.h: In member function ‘size_t android::base::PodVectorBase::maxItemCapacity(size_t) const’:
external/qemu/android/base/containers/PodVector.h:87: error: ‘SIZE_MAX’ was not declared in this scope
external/qemu/android/base/Log.cpp: In member function ‘android::base::LogStream& android::base::LogStream::operator<<(char)’:
external/qemu/android/base/Log.cpp:134: error: ‘snprintf’ was not declared in this scope
external/qemu/android/base/containers/PodVector.h: In member function ‘size_t android::base::PodVectorBase::maxItemCapacity(size_t) const’:
external/qemu/android/base/containers/PodVector.h:87: error: ‘SIZE_MAX’ was not declared in this scopeexternal/qemu/android/base/containers/PodVector.h: In member function ‘size_t android::base::PodVectorBase::maxItemCapacity(size_t) const’:
external/qemu/android/base/containers/PodVector.h:87: error: ‘SIZE_MAX’ was not declared in this scope

external/qemu/android/base/Log.cpp: In member function ‘android::base::LogStream& android::base::LogStream::operator<<(const void*)’:
external/qemu/android/base/Log.cpp:142: error: ‘snprintf’ was not declared in this scope
external/qemu/android/base/containers/PodVector.h: In static member function ‘static size_t android::base::PodVector<T>::maxCapacity()’:
external/qemu/android/base/containers/PodVector.h:150: error: ‘SIZE_MAX’ was not declared in this scope
external/qemu/android/base/Log.cpp: In member function ‘android::base::LogStream& android::base::LogStream::operator<<(int)’:
external/qemu/android/base/Log.cpp:149: error: ‘snprintf’ was not declared in this scope
external/qemu/android/base/Log.cpp: In member function ‘android::base::LogStream& android::base::LogStream::operator<<(unsigned int)’:
external/qemu/android/base/Log.cpp:156: error: ‘snprintf’ was not declared in this scope
external/qemu/android/base/Log.cpp: In member function ‘android::base::LogStream& android::base::LogStream::operator<<(long int)’:
external/qemu/android/base/Log.cpp:163: error: ‘snprintf’ was not declared in this scopeexternal/qemu/android/base/containers/PodVector.h: In static member function ‘static size_t android::base::PodVector<T>::maxCapacity()’:
external/qemu/android/base/containers/PodVector.h:150: error: ‘SIZE_MAX’ was not declared in this scope

external/qemu/android/base/containers/PodVector.h: In static member function ‘static size_t android::base::PodVector<T>::maxCapacity()’:
external/qemu/android/base/containers/PodVector.h:150: error: ‘SIZE_MAX’ was not declared in this scope
external/qemu/android/base/Log.cpp: In member function ‘android::base::LogStream& android::base::LogStream::operator<<(long unsigned int)’:
external/qemu/android/base/Log.cpp:170: error: ‘snprintf’ was not declared in this scope
external/qemu/android/base/Log.cpp: In member function ‘android::base::LogStream& android::base::LogStream::operator<<(long long int)’:
external/qemu/android/base/Log.cpp:177: error: ‘snprintf’ was not declared in this scope
external/qemu/android/base/Log.cpp: In member function ‘android::base::LogStream& android::base::LogStream::operator<<(long long unsigned int)’:
external/qemu/android/base/Log.cpp:184: error: ‘snprintf’ was not declared in this scope
external/qemu/android/base/Log.cpp: In member function ‘void android::base::LogStream::append(const char*)’:
external/qemu/android/base/Log.cpp:191: error: ‘strlen’ was not declared in this scope
external/qemu/android/base/Log.cpp: In member function ‘void android::base::LogStream::append(const char*, size_t)’:
external/qemu/android/base/Log.cpp:195: error: ‘INT32_MAX’ was not declared in this scope
external/qemu/android/base/containers/PodVector.cpp: In destructor ‘android::base::PodVectorBase::~PodVectorBase()’:
external/qemu/android/base/containers/PodVector.cpp:41: error: ‘::memset’ has not been declared
external/qemu/android/base/containers/PodVector.cpp:42: error: ‘::free’ has not been declared
external/qemu/android/base/Log.cpp:204: error: ‘::realloc’ has not been declared
external/qemu/android/base/Log.cpp:207: error: ‘::memcpy’ has not been declared
external/qemu/android/base/containers/PodVector.cpp: In member function ‘void android::base::PodVectorBase::initFrom(const void*, size_t)’:
external/qemu/android/base/containers/PodVector.cpp:55: error: ‘::malloc’ has not been declared
external/qemu/android/base/containers/PodVector.cpp:56: error: ‘errno’ was not declared in this scope
external/qemu/android/base/containers/PodVector.cpp:59: error: ‘::memcpy’ has not been declared
external/qemu/android/base/containers/PodVector.cpp: In member function ‘void android::base::PodVectorBase::assignFrom(const android::base::PodVectorBase&)’:
external/qemu/android/base/containers/PodVector.cpp:65: error: ‘::memmove’ has not been declared
external/qemu/android/base/Log.cpp: In destructor ‘android::base::ErrnoLogMessage::~ErrnoLogMessage()’:
external/qemu/android/base/Log.cpp:235: error: ‘strerror’ was not declared in this scope
external/qemu/android/base/Log.cpp:241: error: ‘errno’ was not declared in this scope
external/qemu/android/base/containers/PodVector.cpp: In member function ‘void android::base::PodVectorBase::reserve(size_t, size_t)’:
external/qemu/android/base/containers/PodVector.cpp:106: error: ‘::free’ has not been declared
external/qemu/android/base/containers/PodVector.cpp:115: error: ‘::realloc’ has not been declared
external/qemu/android/base/containers/PodVector.cpp:116: error: ‘errno’ was not declared in this scopeIn file included from external/qemu/android/base/containers/StringVector.h:17,
                 from external/qemu/android/base/files/PathUtils.h:15,
                 from external/qemu/android/base/files/PathUtils.cpp:12:
external/qemu/android/base/StringView.h: In constructor ‘android::base::StringView::StringView(const char*)’:
external/qemu/android/base/StringView.h:72: error: ‘strlen’ was not declared in this scope

external/qemu/android/base/containers/PodVector.cpp:125: error: ‘malloc_size’ was not declared in this scope
external/qemu/android/base/containers/PodVector.cpp:133: error: ‘::memset’ has not been declared
In file included from external/qemu/android/base/containers/StringVector.h:17,
                 from external/qemu/android/base/containers/StringVector.cpp:12:
external/qemu/android/base/StringView.h: In constructor ‘android::base::StringView::StringView(const char*)’:
external/qemu/android/base/StringView.h:72: error: ‘strlen’ was not declared in this scope
external/qemu/android/base/StringView.h: In member function ‘void android::base::StringView::set(const char*)’:
external/qemu/android/base/StringView.h:106: error: ‘::strlen’ has not been declared
external/qemu/android/base/containers/PodVector.cpp: In member function ‘void android::base::PodVectorBase::removeAt(size_t, size_t)’:
external/qemu/android/base/containers/PodVector.cpp:142: error: ‘::memmove’ has not been declared
external/qemu/android/base/StringView.h: In member function ‘void android::base::StringView::set(const char*)’:
external/qemu/android/base/StringView.h:106: error: ‘::strlen’ has not been declaredexternal/qemu/android/base/containers/PodVector.cpp: In member function ‘void* android::base::PodVectorBase::insertAt(size_t, size_t)’:
external/qemu/android/base/containers/PodVector.cpp:155: error: ‘::memmove’ has not been declared

external/qemu/android/base/containers/PodVector.cpp:159: error: ‘::memset’ has not been declared
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/emulator-common_intermediates/android/base/Log.o] Error 1
external/qemu/android/base/files/PathUtils.cpp: In static member function ‘static size_t android::base::PathUtils::rootPrefixSize(const char*, android::base::PathUtils::HostType)’:
external/qemu/android/base/files/PathUtils.cpp:44: error: ‘strncmp’ was not declared in this scope
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/emulator-common_intermediates/android/base/containers/PodVector.o] Error 1
external/qemu/android/base/containers/StringVector.cpp: In member function ‘android::base::String* android::base::StringVector::emplace(size_t)’:
external/qemu/android/base/containers/StringVector.cpp:82: error: ‘::memset’ has not been declared
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/emulator-common_intermediates/android/base/files/PathUtils.o] Error 1
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/emulator-common_intermediates/android/base/containers/StringVector.o] Error 1
In file included from external/qemu/android/base/String.cpp:14:
external/qemu/android/base/Limits.h:25:22: error: inttypes.h: No such file or directory
external/qemu/android/base/Limits.h:28:2: warning: #warning "<inttypes.h> has been included before this header."
external/qemu/android/base/Limits.h:29:2: warning: #warning "This prevents the definition of useful macros."
external/qemu/android/base/Limits.h:30:2: error: #error "Please include <android/base/Limits.h> first!"
In file included from external/qemu/android/base/String.cpp:15:
external/qemu/android/base/Log.h:15:19: error: errno.h: No such file or directory
In file included from external/qemu/android/base/String.cpp:16:
external/qemu/android/base/memory/MallocUsableSize.h:24:20: error: stdint.h: No such file or directory
external/qemu/android/base/memory/MallocUsableSize.h:30:29: error: malloc/malloc.h: No such file or directory
In file included from external/qemu/android/base/String.cpp:17:
external/qemu/android/base/StringView.h:15:20: error: string.h: No such file or directory
In file included from external/qemu/android/base/String.cpp:19:
prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1/lib/gcc/i686-apple-darwin11/4.2.1/include/limits.h:10:25: error: limits.h: No such file or directory
external/qemu/android/base/String.cpp:20:20: error: stdlib.h: No such file or directory
In file included from external/qemu/android/base/StringView.cpp:12:
external/qemu/android/base/StringView.h:15:20: error: string.h: No such file or directory
In file included from external/qemu/android/base/String.cpp:17:
external/qemu/android/base/StringView.h: In constructor ‘android::base::StringView::StringView(const char*)’:
external/qemu/android/base/StringView.h:72: error: ‘strlen’ was not declared in this scope
external/qemu/android/base/StringView.cpp:14:21: error: algorithm: No such file or directory
In file included from external/qemu/android/base/StringView.cpp:12:
external/qemu/android/base/StringView.h:76: error: ‘size_t’ has not been declared
external/qemu/android/base/StringView.h:80: error: ‘size_t’ does not name a type
external/qemu/android/base/StringView.h: In member function ‘void android::base::StringView::set(const char*)’:
external/qemu/android/base/StringView.h:106: error: ‘::strlen’ has not been declaredexternal/qemu/android/base/StringView.h:95: error: ‘size_t’ has not been declared

external/qemu/android/base/StringView.h:99: error: ‘size_t’ has not been declared
external/qemu/android/base/StringView.h:124: error: ‘size_t’ does not name a type
external/qemu/android/base/StringView.h: In constructor ‘android::base::StringView::StringView()’:
external/qemu/android/base/StringView.h:65: error: ‘NULL’ was not declared in this scope
external/qemu/android/base/StringView.h:65: error: class ‘android::base::StringView’ does not have any field named ‘mSize’
external/qemu/android/base/StringView.h: In copy constructor ‘android::base::StringView::StringView(const android::base::StringView&)’:
external/qemu/android/base/StringView.h:68: error: class ‘android::base::StringView’ does not have any field named ‘mSize’
external/qemu/android/base/StringView.h:68: error: ‘const class android::base::StringView’ has no member named ‘size’
external/qemu/android/base/StringView.h: In constructor ‘android::base::StringView::StringView(const char*)’:
external/qemu/android/base/StringView.h:72: error: class ‘android::base::StringView’ does not have any field named ‘mSize’
external/qemu/android/base/StringView.h:72: error: ‘strlen’ was not declared in this scope
external/qemu/android/base/String.cpp: In constructor ‘android::base::String::String(const char*)’:
external/qemu/android/base/String.cpp:32: error: ‘::strlen’ has not been declaredexternal/qemu/android/base/StringView.h: In constructor ‘android::base::StringView::StringView(const char*, int)’:
external/qemu/android/base/StringView.h:76: error: class ‘android::base::StringView’ does not have any field named ‘mSize’

external/qemu/android/base/StringView.h: In member function ‘const char* android::base::StringView::end() const’:
external/qemu/android/base/StringView.h:86: error: ‘mSize’ was not declared in this scope
external/qemu/android/base/StringView.h: In member function ‘bool android::base::StringView::empty() const’:
external/qemu/android/base/StringView.h:88: error: ‘size’ was not declared in this scope
external/qemu/android/base/StringView.h: In member function ‘void android::base::StringView::clear()’:
external/qemu/android/base/StringView.h:91: error: ‘mSize’ was not declared in this scope
external/qemu/android/base/StringView.h:92: error: ‘NULL’ was not declared in this scope
external/qemu/android/base/StringView.h: In member function ‘void android::base::StringView::set(const char*, int)’:
external/qemu/android/base/StringView.h:101: error: ‘mSize’ was not declared in this scope
external/qemu/android/base/StringView.h: In member function ‘void android::base::StringView::set(const char*)’:
external/qemu/android/base/StringView.h:106: error: ‘mSize’ was not declared in this scope
external/qemu/android/base/StringView.h:106: error: ‘::strlen’ has not been declared
external/qemu/android/base/StringView.h: In member function ‘void android::base::StringView::set(const android::base::StringView&)’:
external/qemu/android/base/StringView.h:111: error: ‘mSize’ was not declared in this scope
external/qemu/android/base/StringView.h:111: error: ‘const class android::base::StringView’ has no member named ‘mSize’
external/qemu/android/base/String.cpp: In member function ‘android::base::String& android::base::String::assign(const char*)’:
external/qemu/android/base/String.cpp:65: error: ‘::strlen’ has not been declared
external/qemu/android/base/String.cpp: In member function ‘android::base::String& android::base::String::assign(const char*, size_t)’:
external/qemu/android/base/String.cpp:71: error: ‘::memmove’ has not been declared
external/qemu/android/base/StringView.cpp: In member function ‘int android::base::StringView::compare(const android::base::StringView&) const’:
external/qemu/android/base/StringView.cpp:20: error: ‘size_t’ was not declared in this scope
external/qemu/android/base/StringView.cpp:20: error: expected `;' before ‘minSize’
external/qemu/android/base/StringView.cpp:21: error: ‘minSize’ was not declared in this scope
external/qemu/android/base/StringView.cpp:22: error: ‘minSize’ was not declared in this scope
external/qemu/android/base/StringView.cpp:22: error: ‘memcmp’ was not declared in this scope
external/qemu/android/base/String.cpp: In member function ‘android::base::String& android::base::String::assign(size_t, char)’:
external/qemu/android/base/String.cpp:93: error: ‘::memset’ has not been declared
external/qemu/android/base/StringView.cpp:24: error: ‘mSize’ was not declared in this scope
external/qemu/android/base/StringView.cpp:24: error: ‘const class android::base::StringView’ has no member named ‘size’
external/qemu/android/base/StringView.cpp:25: error: ‘mSize’ was not declared in this scope
external/qemu/android/base/StringView.cpp:25: error: ‘const class android::base::StringView’ has no member named ‘size’
external/qemu/android/base/String.cpp: In member function ‘android::base::String& android::base::String::append(const char*, size_t)’:
external/qemu/android/base/String.cpp:101: error: ‘::memmove’ has not been declared
external/qemu/android/base/StringView.cpp: In function ‘bool android::base::operator==(const android::base::StringView&, const android::base::StringView&)’:
external/qemu/android/base/StringView.cpp:30: error: ‘const class android::base::StringView’ has no member named ‘size’
external/qemu/android/base/StringView.cpp:30: error: ‘const class android::base::StringView’ has no member named ‘size’
external/qemu/android/base/StringView.cpp:31: error: ‘const class android::base::StringView’ has no member named ‘size’
external/qemu/android/base/StringView.cpp:31: error: ‘memcmp’ was not declared in this scope
external/qemu/android/base/String.cpp: In member function ‘android::base::String& android::base::String::append(const char*)’:
external/qemu/android/base/String.cpp:107: error: ‘::strlen’ has not been declared
external/qemu/android/base/String.cpp: In member function ‘int android::base::String::compare(const char*, size_t) const’:
external/qemu/android/base/String.cpp:133: error: ‘::strncmp’ has not been declared
external/qemu/android/base/String.cpp: In member function ‘int android::base::String::compare(const char*) const’:
external/qemu/android/base/String.cpp:148: error: ‘::strlen’ has not been declared
external/qemu/android/base/String.cpp: In member function ‘bool android::base::String::equals(const char*, size_t) const’:
external/qemu/android/base/String.cpp:174: error: ‘::memcmp’ has not been declared
external/qemu/android/base/String.cpp: In member function ‘bool android::base::String::equals(const char*) const’:
external/qemu/android/base/String.cpp:179: error: ‘::strlen’ has not been declared
external/qemu/android/base/String.cpp: In member function ‘void android::base::String::resize(size_t)’:
external/qemu/android/base/String.cpp:208: error: ‘SIZE_MAX’ was not declared in this scope
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/emulator-common_intermediates/android/base/StringView.o] Error 1
external/qemu/android/base/String.cpp: In member function ‘void android::base::String::reserve(size_t)’:
external/qemu/android/base/String.cpp:235: error: ‘::memcpy’ has not been declared
external/qemu/android/base/String.cpp:236: error: ‘::free’ has not been declared
external/qemu/android/base/String.cpp:242: error: ‘::realloc’ has not been declared
external/qemu/android/base/String.cpp:249: error: ‘::memcpy’ has not been declared
external/qemu/android/base/String.cpp:252: error: ‘::memset’ has not been declared
external/qemu/android/base/String.cpp: In member function ‘void android::base::String::swap(android::base::String*)’:
external/qemu/android/base/String.cpp:282: error: ‘::memcpy’ has not been declared
external/qemu/android/base/String.cpp:289: error: ‘::memcpy’ has not been declared
external/qemu/android/base/String.cpp: In static member function ‘static void android::base::String::moveSlice(android::base::String*, size_t, size_t, size_t)’:
external/qemu/android/base/String.cpp:322: error: ‘::memmove’ has not been declared
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/emulator-common_intermediates/android/base/String.o] Error 1
ld: warning: directory not found for option '-Lout/host/darwin-x86/obj/lib'

提前致谢。

0 个答案:

没有答案