Issue
Up until Android 6, we had a working version of application, which was written using Qt Android, starting from Android 6 in Nexus device we are seeing strange error
dlopen failed: cannot locate symbol "__cxa_finalize" referenced by "/system/lib/libdl.so"
and application crashes.
objdump -T ourlibrary.so
...
00000000 DF *UND* 00000000 __cxa_finalize
...
tested with -lc
flag in order to link libc.so, couldn't help, without it same problem.
other dependant libraries while building: libgnustl_shared.so
in order to cheat compiler we have added
extern "C" int __cxa_finalize(void*); // { empty body somewhere in .cpp file }
didn't help, could someone point into the problem? Note: this was fully working until Android 6 (Marshmallow)
UPD1: api version android-9
, architecture arm
, qt android compilation armv5
, toolchain version 4.9
UPD2: some other libraries are showing glibc version
00000000 w DF *UND* 00000000 GLIBC_2.2.5 __cxa_finalize
Solution
I saw the same error when running my application. Do you have:
System.loadLibrary("dl");
Located in your code somewhere? If so, what I did to make my code run on 6 and <6 was to catch and ignore the UnsatisfiedLinkError exception thrown by 6 when trying to load the library.
Answered By - GHM
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.