Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] How to fix : "1 Configuration module could not be loaded!" in Android env? #658

Open
canaanfredi opened this issue Mar 27, 2024 · 6 comments
Labels

Comments

@canaanfredi
Copy link

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
Screenshot 2024-03-27 at 15 55 55
How to fix it?

Reproduction Steps

No response

Expected behaviour

No response

Logs and Screenshots

No response

@canaanfredi
Copy link
Author

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

@canaanfredi
Copy link
Author

canaanfredi commented Mar 27, 2024

build details: https://github.com/canaanfredi/vsomeip-anroid-cmake
I just change vsomeip version from 3.4.10 to 3.3.8

@canaanfredi
Copy link
Author

canaanfredi commented Mar 28, 2024

https://github.com/COVESA/vsomeip/blob/master/implementation/configuration/include/internal_android.hpp
Screenshot 2024-03-28 at 09 48 57
Notice that this header file we tried to rename libvsomeip3-cfg.so TO libvsomeip_cfg.so but we got this:
WeChatWorkScreenshot_2d2c4a45-6fca-485e-9c76-307a2b8685b7

@canaanfredi canaanfredi changed the title How to fix the issue: "1 Configuration module could not be loaded!" in Android env? [ISSUE] How to fix : "1 Configuration module could not be loaded!" in Android env? Mar 28, 2024
@007herelsp
Copy link
Contributor

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.
android/ndk#519
android/ndk#533

@haohaolee
Copy link

haohaolee commented Mar 28, 2024

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,

@007herelsp
Copy link
Contributor

007herelsp commented Mar 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants