New account registation problem

85 views
Skip to first unread message

firstime

unread,
May 28, 2012, 10:33:30 PM5/28/12
to CSipSimple Development
Hello, everyone. My problem is when i run csipsimple, it reports can't
find native library. I describe all my steps following in detail, wish
your help, thanks.My linux OS is ubuntu10.04, and ndk is r6.

1. I installed packages, subversion, git, quilt, unzip, wget, swig2.0,
python, make and yasm.
2. I unzip NDK at /usr/local/android:
$ sudo mkdir /usr/local/android
$ sudo tar -zxvf android-ndk-r6-crystax-2-linux-x86.tar /usr/local/
android
because i only build native library on ubuntu, so i didn't install
SDK
3. Modify environment setting:
$ sudo vim /etc/environment
then append the path of ndk, /usr/local/android/android-ndk-r6-
crystax-2, to PATH
4. Modify .bashrc, append following lines to it:
export ANDROID_NDK=/usr/local/android/android-ndk-r6-crystax-2/
export PATH=$PATH:$ANDROID_NDK
because i only build native library on ubuntu, so i haven't added
other lines which is about SDK. But, i think this step is identical to
steps 2 and 3.
5. I check out the source code:
$ mkdir ~/csipsimple
$ cd ~/csipsimple
$ svn checkout http://csipsimple.googlecode.com/svn/trunk/CSipSimple/
csipsimple
6. Make the source:
$ cd csipsimple
$ make SWIG=swig
7. Create Local.mk:
$ vim jni/Local.mk
then input lines: APP_OPTIM := debug
8. Build native library:
$ ndk-build
9. Unzip csipsimple on Windows, and checkout ActionBarSherlock, then
import the two project in Eclipse.
10. Copy native library to csipsimple project root directory, it likes
this:
csipsimple
├─.externalToolBuilders
├─.tx
├─art
├─assets
├─bin
├─gen
├─jni
├─libs
│ ├─armeabi
│ └─armeabi-v7a
├─res
└─src
11. Build and install the apk onto my cellphone which is android 2.2
in Eclipse.

When the apk is runing, logs from Eclipse's logcat show error:
05-29 09:41:29.173: E/PjService(1060): We have a problem with the
current stack.... NOT YET Implemented
05-29 09:41:29.173: E/PjService(1060): java.lang.UnsatisfiedLinkError:
Library pjsipjni not found
05-29 09:41:29.173: E/PjService(1060): at
java.lang.Runtime.loadLibrary(Runtime.java:461)
05-29 09:41:29.173: E/PjService(1060): at
java.lang.System.loadLibrary(System.java:557)
05-29 09:41:29.173: E/PjService(1060): at
com.csipsimple.pjsip.PjSipService.tryToLoadStack(PjSipService.java:
139)
05-29 09:41:29.173: E/PjService(1060): at
com.csipsimple.service.SipService.loadStack(SipService.java:1037)
05-29 09:41:29.173: E/PjService(1060): at
com.csipsimple.service.SipService.onStart(SipService.java:960)
05-29 09:41:29.173: E/PjService(1060): at
android.app.Service.onStartCommand(Service.java:420)
05-29 09:41:29.173: E/PjService(1060): at
android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3095)
05-29 09:41:29.173: E/PjService(1060): at
android.app.ActivityThread.access$3600(ActivityThread.java:132)
05-29 09:41:29.173: E/PjService(1060): at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:2134)
05-29 09:41:29.173: E/PjService(1060): at
android.os.Handler.dispatchMessage(Handler.java:99)
05-29 09:41:29.173: E/PjService(1060): at
android.os.Looper.loop(Looper.java:123)
05-29 09:41:29.173: E/PjService(1060): at
android.app.ActivityThread.main(ActivityThread.java:4669)
05-29 09:41:29.173: E/PjService(1060): at
java.lang.reflect.Method.invokeNative(Native Method)
05-29 09:41:29.173: E/PjService(1060): at
java.lang.reflect.Method.invoke(Method.java:521)
05-29 09:41:29.173: E/PjService(1060): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:876)
05-29 09:41:29.173: E/PjService(1060): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
05-29 09:41:29.173: E/PjService(1060): at
dalvik.system.NativeStart.main(Native Method)

So, these are all steps, please help me, thanks.

Régis Montoya

unread,
May 29, 2012, 4:14:37 AM5/29/12
to csipsim...@googlegroups.com

Please follow the HowToBuild wiki page steps instead.

In your process there is several diffs with the HowToBuild wiki page which are critical.

For example use the official ndk r8, use swig2.0 instead of swig, use my version of Action Bar Sherlock instead of one from ABS project.
All of these is described step by step in the HowToBuild wiki page.

If you get an error in whatever step check the console error trace and copy it here so that we can help. And don't proceed next step if you have an error.

Tip : use "echo $?" To know if last command succeeded or not.

firstime

unread,
May 30, 2012, 2:40:07 AM5/30/12
to CSipSimple Development
Ok, there is a good news. The problem is resolved. i'm failed at my
NDK beening different from official version. And, when i try the r7 or
r8 of official, it's ok.
Thanks.
> >    $ svn checkouthttp://csipsimple.googlecode.com/svn/trunk/CSipSimple/

Régis Montoya

unread,
May 30, 2012, 5:59:45 AM5/30/12
to csipsim...@googlegroups.com
Great.

Yes, normally if no adding the Local.mk file to restrict arch ndk r8 is
even required. Else the toochain will not find how to build the mips arch.

Crystax ndk is not needed anymore since std/c++ is now fully supported
by official ndks.
Reply all
Reply to author
Forward
0 new messages