Have to use NDK r16b for symbols in libc++_shared.so referenced by libiink.so [ARM64 only]
J
Jiulong Wang
started a topic
over 1 year ago
Spent most of the weekend fighting crashing issue due to unresolved symbol "__letf2". Wanted to drop a note here for anyone facing similar issues...
It appears MyScript Android SDK was built using (the very old) NDK r16b. The packaged libc++_shared.so has same signature with libc++_share.so that shipped in NDK r16b.
My app also have C++ code that links to libc++_shared.so, and built with a newer version (r20). When packing apk, the build system picks libc++_shared.so from NDK r20.
In gradle, I split the apk to generate arm64 only apk.
Now when my app starts, it crashes because it cannot load libiink.so, missing symbol "__letf2".
I compared exported symbols of arm64-v8a/libc++_shared.so from NDK r16b and r20, __letf2 was in r16b, but not in r20.
I downgrade my NDK to r16b which solved my problem.
Hope MyScript can target newer NDK in future release to avoid such hassle.
Best Answer
O
Olivier @MyScript
said
over 1 year ago
Dear Jiulong Wang,
thank you for contacting us and your question.
Indeed, our current 1.3 Android build of the iink SDK was built using the NDK r16b, which is the reason why you are facing such behavior.
At present, we cannot commit when we will update to a newer release of the NDK, as this may also introduce some difficulties to run on older devices.
Indeed, our current 1.3 Android build of the iink SDK was built using the NDK r16b, which is the reason why you are facing such behavior.
At present, we cannot commit when we will update to a newer release of the NDK, as this may also introduce some difficulties to run on older devices.
Best regards,
Olivier
J
Jiulong Wang
said
over 1 year ago
Hi Olivier,
Thanks for your quick reply!
Regarding supporting older devices, I don't think upgrading NDK version would affect older Android versions because NDK is designed to support older Android versions.
Or, to keep using r16b, would it possible to release a static linked version of iink SDK?
Jiulong Wang
Spent most of the weekend fighting crashing issue due to unresolved symbol "__letf2". Wanted to drop a note here for anyone facing similar issues...
It appears MyScript Android SDK was built using (the very old) NDK r16b. The packaged libc++_shared.so has same signature with libc++_share.so that shipped in NDK r16b.
My app also have C++ code that links to libc++_shared.so, and built with a newer version (r20). When packing apk, the build system picks libc++_shared.so from NDK r20.
In gradle, I split the apk to generate arm64 only apk.
Now when my app starts, it crashes because it cannot load libiink.so, missing symbol "__letf2".
I compared exported symbols of arm64-v8a/libc++_shared.so from NDK r16b and r20, __letf2 was in r16b, but not in r20.
I downgrade my NDK to r16b which solved my problem.
Hope MyScript can target newer NDK in future release to avoid such hassle.
Dear Jiulong Wang,
thank you for contacting us and your question.
Indeed, our current 1.3 Android build of the iink SDK was built using the NDK r16b, which is the reason why you are facing such behavior.
At present, we cannot commit when we will update to a newer release of the NDK, as this may also introduce some difficulties to run on older devices.
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstOlivier @MyScript
Dear Jiulong Wang,
thank you for contacting us and your question.
Indeed, our current 1.3 Android build of the iink SDK was built using the NDK r16b, which is the reason why you are facing such behavior.
At present, we cannot commit when we will update to a newer release of the NDK, as this may also introduce some difficulties to run on older devices.
Best regards,
Olivier
Jiulong Wang
Hi Olivier,
Thanks for your quick reply!
Regarding supporting older devices, I don't think upgrading NDK version would affect older Android versions because NDK is designed to support older Android versions.
Or, to keep using r16b, would it possible to release a static linked version of iink SDK?
Thanks,
-Jiulong