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

Android: force-link libdl #274

Merged
merged 1 commit into from
Apr 20, 2021
Merged

Android: force-link libdl #274

merged 1 commit into from
Apr 20, 2021

Conversation

jrose-signal
Copy link
Contributor

For some reason, the Docker build of libsignal_jni.so doesn't link to libdl, even though the build on my local machine does. This doesn't seem to be a problem on most phones, presumably because the libdl functions are re-exported through libc. However, on a small subset of Android phones this is not good enough and libsignal_jni.so fails to load. For now, work around this by forcing the Android cross-compilation linker to link to libdl (instead of doing it "as needed").

Docs for cargo:rustc-cdylib-link-arg

For some reason, the Docker build of libsignal_jni.so doesn't link to
libdl, even though the build on my local machine does. This doesn't
seem to be a problem on most phones, presumably because the libdl
functions are re-exported through libc. However, on a small subset of
Android phones this is not good enough and libsignal_jni.so fails to
load. For now, work around this by forcing the Android
cross-compilation linker to link to libdl (instead of doing it "as
needed").
@jrose-signal jrose-signal merged commit 0c254cc into master Apr 20, 2021
@jrose-signal jrose-signal deleted the jrose/android-libdl branch April 20, 2021 22:01
jrose-signal added a commit that referenced this pull request Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants