Hello,
I'm am building a Kindle Fire CM10 ROM using the Linaro 2012.09 4.7.2 toolchain. I compile with strict-aliasing and have all strict-aliasing and ISO C++11 fixes applied to my repos.
However, if I also include the -std=gnu++11 compiler option MX Player failes to load with the following error:
java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1331]: 130 cannot locate '_ZN7android8String16C1EPKt'... at java.lang.Runtime.load(Runtime.java:340) at java.lang.System.load(System.java:521) at com.mxtech.videoplayer.App.a(Unknown Source) at com.mxtech.videoplayer.App.b(Unknown Source) at com.mxtech.app.MXApplication.a(Unknown Source) at com.mxtech.videoplayer.VideoSearchSuggestionProvider.onCreate(Unknown Source) at android.content.ContentProvider.attachInfo(ContentProvider.java:1058) at android.app.ActivityThread.installProvider(ActivityThread.java:4779) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4409) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4351) at android.app.ActivityThread.access$1300(ActivityThread.java:143) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1269) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4965) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558) at dalvik.system.NativeStart.main(Native Method) java.library.path: /vendor/lib:/system/lib /vendor/lib/egl: size=4096 date=08:38, 10/16/2012 /vendor/lib/hw: size=4096 date=08:38, 10/16/2012 /vendor/lib/libIMGegl_SGX540_120.so: size=63152 date=08:00, 8/1/2008 /vendor/lib/libPVRScopeServices_SGX540_120.so: size=9352 date=08:00, 8/1/2008 /vendor/lib/libglslcompiler_SGX540_120.so: size=269396 date=08:00, 8/1/2008 ...
I'm at a loss how to debug/fix this and am hoping that someone here could point me in the right direction or even know the fix. The error happens on 2012.10 and pre-2012.09 toolchain versions.
The full logcat is available here: http://pastebin.com/nrCFj8FM Please let me know if I can provide more information.
Thanks in advance
Hi,
On 17 October 2012 01:58, Thomas Wagner loosethisskin@gmail.com wrote:
java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1331]: 130 cannot locate '_ZN7android8String16C1EPKt'...
That's pretty much the same issue that initially broke the radio on Galaxy Nexus after updating to 4.1.2. You're dlopen-ing code that was built with an older compiler, and there has been a minor change:
In C++11, char16_t has become a compiler-defined type, while parts of Android assume char16_t has been defined to unsigned short. _ZN7android8String16C1EPKt in ABI speak is android::String16::String16(unsigned short const*) -- but given the code there uses char16_t, the symbol in the library if built with a newer compiler is actually android::String16::String16(char16_t const*).
I'm going to commit a fix to restore the old ABI (by making sure we don't use char16_t) in a bit, until then, another possible fix is to just recompile the library you're trying to dlopen (assuming, of course, you have its source).
ttyl bero
linaro-android@lists.linaro.org