Search code examples
androidc++macosandroid-source

Error building libwebviewchromium.so when compiling Android on Mac


I am having difficulty compiling Android in OS X Mavericks 10.9.3. I have made no changes to the source.

Initializing the build environment, I do:

repo init -b master
repo sync
repo forall -vc "git reset --hard"
lunch vbox_x86-eng

And the result of make is: http://pastebin.com/nk0Sudgx

I get lots of undefined references for something called 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

It looks like a linker error, but I do not know the cause. Any ideas?


Solution

  • The reason might be the fact that you don't have enough Ram Space Here is a thread from the XDA (http://forum.xda-developers.com/showthread.php?t=2585207) try increasing the Ram if you are on a VM or create a Linux-Swap Partition also make sure you selected xcode-5.0.2 for that download Xcode 5 from the Developer.appple.com and then place it in your application folder as Xcode-5.0.2.app and then run

    sudo xcode-select --switch /Applications/Xcode-5.0.2.app/Contents/Developer/