1

I'm working on build PJSIP project for Android ABIs(armeabi, x86_64, x86) using OpenSSL on Ubuntu. I tired to build OpenSSL Android ABIs(armeabi, x86_64, x86) by the given steps on PJSIP Documentation, Here and Github repo.

I have successfully build OpenSSL for Android ABIs and created static libraries (*.a). Now, with the created static libraries (libCrypto.a and libssl.a) I've started to build PJSIP project for Android ABIs and set OpenSSL directory path in ./Configure Android as mentioned in their document for corresponded ABI.

When I'm looking generated logs in terminal I found the message "OpenSSL library not found. OpenSSL disabled".

One thing I noticed that I'm working with (.a) library whereas I saw many suggestions are using (libcrypto.so and libssl.so), if this is the issue then, I'd like to know the steps to generate .so library to build OpenSSL project.

  • are you built the library with ssl command? you want to build as TARGET_ABI=arm64-v8a ./configure-android --use-ndk-cflags --with-ssl=[your_openssl_path]/openssl-1.0.2a [pjsip_docs](https://trac.pjsip.org/repos/wiki/Getting-Started/Android#OpenSSLSupport) – Nandhakumar Kittusamy May 08 '18 at 05:43
  • Yes, I do same. – Ashish Gupta May 09 '18 at 01:26

1 Answers1

0

I had this same exact issue [on Mac OS building for Android] and what I did to fix it is copy the outputs for the specific android arch I was doing to the lib folder of the openssl directory and it seems to have worked.

the files I copied were: libcrypto.a, libssl.a [not sure if I needed all of them, maybe someone knows??]

it is mentioned here as well: pjsip

I only got all 4 of my architectures to build when I changed to no-shared on the openssl build

 ./Configure $SSL_TARGET $OPTIONS -fuse-ld="$TOOLCHAIN/$TRIBLE/bin/ld"   no-shared no-ssl2 no-ssl3 no-comp no-hw no-engine
make depend && make all && \
make install DESTDIR=$DESTDIR || exit 128

I also found a link that I think explained why I was getting the error when the shared option was used:

openssl RPATHs