我在OS X Mavericks 10.9.3中编译Android时遇到了困难。我没有对源进行任何更改。
初始化构建环境,我这样做:
repo init -b master
repo sync
repo forall -vc "git reset --hard"
lunch vbox_x86-eng
make
的结果是:http://pastebin.com/nk0Sudgx
我为WebCore
提供了大量未定义的引用target SharedLib: libwebviewchromium (out/target/product/vbox_x86/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so)
/Volumes/Android/prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.8/bin/../lib/gcc/x86_64-linux-android/4.8/../../../../x86_64-linux-android/bin/ld.gold: warning: hidden symbol 'SkBitmap::lockPixels() const' in out/target/product/vbox_x86/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO out/target/product/vbox_x86/obj/lib/libjnigraphics.so
out/target/product/vbox_x86/obj/GYP/shared_intermediates/blink/bindings/V8WebGLRenderingContext.cpp:2811: error: undefined reference to 'WebCore::WebGLRenderingContextBase::useProgram(WebCore::WebGLProgram*)'
[ ... ]
out/target/product/vbox_x86/obj/GYP/shared_intermediates/blink/bindings/V8WebGLRenderingContext.cpp:1543: error: undefined reference to 'WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat(unsigned int, unsigned int)'
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:471: error: undefined reference to 'WebCore::WebGLRenderingContextBase::isContextLost() const'
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:788: error: undefined reference to 'WebCore::WebGLRenderingContextBase::uniformMatrix4fv(WebCore::WebGLUniformLocation const*, unsigned char, WTF::Float32Array*)'
[ ... ]
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:410: error: undefined reference to 'WebCore::WebGLRenderingContextBase::getParameter(unsigned int)'
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:434: error: undefined reference to 'WebCore::WebGLRenderingContextBase::getProgramParameter(WebCore::WebGLProgram*, unsigned int)'
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:464: error: undefined reference to 'WebCore::WebGLRenderingContextBase::getShaderParameter(WebCore::WebGLShader*, unsigned int)'
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:516: error: undefined reference to 'WebCore::WebGLRenderingContextBase::getUniform(WebCore::WebGLProgram*, WebCore::WebGLUniformLocation const*)'
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:299: error: undefined reference to 'WebCore::WebGLRenderingContextBase::getBufferParameter(unsigned int, unsigned int)'
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:309: error: undefined reference to 'WebCore::WebGLRenderingContextBase::getVertexAttrib(unsigned int, unsigned int)'
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:302: error: undefined reference to 'WebCore::WebGLRenderingContextBase::getRenderbufferParameter(unsigned int, unsigned int)'
external/chromium_org/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:305: error: undefined reference to 'WebCore::WebGLRenderingContextBase::getTexParameter(unsigned int, unsigned int)'
external/chromium_org/third_party/WebKit/Source/core/html/canvas/ANGLEInstancedArrays.cpp:75: error: undefined reference to 'WebCore::WebGLRenderingContextBase::drawArraysInstancedANGLE(unsigned int, int, int, int)'
external/chromium_org/third_party/WebKit/Source/core/html/canvas/ANGLEInstancedArrays.cpp:83: error: undefined reference to 'WebCore::WebGLRenderingContextBase::drawElementsInstancedANGLE(unsigned int, int, unsigned int, long long, int)'
external/chromium_org/third_party/WebKit/Source/core/html/canvas/ANGLEInstancedArrays.cpp:91: error: undefined reference to 'WebCore::WebGLRenderingContextBase::vertexAttribDivisorANGLE(unsigned int, unsigned int)'
external/chromium_org/third_party/WebKit/Source/core/html/canvas/OESVertexArrayObject.cpp:63: error: undefined reference to 'WebCore::WebGLRenderingContextBase::addContextObject(WebCore::WebGLContextObject*)'
external/chromium_org/third_party/WebKit/Source/core/html/canvas/WebGLVertexArrayObjectOES.cpp:57: error: undefined reference to 'WebCore::WebGLContextObject::~WebGLContextObject()'
external/chromium_org/third_party/WebKit/Source/core/html/canvas/WebGLVertexArrayObjectOES.cpp:43: error: undefined reference to 'WebCore::WebGLContextObject::WebGLContextObject(WebCore::WebGLRenderingContextBase*)'
out/target/product/vbox_x86/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_html_gyp_intermediates/third_party_WebKit_Source_core_webcore_html_gyp.a(WebGLVertexArrayObjectOES.o):WebGLVertexArrayObjectOES.cpp:vtable for WebCore::WebGLVertexArrayObjectOES: error: undefined reference to 'WebCore::WebGLContextObject::getAWebGraphicsContext3D() const'
collect2: error: ld returned 1 exit status
make: *** [out/target/product/vbox_x86/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
它看起来像链接器错误,但我不知道原因。有什么想法吗?
答案 0 :(得分:1)
原因可能是你没有足够的Ram空间这里是来自XDA(http://forum.xda-developers.com/showthread.php?t=2585207)的线程尝试增加Ram,如果你在VM上或创建一个Linux-Swap分区确保从Developer.appple.com中选择xcode-5.0.2下载Xcode 5,然后将其作为Xcode-5.0.2.app放在应用程序文件夹中,然后运行
sudo xcode-select --switch /Applications/Xcode-5.0.2.app/Contents/Developer /