Я потратил много времени, пытаясь создать эту библиотеку для Android. Мне удалось собрать PJSUA2 для архитектур arm64-v8a
и armeabi-v7a
, но он не работает с ошибками для x86_64
и x86
.
Я обновил репозиторий последней версией (2.9) в надежде, что ошибка будет исправлена. Но новая версия даже не создает файлы *.a.
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/cstddef:50:9: error: no member named
'ptrdiff_t' in the global namespace
using ::ptrdiff_t;
~~^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/cstddef:51:9: error: no member named
'size_t' in the global namespace
using ::size_t;
~~^
In file included from ../../yuv/source/compare.cc:14:
In file included from /home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/math.h:309:
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:763:22: error: unknown type
name 'size_t'
template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]>
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1282:32: error: use of
undeclared identifier 'size_t'; did you mean 'sizeof'?
: public integral_constant<size_t, 0> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1282:38: error: expected
expression
: public integral_constant<size_t, 0> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1282:43: error: expected
class name
: public integral_constant<size_t, 0> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1284:32: error: use of
undeclared identifier 'size_t'; did you mean 'sizeof'?
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1284:38: error: expected
expression
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1284:49: error: expected
class name
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1285:22: error: unknown
type name 'size_t'
template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]>
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1286:32: error: use of
undeclared identifier 'size_t'; did you mean 'sizeof'?
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1286:38: error: expected
expression
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1286:49: error: expected
class name
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1297:32: error: use of
undeclared identifier 'size_t'; did you mean 'sizeof'?
: public integral_constant<size_t, 0> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1297:38: error: expected
expression
: public integral_constant<size_t, 0> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1297:43: error: expected
class name
: public integral_constant<size_t, 0> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1299:32: error: use of
undeclared identifier 'size_t'; did you mean 'sizeof'?
: public integral_constant<size_t, 0> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1299:38: error: expected
expression
: public integral_constant<size_t, 0> {};
^
/home/adminz/android/sdk/ndk/20.0.5594570/sources/cxx-stl/llvm-libc++/include/type_traits:1299:43: error: expected
class name
: public integral_constant<size_t, 0> {};
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Прежде чем я обновлю свой репозиторий svn до версии выпуска, ошибки будут следующими:
/home/adminz/android/pjsip/third_party/lib/libwebrtc-x86_64-pc-linux-android.a(aec_core.o):aec_core.c:function WebRtcAec_CreateAec: error: undefined reference to 'WebRtc_GetCPUInfo'
/home/adminz/android/pjsip/third_party/lib/libwebrtc-x86_64-pc-linux-android.a(aec_core.o):aec_core.c:function WebRtcAec_CreateAec: error: undefined reference to 'WebRtcAec_InitAec_SSE2'
/home/adminz/android/pjsip/third_party/lib/libwebrtc-x86_64-pc-linux-android.a(aec_rdft.o):aec_rdft.c:function aec_rdft_init: error: undefined reference to 'WebRtc_GetCPUInfo'
/home/adminz/android/pjsip/third_party/lib/libwebrtc-x86_64-pc-linux-android.a(aec_rdft.o):aec_rdft.c:function aec_rdft_init: error: undefined reference to 'aec_rdft_init_sse2'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:165: recipe for target 'android/app/src/main/jniLibs/x86_64/libpjsua2.so' failed
Должны ли мы также попытаться исправить внутренние ошибки библиотеки? Мой окончательный вывод заключается в том, что PjProject - это хитрое изобретение (для некоторых платформ), и его разработчики даже недостаточно тестируют версию выпуска, и они используют пользователей в качестве своего тестового примера. Я так разочарован pjsip. Столько функций, сколько бесполезных пакетов.
person
JamesNickel
schedule
24.10.2019