Hello,
I compile v8(6.3.1) as shared library for cocos2dx which is been used in android. The projects has 4 ABIs: x86. x86_64, armeabi-v7a and arm64-v8a. It's work fine for x86_64, armeabi and arm64 but the problem is on x86 architecture.
After I compile v8 for x86 and add it in the prebuild section, I run the project and get this error:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__moddi3"
I analyzed the library with readelf and I see that is undefined:
$ readelf -Ws libv8.so | grep "__moddi3"
6666: 00000000 0 FUNC GLOBAL DEFAULT UND __moddi3
For the rest of architectures, the library doesn't contain this symbol neither defined or undefined and the app works well.
The NDK that I used for compile it's the default from this version of v8, ndk12
I compile the v8 library using next steps on Ubuntu 16.04(64-bit), Ubuntu 18.04(64-bit) :
- git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- sudo apt-get install -y gcc-multilib
- export PATH=`pwd`/depot_tools:"$PATH"
- fetch v8
- cd v8
- git checkout
8cd4009c5b7072ad224f19a9e668ec0ed7430599 - for V8(6.3.1) version
- echo "target_os = ['android']" >> ../.gclient && gclient sync
- ./tools/dev/v8gen.py ia32.release
- add the following arguments on args file:
- v8_use_external_startup_data = false
- is_official_build = true
- is_debug = false
- symbol_level = 1
- target_cpu = "x86"
- v8_target_cpu = "x86"
- v8_enable_i18n_support = false
- target_os = "android"
- v8_android_log_stdout = true
- is_component_build = true
Can someone help me? Thanks!