Android Pjsip installation

AM
Aanal Mehta
Thu, Aug 8, 2019 7:16 AM

Hello Team,

Greetings of the day!

I was trying to generate libpjsua2.so file using following link:

https://trac.pjsip.org/repos/wiki/Getting-Started/Android

I am getting confused in few steps and because of that I am not getting
success.

Can you please help me with the following questions:

  1. I have properly set ANDROID_NDK_ROOT and JAVA_HOME path. But while
    performing Building and running pjsua2 sample application command, I
    am getting error like

/home/aanalmehta/Android/Sdk/ndk/18.1.5063045/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld:
cannot find -lpj-aarch64-unknown-linux-android
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
Makefile:165: recipe for target
'android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so' failed
make[1]: *** [android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so] Error 1
make[1]: Leaving directory
'/home/aanalmehta/Documents/Pjsip/pjproject-2.9/pjsip-apps/src/swig/java'
Makefile:27: recipe for target 'all' failed
make: *** [all] Error 1

I am not getting any solution over here.

  1. I tried to download latest NDK file from
    https://developer.android.com/ndk/downloads

and now I am getting following error

In file included from
/home/aanalmehta/Android/android_ndk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/type_traits:406:
/home/aanalmehta/Android/android_ndk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/cstddef:50:9:
error: no member named 'ptrdiff_t' in the global namespace
using ::ptrdiff_t;
      ~~^

  1. Do I need all four folders - arm64-v8a, armeabi-v7a, x86 and x86_64?
    If yes then how to generate all four folders? As I am giving

TARGET_ABI=arm64-v8a ./configure-android --use-ndk-cflags --with-ssl=[your_openssl_path]/openssl-1.0.2a

it's only generating arm64-v8a folder inside jniLibs.

  1. If I got success in generating .so file then how to use it in my
    current project. What things need to be taken care?

Your answers will help me a lot.

Thank you for your precious time.

Thanks and regards,

Aanal Mehta

Hello Team, Greetings of the day! I was trying to generate libpjsua2.so file using following link: https://trac.pjsip.org/repos/wiki/Getting-Started/Android I am getting confused in few steps and because of that I am not getting success. Can you please help me with the following questions: 1. I have properly set ANDROID_NDK_ROOT and JAVA_HOME path. But while performing *Building and running pjsua2 sample application* command, I am getting error like > /home/aanalmehta/Android/Sdk/ndk/18.1.5063045/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: > cannot find -lpj-aarch64-unknown-linux-android > clang++: error: linker command failed with exit code 1 (use -v to see > invocation) > Makefile:165: recipe for target > 'android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so' failed > make[1]: *** [android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so] Error 1 > make[1]: Leaving directory > '/home/aanalmehta/Documents/Pjsip/pjproject-2.9/pjsip-apps/src/swig/java' > Makefile:27: recipe for target 'all' failed > make: *** [all] Error 1 I am not getting any solution over here. 2. I tried to download latest NDK file from https://developer.android.com/ndk/downloads and now I am getting following error > In file included from > /home/aanalmehta/Android/android_ndk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/type_traits:406: > /home/aanalmehta/Android/android_ndk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/cstddef:50:9: > error: no member named 'ptrdiff_t' in the global namespace > using ::ptrdiff_t; >       ~~^ 3. Do I need all four folders - arm64-v8a, armeabi-v7a, x86 and x86_64? If yes then how to generate all four folders? As I am giving TARGET_ABI=arm64-v8a ./configure-android --use-ndk-cflags --with-ssl=[your_openssl_path]/openssl-1.0.2a it's only generating arm64-v8a folder inside jniLibs. 4. If I got success in generating .so file then how to use it in my current project. What things need to be taken care? Your answers will help me a lot. Thank you for your precious time. Thanks and regards, Aanal Mehta
Александр Клейменов
Thu, Aug 8, 2019 7:19 AM

Hello!
Try android ndk r13b.
I am compile with that version of android ndk.

8 авг. 2019 г., в 10:16, Aanal Mehta aanal.mehta@solutionanalysts.com написал(а):

Hello Team,

Greetings of the day!

I was trying to generate libpjsua2.so file using following link:

https://trac.pjsip.org/repos/wiki/Getting-Started/Android https://trac.pjsip.org/repos/wiki/Getting-Started/Android
I am getting confused in few steps and because of that I am not getting success.

Can you please help me with the following questions:

  1. I have properly set ANDROID_NDK_ROOT and JAVA_HOME path. But while performing Building and running pjsua2 sample application command, I am getting error like

/home/aanalmehta/Android/Sdk/ndk/18.1.5063045/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lpj-aarch64-unknown-linux-android
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:165: recipe for target 'android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so' failed
make[1]: *** [android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so] Error 1
make[1]: Leaving directory '/home/aanalmehta/Documents/Pjsip/pjproject-2.9/pjsip-apps/src/swig/java'
Makefile:27: recipe for target 'all' failed
make: *** [all] Error 1

I am not getting any solution over here.

  1. I tried to download latest NDK file from https://developer.android.com/ndk/downloads https://developer.android.com/ndk/downloads
    and now I am getting following error

In file included from /home/aanalmehta/Android/android_ndk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/type_traits:406:
/home/aanalmehta/Android/android_ndk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/cstddef:50:9: error: no member named 'ptrdiff_t' in the global namespace
using ::ptrdiff_t;
~~^

  1. Do I need all four folders - arm64-v8a, armeabi-v7a, x86 and x86_64? If yes then how to generate all four folders? As I am giving

TARGET_ABI=arm64-v8a ./configure-android --use-ndk-cflags --with-ssl=[your_openssl_path]/openssl-1.0.2a
it's only generating arm64-v8a folder inside jniLibs.

  1. If I got success in generating .so file then how to use it in my current project. What things need to be taken care?

Your answers will help me a lot.

Thank you for your precious time.

Thanks and regards,

Aanal Mehta


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hello! Try android ndk r13b. I am compile with that version of android ndk. > 8 авг. 2019 г., в 10:16, Aanal Mehta <aanal.mehta@solutionanalysts.com> написал(а): > > Hello Team, > > Greetings of the day! > > > > I was trying to generate libpjsua2.so file using following link: > > https://trac.pjsip.org/repos/wiki/Getting-Started/Android <https://trac.pjsip.org/repos/wiki/Getting-Started/Android> > I am getting confused in few steps and because of that I am not getting success. > > Can you please help me with the following questions: > > 1. I have properly set ANDROID_NDK_ROOT and JAVA_HOME path. But while performing Building and running pjsua2 sample application command, I am getting error like > > >> /home/aanalmehta/Android/Sdk/ndk/18.1.5063045/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lpj-aarch64-unknown-linux-android >> clang++: error: linker command failed with exit code 1 (use -v to see invocation) >> Makefile:165: recipe for target 'android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so' failed >> make[1]: *** [android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so] Error 1 >> make[1]: Leaving directory '/home/aanalmehta/Documents/Pjsip/pjproject-2.9/pjsip-apps/src/swig/java' >> Makefile:27: recipe for target 'all' failed >> make: *** [all] Error 1 > > I am not getting any solution over here. > > 2. I tried to download latest NDK file from https://developer.android.com/ndk/downloads <https://developer.android.com/ndk/downloads> > and now I am getting following error > > >> In file included from /home/aanalmehta/Android/android_ndk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/type_traits:406: >> /home/aanalmehta/Android/android_ndk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/cstddef:50:9: error: no member named 'ptrdiff_t' in the global namespace >> using ::ptrdiff_t; >> ~~^ > > > 3. Do I need all four folders - arm64-v8a, armeabi-v7a, x86 and x86_64? If yes then how to generate all four folders? As I am giving > > TARGET_ABI=arm64-v8a ./configure-android --use-ndk-cflags --with-ssl=[your_openssl_path]/openssl-1.0.2a > it's only generating arm64-v8a folder inside jniLibs. > > 4. If I got success in generating .so file then how to use it in my current project. What things need to be taken care? > > > > Your answers will help me a lot. > > Thank you for your precious time. > > > > Thanks and regards, > > Aanal Mehta > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org