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

UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in libcrypto_chaquopy.so (new hash type from the future?) #1324

Open
sanjay-dreamcast opened this issue Jan 16, 2025 · 1 comment
Labels
Milestone

Comments

@sanjay-dreamcast
Copy link

sanjay-dreamcast commented Jan 16, 2025

Getting Error At runtime when running Android Project

java.lang.UnsatisfiedLinkError

Chaquopy version

java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/app/~~-HXesiPNoT2evn9Bne46Sg==/com.chaquo.python.demo3-7QdE7C-hZ8KdX2wbuqJY3g==/base.apk!/lib/arm64-v8a/libcrypto_chaquopy.so" (new hash type from the future?)
at java.lang.Runtime.loadLibrary0(Runtime.java:1081)
at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
at java.lang.System.loadLibrary(System.java:1765)
at com.chaquo.python.android.AndroidPlatform.loadNativeLibs(AndroidPlatform.java:270)

chaquopy Version

version "16.0.0"

Not Works in Emulator

@mhsmith mhsmith changed the title RuntimeException java.lang.UnsatisfiedLinkError UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in libcrypto_chaquopy.so (new hash type from the future?) Jan 16, 2025
@mhsmith mhsmith added this to the 17.0 milestone Jan 16, 2025
@mhsmith mhsmith added the bug label Jan 16, 2025
@mhsmith
Copy link
Member

mhsmith commented Jan 16, 2025

This error message previously appeared in #1171. Are you using an emulator with 16 KB page sizes? Chaquopy doesn't officially support this yet.

In Chaquopy 16 and later, the _chaquopy suffixed libraries don't contain any code, only a reference to the real _python suffixed libraries. However, in package-target-sh it looks like we forgot to build the _chaquopy libraries in 16 KB mode. We'll fix this in the next version of Chaquopy, probably by passing $CFLAGS and $LDFLAGS to the build command.

Meanwhile, possible workarounds are:

  • Change your app's Python version to 3.13 or later, since those versions use the _chaquopy names in fewer places.
  • If that doesn't work, you'll just have to use a normal emulator with 4 KB pages.

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

2 participants