我通过以下方式在mint linux和mac OS机器上下载了pjsip存储库2.7.2:
svn checkout http://svn.pjsip.org/repos/pjproject/tags/2.7.2/
我尝试按照Getting Started Android中的说明操作,然后通过添加
/* Activate Android specific settings in the 'config_site_sample.h' */
#define PJ_CONFIG_ANDROID 1
#include <pj/config_site_sample.h>
然后我
$ cd /path/to/your/pjsip/dir
$ export ANDROID_NDK_ROOT=/path_to_android_ndk_dir
每次运行./configure-android时都会收到错误,如下所示:
configure-android: APP_PLATFORM not specified, using android-27
configure-android: TARGET_ABI not specified, using armeabi
configure-android: calling ./configure with env vars:
CC = /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
CXX = /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++
CFLAGS = --sysroot=/home/infinity/Downloads/android-ndk-r16b/platforms/android-27/arch-arm -I/home/infinity/Downloads/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include -I/home/infinity/Downloads/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include
CXXFLAGS = -shared --sysroot=/home/infinity/Downloads/android-ndk-r16b/platforms/android-27/arch-arm -fexceptions -frtti
LDFLAGS = --sysroot=/home/infinity/Downloads/android-ndk-r16b/platforms/android-27/arch-arm -L/home/infinity/Downloads/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/
LIBS = -lgnustl_static -lc -lgcc
AR = /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar
RANLIB = /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib
TARGET_HOST = arm-linux-androideabi
TARGET_ABI = armeabi
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-androideabi
checking target system type... arm-unknown-linux-androideabi
checking for arm-linux-androideabi-gcc... /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc accepts -g... yes
checking for /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc option to accept ISO C89... unsupported
checking whether we are using the GNU C++ compiler... yes
checking whether /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ accepts -g... yes
checking for arm-linux-androideabi-ranlib... /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib
checking for arm-linux-androideabi-ar... /home/infinity/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar
checking for pthread_create in -lpthread... no
checking for puts in -lwsock32... no
checking for puts in -lws2_32... no
checking for puts in -lole32... no
checking for puts in -lwinmm... no
checking for puts in -lsocket... no
checking for puts in -lrt... no
checking for sin in -lm... yes
checking for uuid_generate in -luuid... no
checking for uuid_generate in -luuid... (cached) no
checking for library containing gethostbyname... none required
Setting PJ_M_NAME to arm
checking memory alignment... 4 bytes (default)
checking how to run the C preprocessor... /lib/cpp
aconfigure: error: in `/home/infinity/Downloads/2.7.2':
aconfigure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details