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

copy libc++_shared.so for Android tests #197

Open
ZhaoXiangXML opened this issue Oct 26, 2023 · 2 comments
Open

copy libc++_shared.so for Android tests #197

ZhaoXiangXML opened this issue Oct 26, 2023 · 2 comments

Comments

@ZhaoXiangXML
Copy link

My project has a C++ dependency and I'd like to run tests with dinghy.

But it has the following error:

library "libc++_shared.so" not found: needed by main executable

I noticed there was a PR says it's supported: #103

But I don't know how to make it work, as far as I can tell, there's no way to modify the variable build.dynamic_libraries

@fredszaq
Copy link
Collaborator

Hi @ZhaoXiangXML

This is something that was indeed supported before the big refactoring of in #157. We do need to add that back (one solution would be to parse the binary with https://crates.io/crates/elf to get the linked libs (we were getting the info directly form cargo before but this is now complicated to get with the new approach... )

Note that if you are using run-with we should still get the dependent dylibs to the device. This means however you need to write a wrapper (can be quite simple) and it won't have the hability to run tests from the test harness...

@ZhaoXiangXML
Copy link
Author

I've wrote a workaround in the build.rs of my project, that would run adb push libcxx_shared_in_ndk /data/local/tmp/dinghy/overlay/libc++_shared.so for Android, which solves my problem for now.

However I still hope this can be implemented in dinghy.

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

No branches or pull requests

2 participants