Cross compilation is failing for V8 7.4.288.22 version libraries in android project.

231 views
Skip to first unread message

Kiran Kumar

unread,
Aug 5, 2019, 6:59:56 AM8/5/19
to v8-users
Hi,

i have built V8 libraries with below arguments.

is_debug = false
target_cpu = "arm"
v8_target_cpu = "arm"
target_os = "android"
is_component_build = false
v8_static_library = true
v8_use_snapshot = true
v8_use_external_startup_data = false
icu_use_data_file = false

When i try to integrate it in android project, compilation fails with below error.

Error:
D:/workspace/SampleNDKO/app/src/main/cpp/hello-jni.cpp:42: error: undefined reference to 'v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__ndk1::unique_ptr<v8::TracingController, std::__ndk1::default_delete<v8::TracingController> >)'
../../buildtools/third_party/libc++/trunk/include/memory:3586: error: undefined reference to 'std::__1::__shared_weak_count::__release_weak()'
../../buildtools/third_party/libc++/trunk/include/memory:3586: error: undefined reference to 'std::__1::__shared_weak_count::__release_weak()'
../../buildtools/third_party/libc++/trunk/include/vector:975: error: undefined reference to 'std::__1::__vector_base_common<true>::__throw_length_error() const'
../../buildtools/third_party/libc++/trunk/include/vector:1560: error: undefined reference to 'std::__1::__vector_base_common<true>::__throw_out_of_range() const'
../../buildtools/third_party/libc++/trunk/include/vector:1560: error: undefined reference to 'std::__1::__vector_base_common<true>::__throw_out_of_range() const'
../../buildtools/third_party/libc++/trunk/include/vector:1560: error: undefined reference to 'std::__1::__vector_base_common<true>::__throw_out_of_range() const'
../../buildtools/third_party/libc++/trunk/include/vector:1560: error: undefined reference to 'std::__1::__vector_base_common<true>::__throw_out_of_range() const'
../../buildtools/third_party/libc++/trunk/include/memory:3586: error: undefined reference to 'std::__1::__shared_weak_count::__release_weak()'
../../buildtools/third_party/libc++/trunk/include/vector:1009: error: undefined reference to 'std::__1::__vector_base_common<true>::__throw_length_error() const'
../../buildtools/third_party/libc++/trunk/include/vector:1009: error: undefined reference to 'std::__1::__vector_base_common<true>::__throw_length_error() const'
../../buildtools/third_party/libc++/trunk/include/vector:1009: error: undefined reference to 'std::__1::__vector_base_common<true>::__throw_length_error() const'
../../buildtools/third_party/libc++/trunk/include/memory:3606: error: undefined reference to 'std::__1::__shared_weak_count::~__shared_weak_count()'
../../buildtools/third_party/libc++/trunk/include/memory:3586: error: undefined reference to 'std::__1::__shared_weak_count::__release_weak()'
../../buildtools/third_party/libc++/trunk/include/memory:3606: error: undefined reference to 'std::__1::__shared_weak_count::~__shared_weak_count()'
D
:/workspace/SampleNDKO/app/src/main/cpp/../public/v8_5_8_283_32/build/libs/armeabi-v7a/libv8_base.a(api.o):api.cc:vtable for std::__1::__shared_ptr_pointer<v8::internal::Coverage*, std::__1::default_delete<v8::internal::Coverage>, std::__1::allocator<v8::internal::Coverage> >: error: undefined reference to 'std::__1::__shared_weak_count::~__shared_weak_count()'

Please help me in resolving the issue. Thanks in advance.

Regards,
Kiran

Kiran

unread,
Aug 5, 2019, 7:49:29 AM8/5/19
to v8-users
Shared the sample project at below link.


Regards,
Kiran
Reply all
Reply to author
Forward
0 new messages