vsomeip
vsomeip copied to clipboard
[ISSUE] How to fix : "1 Configuration module could not be loaded!" in Android env?
vSomeip Version
v3.3.8
Boost Version
1.84.0
Environment
Android NDK r25c
Describe the bug
As I cross compile vsomeip by Android NDK(version: r25c) in my Mac and I adb push all the folder to Android AVD.
And I chmod +x for this.
Since I adb shell and want run the hello world it shows
How to fix it?
Reproduction Steps
No response
Expected behaviour
No response
Logs and Screenshots
No response
I use this cmd below:
cmake -B ./build -G Ninja -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -S .
cmake --build ./build
build details: https://github.com/canaanfredi/vsomeip-anroid-cmake I just change vsomeip version from 3.4.10 to 3.3.8
https://github.com/COVESA/vsomeip/blob/master/implementation/configuration/include/internal_android.hpp
Notice that this header file we tried to rename libvsomeip3-cfg.so TO libvsomeip_cfg.so but we got this:
dynamic_pointer_cast this issue where some objects return nullptr Created outside of the boundaries of the shared library. See below discuss for more details. https://github.com/android/ndk/issues/519 https://github.com/android/ndk/issues/533
Hi @007herelsp
Thanks very much for the info. I have carefully studied the discussions for all these, my current understanding is: The only approach for Android is linking the cfg library explicitly. Do I understand correctly?
I have tried some things like
-
dlopen
with DL_GLOBAL - add a key function to
configuration_plugin
None of the above worked.
ps: I personally do not like using dynamic_cast cross module boundaries, which leads to a dark place in the ABI spec. Maybe we should redesign the plugin system to rely on more stable interfaces.
Best regards,
Hi @007herelsp
Thanks very much for the info. I have carefully studied the discussions for all these, my current understanding is: The only approach for Android is linking the cfg library explicitly. Do I understand correctly?
I have tried some things like
dlopen
with DL_GLOBAL- add a key function to
configuration_plugin
None of the above worked.
ps: I personally do not like using dynamic_cast cross module boundaries, which leads to a dark place in the ABI spec. Maybe we should redesign the plugin system to rely on more stable interfaces.
Best regards,
I'll submit code to fix this
@007herelsp I am very concerned about whether there is a stable version available for Android.