A Kotbase user asked about how to ensure their app can provide the required libicu version for users running their app on Linux, if they don’t have the required library version installed already. This is using the CBL Java SDK running in the JVM on Linux.
I looked into where the libicu library is loaded in CBL Core and see that it seems to check the CBL_ICU_LOCATION
environment variable before defaulting to /usr/lib/<arch_folder>
. I tested setting this CBL_ICU_LOCATION
environment variable to a custom path, e.g. /home/jeff/Desktop/libicu
, and temporarily moving libicu*.so.71*
from /usr/lib/x86_64-linux-gnu
to that location, but the app crashes with a linker error unless the library is found in /usr/lib/x86_64-linux-gnu
.
Caused by: java.lang.UnsatisfiedLinkError: …/libLiteCore.so: libicuuc.so.71: cannot open shared object file: No such file or directory
Am I missing something with how the code works here? Is there a preferred mechanism for apps to be able to provide the libicu dependency at runtime?
9 posts - 3 participants