Skip to content

"dlopen failed: empty/missing DT_HASH/DT_GNU_HASH" crash in runtime #59

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

Closed
neekeetab opened this issue Jul 18, 2022 · 2 comments
Closed

Comments

@neekeetab
Copy link

neekeetab commented Jul 18, 2022

Hey! Thanks for doing this!

So I built a swift lib by using your guide, but I'm getting "dlopen failed: empty/missing DT_HASH/DT_GNU_HASH" on android just when the lib is loaded to the memory. Did you encounter smth similar by chance?

Build command:
/toolchain/swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift build -v -c release --destination /toolchain/swift-android-sdk/android-aarch64.json -Xlinker -rpath -Xlinker /toolchain/swift-5.6-android-aarch64-24-sdk/usr/lib/swift/android

I found this question with a possible fix for c++. Maybe there's a swift compiler setting like this? Couldn't find one.
https://stackoverflow.com/questions/28638809/android-ndk-unsatisfiedlinkerror-dlopen-failed-empty-missing-dt-hash

@neekeetab
Copy link
Author

neekeetab commented Jul 18, 2022

Nevermind, we had to remove all occurances of lib dispatch and lib concurrency in this SDK (along with corresponding .swiftmodule files) and it worked

We also had do build in docker ubuntu x86_64 container on an intel machine (possibly works on m1 as well), because it fails on ubuntu aarch64 on m1 macs

@finagolfin
Copy link
Owner

Hey @neekeetab, I didn't even see this issue when you opened it, because you closed it so fast. You may want to try this recent solution for libdispatch on Android instead (see the next comment too), otherwise you will not be able to use structured concurrency.

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