1

I have successfully till TARGET_ABI https://trac.pjsip.org/repos/wiki/Getting-Started/Android.

When I tried to build sample Application, I am having following errors.

/Android/android_ndk/android-ndk-r17c-linux-x86_64/android-ndk-r17c/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
/Android/android_ndk/android-ndk-r17c-linux-x86_64/android-ndk-r17c/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 '/Documents/PjsipSample/pjproject-2.9/pjsip-apps/src/swig/java'
    Makefile:27: recipe for target 'all' failed
    make: *** [all] Error 1

I am not able to build *.so files. Swig Version : 3.0.12 Ndk: r13 Ubuntu: 18.04

Can anyone help me with this?

Aanal Shah
  • 1,946
  • 2
  • 20
  • 30
  • This is because of your NDK r13 doesn't have toolchain for latest sample app pls use [latest NDK version](https://developer.android.com/ndk/downloads/revision_history.html) else where you can use r17c which have all required toolchains for build your app – Ajay Pandya Sep 07 '19 at 05:30
  • let me try with that again. Thanks! – Aanal Shah Sep 07 '19 at 06:27
  • @AjayPandya, I tried with r17. It worked for armeabi-v7a but not for arm64-v8a. :( Do you have any idea for that? – Aanal Shah Sep 07 '19 at 07:49
  • output/pjsua2_wrap.o: error adding symbols: File in wrong format 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/PjsipAanalSample/pjproject-2.9/pjsip-apps/src/swig/java' Makefile:27: recipe for target 'all' failed make: *** [all] Error 1 – Aanal Shah Sep 07 '19 at 07:50
  • Hey sorry for delay i'm using ndk r20 it's work nicely for me but i'm using mac.pls first check toolchain folder from your downloaded ndk-bndle if you find required platfrom use it but as per my knowledge r20 should work fine :) – Ajay Pandya Sep 07 '19 at 10:43
  • One more thing is latest platform if you will use r20 than it's batter to support latest android api's with 64 bit architecture – Ajay Pandya Sep 07 '19 at 10:44
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/199107/discussion-between-ajay-pandya-and-aanal-mehta). – Ajay Pandya Sep 07 '19 at 10:53
  • Hey @AjayPandya sorry for the late but I am still getting the same error for r20(Downloaded from the abouve mentioned link by you). I have set TARGET_ABI=arm64-v8a ./configure-android --use-ndk-cflags. Can you please help me with this? – Aanal Shah Sep 22 '19 at 11:25
  • All I can see in toolchains folder is: renderscript x86-4.9 arm-linux-androideabi-4.9 llvm x86_64-4.9 aarch64-linux-android-4.9 ndk-build ndk-which NOTICE.toolchain README.md. Am I doing anything wrong here? – Aanal Shah Sep 22 '19 at 11:32
  • @AanalMehta Hii, Do you solved this problem. Because me too facing the same problem but in version 2.10. – Kousalya Jan 21 '21 at 12:20
  • @Kousalya No, I could not solve the issue. At last I used 2.6 version but faced video call issues and now I am not using pjsip anymore. – Aanal Shah Jan 25 '21 at 07:28

0 Answers0