1

I am trying to create a csipsimple project as written in this tutorial. I followed it through, but I cannot get it working. These are the logs I get: While building NDK, I get numerous similar errors

Android NDK: No local settings... build all in release mode !    
Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 4 in ./AndroidManifest.xml    
Android NDK: WARNING:jni/openssl/android_toolchain/Android.mk:crypto_ec_static: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:jni/openssl/sources/crypto/Android.mk:crypto_static: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:jni/pjsip/android_toolchain/pjmedia/Android.mk:pj_video_android: non-system libraries in linker flags: jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/ffmpeg/armeabi/lib/libavcodec.a jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/ffmpeg/armeabi/lib/libavformat.a jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/ffmpeg/armeabi/lib/libswscale.a jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/ffmpeg/armeabi/lib/libavutil.a jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/x264/armeabi/lib/libx264.a    
Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES    
Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the    
Android NDK:     current module    

And in the end after seemingly successful compilation I get this:

swig2.0 -DPJ_ANDROID=1 -DUSE_CSIPSIMPLE=1 -DPJMEDIA_HAS_G729_CODEC=1 -DPJMEDIA_HAS_G726_CODEC=1 -DPJMEDIA_HAS_ILBC_CODEC=0 -DPJMEDIA_HAS_G722_CODEC=1 -DPJMEDIA_HAS_SPEEX_CODEC=1 -DPJMEDIA_HAS_GSM_CODEC=1 -DPJMEDIA_HAS_SILK_CODEC=1 -DPJMEDIA_HAS_CODEC2_CODEC=1 -DPJMEDIA_HAS_G7221_CODEC=1 -DPJMEDIA_HAS_WEBRTC_CODEC=1 -DPJMEDIA_HAS_OPENCORE_AMRNB_CODEC=1 -DPJMEDIA_HAS_OPENCORE_AMRWB_CODEC=1 -DPJMEDIA_HAS_OPUS_CODEC=1 -DPJMEDIA_HAS_WEBRTC_AEC=1 -DPJMEDIA_HAS_VIDEO=1 -DPJMEDIA_VIDEO_DEV_HAS_CBAR_SRC=0 -DPJ_HAS_SSL_SOCK=1 -DPJMEDIA_HAS_ZRTP=1 -DPJSUA_SDP_SESS_HAS_CONN=1 -DPJ_AUTOCONF=1 -DPJ_HAS_FLOATING_POINT=1 \
        -Ijni/swig-glue/android_toolchain/../../csipsimple-wrapper/include \
        -Ijni/swig-glue/android_toolchain/../../pjsip_mod_reghandler/include \
        -Ijni/swig-glue/android_toolchain/../../pjsip_mod_sipclf/include \
        -Ijni/swig-glue/android_toolchain/../../pjsip_mod_earlylock/include \
        -o jni/swig-glue/android_toolchain/../nativesrc/pjsua_wrap.cpp \
        -outdir src/org/pjsip/pjsua -java -package org.pjsip.pjsua \
        -c++ jni/swig-glue/android_toolchain/../.interface.i
make[1]: execvp: swig2.0: Permission denied
make[1]: *** [jni/swig-glue/android_toolchain/../nativesrc/pjsua_wrap.cpp] Error 127
make[1]: *** Waiting for unfinished jobs....
rm jni/swig-glue/android_toolchain/../.pjsua.i jni/swig-glue/android_toolchain/../.interface.i
make[1]: Leaving directory `/Users/xxx/Documents/sip/CSipSimple-trunk/CSipSimple'
make: *** [libraries] Error 2

P.S. I run as root.

SOLUTION I had swig installed, but it was installed incorrectly.

Heisenberg
  • 3,153
  • 3
  • 27
  • 55
  • This seems a permissions issue. Do you have root write permission in folder 'src/org/pjsip/pjsua' ? – jcm Nov 26 '13 at 10:13
  • 1
    Do you have swig2.0 installed? As far as I can recall, error 127 means "command not found" – jcm Nov 26 '13 at 12:34

1 Answers1

2

Finally, I found solution. There is a mistake while linking.

1 - If you have a link, please remove old link.

2 - And write this command to terminal :

sudo link -s /usr/local/bin/swig /opt/local/bin/swig2.0

I hope this will work

Arda Ç.
  • 504
  • 5
  • 7