Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error While building PJSiP in Android

When i tried to put this command while building pjsip for android,

TARGET_ABI=armeabi-v7a ./configure-android --use-ndk-cflags

This error occured,

compiler not found, please check environment settings (TARGET_ABI, etc)

can somebody give me an explanation.pls

like image 855
karthi keyan Avatar asked Jul 11 '26 22:07

karthi keyan


1 Answers

I'm sure you've moved on past this by now, but for anyone else who finds this thread:

Just set the NDK_TOOLCHAIN_VERSION environment variable to 4.9

This can be done either by doing an export prior to the configure call:

export NDK_TOOLCHAIN_VERSION=4.9
./configure-android

or on the same command line as the configure call:

NDK_TOOLCHAIN_VERSION=4.9 TARGET_ABI=<whatever> ./configure-android --use-ndk-cflags

In revision 13+ of the android NDK, the default compiler is Clang instead of GCC. PJSIP 2.6 (newest as of this writing) is not yet updated to parse for the Clang compiler location correctly, so it claims "compiler not found, please check environment settings". Setting the NDK_TOOLCHAIN_VERSION to 4.9 forces the NDK to use GCC in place of Clang, and then PJSIP will be happy.

According to the NDK revision history, GCC will be removed in a future release. So if someone reading this is using a version of the NDK where it's been removed (which hasn't happened yet at the time of this writing), you'll need to just downgrade your NDK.

This solution comes from this answer and the corresponding PJSIP ticket can be found here.

like image 84
Connor Avatar answered Jul 14 '26 13:07

Connor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!