0

I'm trying to build static openssl library for x86 by using the latest NDK (r11b) as explained in this link:

Compiling the latest OpenSSL for Android

However, when I try to include the output libcrypto.a in to some other shared library (SO) and compile that, it throws the error:

WARNING: shared library text segment not shareable
error: treating warning as errors

I tried using the pre-built libraries from here: https://github.com/emileb/OpenSSL-for-Android-Prebuilt/tree/master/openssl-1.0.2/x86/lib

and the above error message disappeared and everything built just fine.

Does anybody know how exactly I can build openssl libraries myself without "text segment not shareable" problem?

Note: I'm not looking for options to suppress this warning.

Community
  • 1
  • 1
pree
  • 2,297
  • 6
  • 37
  • 55

1 Answers1

0

I was able to get rid of this issue by using the following scripts for building openssl:

https://github.com/xvtom/build-openssl-android

Also refer this:

https://wiki.openssl.org/index.php/Android

pree
  • 2,297
  • 6
  • 37
  • 55
  • Can you provide more details about this? Do you know what is the key to remove this warning? – jayatubi Apr 12 '16 at 17:44
  • @jayatubi - Sorry for the late response. Since I was able to compile openssl from the links above in my answer, I didn't bother much to figure out the difference but there has to be some difference in the scripts. Let me know if you need more info. – pree Apr 18 '16 at 20:07