Can't load native library. CPU arch invalid for this build

1,506 views
Skip to first unread message

Mhisham

unread,
Aug 5, 2012, 12:25:36 PM8/5/12
to csipsim...@googlegroups.com
Hello,
I downloaded latest SVN trunk and followed steps from this link https://code.google.com/p/csipsimple/wiki/HowToBuild

everything goes well and compiled without errors 

but when install the apk on some devices i got toast message with this content "Can't load native library. CPU arch invalid for this build"
i searched in the forum about it and you mention to check if folders inside "libs" have libpjsipjni.so

and it's there so where\s the problem 
Please Advice 

Thank you

Régis Montoya

unread,
Aug 5, 2012, 1:05:05 PM8/5/12
to csipsim...@googlegroups.com
What are the devices where you get this problem? Maybe actually a
problem with CPU arch ;).

Dev Mhisham

unread,
Aug 5, 2012, 1:37:41 PM8/5/12
to csipsim...@googlegroups.com, csipsim...@googlegroups.com
HTC Sensation, yes problem with CPU

Regards !
Mohamed Hisham
Development Team Leader
Sent from My Lovely iPhone

Dev Mhisham

unread,
Aug 5, 2012, 1:41:17 PM8/5/12
to csipsim...@googlegroups.com
How can i solve this issue?


Regards !
Mohamed Hisham
Development Team Leader
Sent from My Lovely iPhone

Régis Montoya

unread,
Aug 5, 2012, 1:56:52 PM8/5/12
to csipsim...@googlegroups.com
Well, normally HTC Sensation has armeabi-v7a compatible cpu.
So if you have ".so" file it should be fine unless something goes wrong in the so file compiled.

It could be interesting to see the logs on the device. Use logcat.

Mohamed hisham

unread,
Aug 5, 2012, 2:09:47 PM8/5/12
to csipsim...@googlegroups.com
in attachment log file and libs folder too 
log.txt
libs.zip

Régis Montoya

unread,
Aug 5, 2012, 2:54:50 PM8/5/12
to csipsim...@googlegroups.com
Ok,
That's weird, there is a symbol in your build that is not in builds I produce with my version of the NDK and options of the default build.

Did you changed the toolchain or added some code ? Maybe for something that was blocking you while building. Sometimes there's some change that may appear good ideas since it suppress an error, but it finally result in more complicate errors ;).  BTW, just to be sure, you build with "make", not with "ndk-build" command line?
Also what is your version of the NDK ?

Maybe it's the gcc of the mac ndk that produces this weird thing. Linux is usually better to develop. Mac hides a lot of things and I would not be surprised if the NDK has a bug on mac or windows (it's not the first goal of these tools even if normally compatible).

Dev Mhisham

unread,
Aug 5, 2012, 4:07:27 PM8/5/12
to csipsim...@googlegroups.com
Mmm, i didn't change any thing in the code just make steps in the link :)
Anyway i'll try to compile via linux machine

Btw my NDK r8 latest ndk 
I'll try with ndk r7 and r5 from mac and feedback if it works or not then try from linux i think it's good to catch from where this issue ;)

Regards !
Mohamed Hisham
Development Team Leader
Sent from My Lovely iPhone

Régis Montoya

unread,
Aug 5, 2012, 4:26:23 PM8/5/12
to csipsim...@googlegroups.com
Ok,

It should be fine with r8. No need to try with r7. I think that it will not build (mips arch was not there yet).

Weird that this symbol is produced. It could have changed if some different gcc flags were passed, but if you changed nothing the only thing that comes to my mind is something with the behavior of the gcc binary depending on the host arch.

Both my desktop pc and the automatic build server doesn't produce this symbol with the same code, so very weird. Maybe could be something on the installation of the NDK on macosx. For using it sometimes (only when really required), I know this OS hides a lot of things and that sometimes it's not easy to deal with paths. So maybe could be something with the NDK installation that get messed with paths and produces using a gcc located somewhere else. Could be interesting to pass the ndk-build in verbose mode. To do so, in edit the makefile and add V=1 to the ndk-build -j6 command line. Just to see where is the gcc used.

Regards,
Régis

Danilo Canivel

unread,
Nov 29, 2012, 10:27:53 AM11/29/12
to csipsim...@googlegroups.com
Hi, im having the exactly same issue here... already tried with the org.pjsip package that is in org.tar.gz , but happens the same problem as well.... i really downt know what to do....

Régis Montoya

unread,
Nov 29, 2012, 11:11:44 AM11/29/12
to csipsim...@googlegroups.com

Did you also downloaded the ".so" file from a latest nightly build?


BTW, just big warning : developing on windows is not really supported. There's workaround to make it possible but that's not the best way to develop on the top of the app ;). Windows is definitely not an OS for developers ;)

Danilo Canivel

unread,
Nov 29, 2012, 11:15:59 AM11/29/12
to csipsim...@googlegroups.com
I will try that tks... im on Mountain Lion(Mac OS)

tks

Régis Montoya

unread,
Nov 29, 2012, 2:40:11 PM11/29/12
to csipsim...@googlegroups.com
Oh, ok. So you can follow steps of the HowToBuild wiki page. It should be fine to build the native lib :)

Danilo Canivel

unread,
Nov 29, 2012, 6:33:28 PM11/29/12
to csipsim...@googlegroups.com
Tks man!!! thats solve my issue.!

Farzan Doroodgar

unread,
Jul 7, 2015, 9:26:15 AM7/7/15
to csipsim...@googlegroups.com
If you are building from Eclipse. make sure that your libraries are put in libs folder not in lib folder. I had the same issue and after renaming lib to libs it fixed.

Harold Danielle Hernandez

unread,
Oct 6, 2015, 8:54:51 AM10/6/15
to CSipSimple Development
Hi r3gis,

I'm getting the same error for Galaxy S6 Edge+, and I just want to confirm if this device is supported. So far works on all devices I've tested on except that. 

Not sure if it's an architecture issue that CSipSimple hasn't supported yet. If it is, is there some way I can resolve this? 

Thanks.

(Apologies in advance if this is not the right thread, as I don't want to create duplicate posts related to this topic)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages