Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26092] Android: Way to use own custom libc++_shared.so file

GitHub Issuen/a
TypeStory
PriorityNone
StatusClosed
ResolutionWon't Fix
Resolution Date2018-08-17T21:19:57.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, libc++shared.so, module
ReporterShuo Liang
AssigneeUnknown
Created2018-06-05T09:36:05.000+0000
Updated2018-08-17T21:19:57.000+0000

Description

When building a Mobile app, Titanium is injecting/copying its own libc++_shared.so (e.g Android NDK r11) file. The file that is copied during the build phase is located within the Titanium SDK: sdk/android/native/libs/*/libc++_shared.so. But when we provide our own libc++_shared.so file within Ti Module, it gets overridden. This step within the build phase makes it impossible to use a custom libc++_shared.so file e.g. provided by a third party. Because in some cases, a library that a third party vendor provides relies on another libc++_shared.so file (thus NDK version) that might not be compatible with the built-in one provided by Titanium. Is there an approach or way to cope with this behaviour? I know that you shouldn't and can't mix libc++_shared.so files and this libc++_shared.so file is also crucial for Titanium features to work, but there should be a way to cope with this.

Comments

  1. Joshua Quick 2018-06-11

    This is working as intended. If we were to allow the app developer to replace the standard C++ library Titanium's .so files link to, then you run the risk of running into a ABI compatibility issue with Titanium's prebuilt .so libraries. It would be the reverse issue that you brought up. What you're running into reminds me of Windows DLL hell. It's the same type of issue. Although Microsoft solved it by adding the C++ runtime version to the DLL name for libraries to link to (ex: "msvcr130.dll", "msvcr140.dll", etc.). Unfortunately, Google's Android NDK has not done the same. Are you building the .so libraries yourself? If so, then I recommend that you build with Android NDK r16c and LLVM. This will use the same "libc++_shared.so" that Titanium uses.
  2. Shuo Liang 2018-06-12

    Got it

JSON Source