Android build PJSIP with openssl -
i'm trying build pjsip on android ssl/tls support.
i built openssl following this answer (without fips, shared-.so libraries) , installed in ~/android (which created ~/android/ssl directory).
now, when do
./configure-android --with-ssl=/home/andrea/android/ssl
and @ config.log, first error states
<ndk-directories-and-stuff>/arm-linux-androideabi/bin/ld: warning: libdl.so, needed /home/andrea/android/ssl/lib/libcrypto.so, not found (try using -rpath or -rpath-link)
a lot of undefined references follow.
as consequence ssl support disabled:
aconfigure:7012: result: ** openssl libraries not found, disabling ssl support ** ac_cv_header_openssl_ssl_h=yes ac_cv_lib_ssl_ssl_library_init=no cflags=' -i/home/andrea/android/android-ndk-r8e/platforms/android-14/arch-arm/usr/include -dpj_is_big_endian=0 -dpj_is_little_endian=1 -i/home/andrea/android/ssl/include' ldflags=' -nostdlib -l/home/andrea/android/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/ -l/home/andrea/android/ssl/lib' ac_no_ssl='' libssl_present='' openssl_h_present='1'
but libdl.so exists in ndk's directory:
<ndk-dir>/platforms/android-14/arch-arm/usr/lib/
i guess have tell ld other libraries are, ld's suggestion mean?
try using -rpath or -rpath-link
i can't understand -rpath or rpath-link or apply them .
any ideas?
i built pjsip openssl. please follow following steps:
first download openssl-android , compile reading readme file. (put android-ndk
path
, execute command ndk-build
in openssl-android
root) copy libcrypto.so
, libssl.so
libs/armeabi/
folder lib/
folder in root of openssl-android
(you can create folder). directory structure should like:
openssl-android/
->apps
->crypto
->include
->jni
->lib
->libs
->...
now execute in root directory of pjsip:
./configure-android --with-ssl=/home/your-user-name/path-to-openssl-android-dir
for confirmation openssl included pipe command grep like:
./configure-android --with-ssl=/home/your-user-name/path-to-openssl-android-dir | grep -wi ssl
then see line result: openssl library found, ssl support enabled
. means, openssl enabled pjsip. can continue normal.
hope helps.
Comments
Post a Comment