On 24.11.2025 at 03:11, Adriano dos Santos Fernandes wrote:
> What is the actual problem you see? Test case, please.
> > Your report here looks for me more like suppositions that I cannot
confirm:
My suspicion came from the fact, that when I use embedded aar and in the
application code I do:
DynamicLibrary.open("
libicui18n.63.1.so") (a Dart FFI wrapper around
dlopen), I get the following error:
Failed to load dynamic library '
libicui18n.63.1.so': dlopen failed:
library "libicuuc.so.63" not found
which suggests the Android loader tries to load libicuuc.so.63, which
libicui18n.63.1.so depends on (and the lib was renamed to
libicuuc.63.1.so after building ICU for Android).
At the same time, DynamicLibrary.open("libfbclient.so") succeedes, but
later fails with 335545167 ("Could not find acceptable ICU library") on
embedded attachment.
When I preload the libraries in the proper order:
DynamicLibrary.open("
libicudata.63.1.so")
DynamicLibrary.open("
libicuuc.63.1.so")
DynamicLibrary.open("
libicui18n.63.1.so")
dlopen reports no errors, but when trying to attach I get the same error
335545167 ("Could not find acceptable ICU library").
Also, in the logs (adb logcat) I can see:
I/FIREBIRD(22398): ConfigStorage: Cannot initialize the shared memory region
I/FIREBIRD(22398): Can not access lock files directory
/data/local/tmp/firebird.tmp.ebJGLX
That in itself may be a problem, but probably not related to the ICU
issue (but I simply don't know - maybe it is).
So, yes, all I reported are my suspicions, that's why I haven't created
an issue for it, but instead asked for more information.
I confirm that when I install the 5.0.3 server on Android (in the way
similar to how the test suite does it), I can then connect to
employee.fdb from within isql on Android and I get no errors.
The example application code with embedded Firebird is available at
https://github.com/hipercompl/fbdbmobdemo/tree/embedded
The preloading is here:
https://github.com/hipercompl/fbdbmobdemo/blob/embedded/lib/login_screen.dart#L106-L118
If you change the order and try to load
libicui18n.63.1.so first, it
fails with the error I mentioned above.
However, no matter whether you preload ICU or not, the app fails on
attachment with 335545167, for the reason described below.
The actual attachment takes place in a separate isolate (thread /
process), which loads libfbclient.so and uses the FB interfaces.
Preloading ICU in the main application isolate doesn't do much, as the
libraries need to be loaded again (by the embedded engine library) in
the background isolate, in which libfbclient is loaded.
I'll try to preload ICU in the background isolate and see if it helps.
The same code works fine when using TCP/IP connection (not embedded) -
the main branch of the repo is a client/server version and it works fine
(but it doesn't need ICU, so the problem obviously doesn't occur).
As a finishing thought: I didn't mean to sound so alarmist, maybe I
indeed overreacted, sorry for that.
regards
Tomasz