Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23310]: Upgrade v8 to 5.0.71.33 #7987

Closed
wants to merge 5 commits into from

Conversation

hieupham007
Copy link
Contributor

@hieupham007 hieupham007 commented May 3, 2016

sgtcoolguy and others added 5 commits March 1, 2016 12:21
…latest LTS of V8 library

- Move to using new static libs from v8 builds. Produces 4 libs not one.
- For now use local build of V8: 4.8.271.17
@hieupham007 hieupham007 changed the title [TIMOB-23310]: Upgrade v8 to 4.8.271.17 [TIMOB-23310]: Upgrade v8 to 5.0.71.33 May 3, 2016
@ashcoding
Copy link
Contributor

@sgtcoolguy
Copy link
Contributor

I don't see why we couldn't. Right now I just built V8 with ARM and ia32(x86) versions. But I think it supports a number of others. See https://android.googlesource.com/platform/external/v8/+/master/Android.mk

They list these arch: arm mips x86 arm64 mips64 x86_64

And here: https://android.googlesource.com/platform/external/v8/+/master/Makefile.android

Basically I think it's more a matter of just generating the v8 libraries for each of those targets we want to support. That would go in appcelerator/v8_titanium repo.

@sgtcoolguy
Copy link
Contributor

sgtcoolguy commented May 4, 2016

Looking at the various targets, I think it's also a matter of which Android platform (APILevel) we compile against.
3+: arm
9+: x86, mips
21+: arm64, x86_64, mips64

I believe we default to building against 9, but a command line arg in the build script for v8_titanium controls that. I'll try and build for all 6 of those...

@ashcoding
Copy link
Contributor

That would be awesome!

@sgtcoolguy sgtcoolguy added this to the 6.0.0 milestone Jun 3, 2016
@sgtcoolguy
Copy link
Contributor

Note that Trying this out currently with NDK r11c and Titanium master I see this on startup of the app (during the splash screen):

INFO]  TiApplication: (main) [0,0] checkpoint, app created.
[INFO]  TiApplication: (main) [62,62] Titanium 6.0.0 (2016/06/03 15:38 95de999)
[DEBUG] AndroidRuntime: Shutting down VM
[ERROR] TiApplication: (main) [50,112] Sending event: exception on thread: main msg:java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/dfg.df-2/base.apk"],nativeLibraryDirectories=[/data/app/dfg.df-2/lib/x86, /data/app/dfg.df-2/base.apk!/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libstlport_shared.so"; Titanium 6.0.0,2016/06/03 15:38,95de999
[ERROR] TiApplication: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/dfg.df-2/base.apk"],nativeLibraryDirectories=[/data/app/dfg.df-2/lib/x86, /data/app/dfg.df-2/base.apk!/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libstlport_shared.so"
[ERROR] TiApplication:  at java.lang.Runtime.loadLibrary(Runtime.java:367)
[ERROR] TiApplication:  at java.lang.System.loadLibrary(System.java:1076)
[ERROR] TiApplication:  at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:59)
[ERROR] TiApplication:  at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:205)
[ERROR] TiApplication:  at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:114)
[ERROR] TiApplication:  at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:136)
[ERROR] TiApplication:  at dfg.df.ExampleApplication.onCreate(ExampleApplication.java:41)
[ERROR] TiApplication:  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
[ERROR] TiApplication:  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
[ERROR] TiApplication:  at android.app.ActivityThread.-wrap1(ActivityThread.java)
[ERROR] TiApplication:  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
[ERROR] TiApplication:  at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] TiApplication:  at android.os.Looper.loop(Looper.java:148)
[ERROR] TiApplication:  at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] TiApplication:  at java.lang.reflect.Method.invoke(Native Method)
[ERROR] TiApplication:  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] TiApplication:  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[ERROR] E/NetworkScheduler.SR( 1846): Invalid parameter app
[ERROR] E/NetworkScheduler.SR( 1846): Invalid package name : Perhaps you didn't include a PendingIntent in the extras?

Looks like because I had to change our STL from libstlport_shared to libc++_shared, we're not properly using the new shared library and must have some code hard-coded to use libstlport_shared.

Note that I needed to swap to using libc++_shared to get us compiled with new V8, since it looks like stlport_shared doesn't have all the features V8 uses anymore. I chose that library because of https://android.googlesource.com/platform/external/v8/+/master/Android.libv8.mk

@sgtcoolguy
Copy link
Contributor

Note that right now even this version of V8 is behind. Once we get this merged we should regularly update. Right now Android stable version is: 5.1.281.57 - see https://omahaproxy.appspot.com

@sgtcoolguy
Copy link
Contributor

OK, just pushed the latest that works locally. icons builds fine against Android NDK r11c, and I can run a simple default Titanium app with it (classic two-tab). I can also confirm the new engine fixes TIMOB-23476.

Ready for Review!

@sgtcoolguy
Copy link
Contributor

Wait a second... This PR is off of Hieu's branch? OK, so my new commits aren't here. Ugh. I'm going to open the real PR

@sgtcoolguy sgtcoolguy closed this Jun 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants