3

I am trying to build libcurl with openSSL support. I tried using DockerFile and using ubantuimage with that. I am able to compile .so file for libcurl and openSSL. When I try to use those in my android NDK project and load application into device then it gives me error "java.lang.UnsatisfiedLinkError: dlopen failed: could not load library "libssl.so.1.0.0" needed by "libmyLib.so"; caused by library "libssl.so.1.0.0" not found". I have put this versioned file where my libcurl.so,libcrypto.so and libssl.so resides. This kind of error comes for every .so I have used depending on order I have included in my Android.mk file. Let me know how to solve this issue. For every .so mentioned above I can see versioned files. Let me know if more detail is required. I am getting error:

java.lang.UnsatisfiedLinkError: dlopen failed: could not load library "libssl.so.1.0.0" needed by "libmyLib.so"; caused by library "libssl.so.1.0.0" not found
Premal
  • 551
  • 1
  • 6
  • 25

1 Answers1

0

Android doesn't support versioned .so files, you have to rename it so it ends by .so.

clarification: you should rebuild the library in order to change its name and be able to use it - don't just rename the file itself.

ph0b
  • 14,353
  • 4
  • 43
  • 41
  • I don't have libssl.so.1.0.0 file and am getting the same error. How to fix it? – re3el Oct 13 '15 at 11:17
  • 1
    Renaming the versioned .so file does not fix the issue. The library name ends up inside the resulting binary. You have to rebuild it as an unversioned binary. For openssl, see the `make` command in this answer: http://stackoverflow.com/a/33869277 – Justin Dunlap Jan 21 '16 at 08:46