I am trying to start project:
https://mechatronicsblog.com/tensorflow-lite-integration-with-qt-and-v-play-for-multi-platform-machine-learning-apps-on-ios-and-android/
But there is an issue - Tensorflow submodule is incorrect.
I downloaded Tensorflow library from main repo by the following command:
git clone https://github.com/tensorflow/tensorflow.git
Then I updated dependencies:
tensorflow/lite/tools/make/download_dependencies.sh
Then I built the library by the following command:
bazel build --cxxopt='-D_GLIBCXX_USE_CXX11_ABI=0' -c opt --config=android_arm tensorflow/lite/java:libtensorflowlite_jni
Here's what WORKSPACE looks like:
android_sdk_repository(
name = "androidsdk",
api_level = 21,
build_tools_version = "26.0.2",
path = "/home/user/Android/SDK",
)
android_ndk_repository(
name = "androidndk",
api_level = 20,
path = "/home/user/android-ndk-r20b",
)
The result was successful.
Then I copied the library folder and pasted it in the root of the project folder.
I did not change .pro file
# TensorFlow Lite - Global
TENSORFLOW_PATH = $$PWD/tensorflow/
TFLITE_MAKE_PATH = $$TENSORFLOW_PATH/tensorflow/lite/tools/make
INCLUDEPATH += $$TENSORFLOW_PATH \
$$TFLITE_MAKE_PATH/downloads/ \
$$TFLITE_MAKE_PATH/downloads/eigen \
$$TFLITE_MAKE_PATH/downloads/gemmlowp \
$$TFLITE_MAKE_PATH/downloads/neon_2_sse \
$$TFLITE_MAKE_PATH/downloads/farmhash/src \
$$TFLITE_MAKE_PATH/downloads/flatbuffers/include
# TensorFlow Lite - Linux
linux:!android {
INCLUDEPATH += -L$$TFLITE_MAKE_PATH/gen/linux_x86_64/obj
LIBS += -L$$TFLITE_MAKE_PATH/gen/linux_x86_64/lib/ \
-ltensorflow-lite -ldl
}
# TensorFlow Lite - Android - armv7a
android {
QT += androidextras
LIBS += -L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite \
-L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite/c \
-L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite/core/api \
-L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite/kernels \
-L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite/kernels/internal \
-L$$TENSORFLOW_PATH/bazel-bin/external/androidndk \
-L$$TENSORFLOW_PATH/bazel-bin/external/farmhash_archive \
-L$$TENSORFLOW_PATH/bazel-bin/external/fft2d \
-L$$TENSORFLOW_PATH/bazel-bin/external/flatbuffers \
-lframework -larena_planner -lsimple_memory_arena -lutil -lapi -lc_api_internal \
-lbuiltin_ops -lbuiltin_op_kernels -lkernel_util -leigen_support -lgemm_support \
-laudio_utils -lkernel_utils -ltensor_utils -lneon_tensor_utils -lquantization_util \
-llstm_eval -lstring_util -lcpufeatures -lfarmhash -lfft2d -lflatbuffers
}
# TensorFlow Lite - iOS - Universal library
ios {
LIBS += -L$$TFLITE_MAKE_PATH/gen/lib/ \
-framework Accelerate \
-ltensorflow-lite
}
Then I built it up in the following project environment:
Qt Creator 4.11.2
Android NDK 20.1.5948944
Android SDK 26.1.1
Compiler Clang Qt 5.13.2 for Android ARMv7
JVM java-8-oracle
The result was failed.
Error:
/home/user/FelgoProjects/TensorFlowLiteQtVPlay/tensorflow/tensorflow/lite/delegates/nnapi/nnapi_delegate.h:23: error: 'absl/types/optional.h' file not found
#include "absl/types/optional.h"
I would like to know how to build up and include Tensorflow library for Qt project.
EDITED:
I edited .pro file to add libraries:
# TensorFlow Lite - Global
TENSORFLOW_PATH = $$PWD/tensorflow/
TFLITE_MAKE_PATH = $$TENSORFLOW_PATH/tensorflow/lite/tools/make
INCLUDEPATH += $$TENSORFLOW_PATH \
$$TFLITE_MAKE_PATH/downloads/ \
$$TFLITE_MAKE_PATH/downloads/eigen \
$$TFLITE_MAKE_PATH/downloads/gemmlowp \
$$TFLITE_MAKE_PATH/downloads/neon_2_sse \
$$TFLITE_MAKE_PATH/downloads/farmhash/src \
$$TFLITE_MAKE_PATH/downloads/flatbuffers/include
# TensorFlow Lite - Android - armv7a
android {
QT += androidextras
LIBS += -L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite \
-L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite/c \
-L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite/core/api \
-L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite/kernels \
-L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite/kernels/internal \
-L$$TENSORFLOW_PATH/bazel-bin/tensorflow/lite/nnapi \
-L$$TENSORFLOW_PATH/bazel-bin/external/androidndk \
-L$$TENSORFLOW_PATH/bazel-bin/external/farmhash_archive \
-L$$TENSORFLOW_PATH/bazel-bin/external/fft2d \
-L$$TENSORFLOW_PATH/bazel-bin/external/flatbuffers \
-L$$TENSORFLOW_PATH/bazel-bin/external/flatbuffers/src \
-L$$TENSORFLOW_PATH/bazel-bin/external/ruy/ruy \
-L$$TENSORFLOW_PATH/bazel-bin/external/ruy/ruy/profiler \
-lallocation.pic -larena_planner.pic -larena_planner.pic -lminimal_logging.pic \
-lsimple_memory_arena.pic -lstring_util.pic -lutil.pic \
-lapi.pic -lbuiltin_op_kernels.pic -lbuiltin_ops.pic -lcpu_backend_context.pic -lcpu_backend_gemm.pic -leigen_support.pic \
-lkernel_util.pic -llstm_eval.pic -laudio_utils.pic -lkernel_utils.pic -lneon_tensor_utils.pic \
-lportable_tensor_utils.pic -ltensor_utils.pic -lquantization_util.pic -ltranspose_utils.pic \
-lfarmhash.pic -lfft2d.pic -lflatbuffers.pic \
-lallocator.pic -lapply_multiplier.pic -lblocking_counter.pic -lblock_map.pic -lcontext.pic -lcontext_get_ctx.pic \
-lctx.pic -ldetect_arm.pic -ldetect_x86.pic -lhave_built_path_for_avx2.pic -lhave_built_path_for_avx512.pic \
-lhave_built_path_for_avxvnni.pic -lhave_built_path_for_sse42.pic -lkernel_arm.pic -lkernel_avx2.pic \
-lkernel_avx512.pic -lkernel_avxvnni.pic -lkernel_sse42.pic -lpack_arm.pic -lpack_avx2.pic -lpack_avx512.pic \
-lpack_avxvnni.pic -lpack_sse42.pic -lprepacked_cache.pic -lthread_pool.pic -ltrace.pic -ltrmul.pic \
-ltune.pic -lwait.pic -linstrumentation.pic -lnnapi_implementation.pic -lnnapi_util.pic
}
There are some errors after building.
tensorflow/lite/util.cc:47: error: undefined reference to 'TfLiteIntArrayCreate'
tensorflow/lite/util.cc:47: error: undefined reference to 'TfLiteIntArrayCreate'
tensorflow/lite/kernels/activations.cc:265: error: undefined reference to 'TfLiteIntArrayCopy'
tensorflow/lite/kernels/activations.cc:291: error: undefined reference to 'TfLiteIntArrayCopy'
tensorflow/lite/kernels/activations.cc:380: error: undefined reference to 'TfLiteIntArrayCopy'
tensorflow/lite/kernels/activations.cc:612: error: undefined reference to 'TfLiteIntArrayCopy'
tensorflow/lite/kernels/activations.cc:729: error: undefined reference to 'TfLiteTypeGetName'
tensorflow/lite/kernels/activations.cc:757: error: undefined reference to 'TfLiteTypeGetName'
tensorflow/lite/kernels/activations.cc:840: error: undefined reference to 'TfLiteTypeGetName'
tensorflow/lite/kernels/activations.cc:1084: error: undefined reference to 'TfLiteTypeGetName'
tensorflow/lite/kernels/arg_min_max.cc:40: error: undefined reference to 'TfLiteIntArrayCreate'
tensorflow/lite/kernels/arg_min_max.cc:40: error: undefined reference to 'TfLiteIntArrayCreate'
tensorflow/lite/kernels/basic_rnn.cc:104: error: undefined reference to 'TfLiteIntArrayFree'
tensorflow/lite/kernels/basic_rnn.cc:110: error: undefined reference to 'TfLiteIntArrayEqual'
tensorflow/lite/kernels/basic_rnn.cc:120: error: undefined reference to 'TfLiteIntArrayEqual'
tensorflow/lite/kernels/basic_rnn.cc:133: error: undefined reference to 'TfLiteIntArrayEqualsArray'
tensorflow/lite/kernels/basic_rnn.cc:144: error: undefined reference to 'TfLiteIntArrayEqualsArray'
tensorflow/lite/kernels/basic_rnn.cc:157: error: undefined reference to 'TfLiteIntArrayEqualsArray'
tensorflow/lite/kernels/basic_rnn.cc:168: error: undefined reference to 'TfLiteIntArrayEqualsArray'
tensorflow/lite/kernels/batch_matmul.cc:108: error: undefined reference to 'TfLiteIntArrayFree'
tensorflow/lite/kernels/bidirectional_sequence_lstm.cc:527: error: undefined reference to 'TfLiteIntArrayFree'
tensorflow/lite/kernels/bidirectional_sequence_lstm.cc:527: error: undefined reference to 'TfLiteIntArrayFree'
tensorflow/lite/kernels/bidirectional_sequence_lstm.cc:630: error: undefined reference to 'TfLiteIntArrayEqual'
tensorflow/lite/kernels/bidirectional_sequence_lstm.cc:642: error: undefined reference to 'TfLiteIntArrayEqual'
./tensorflow/lite/kernels/internal/reference/densify.h:36: error: undefined reference to 'tflite::optimize::sparsity::FormatConverter<float>::FormatConverter(std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&, TfLiteSparsity const&)'
./tensorflow/lite/kernels/internal/reference/densify.h:38: error: undefined reference to 'tflite::optimize::sparsity::FormatConverter<float>::SparseToDense(float const*)'
./tensorflow/lite/kernels/internal/reference/densify.h:36: error: undefined reference to 'tflite::optimize::sparsity::FormatConverter<signed char>::FormatConverter(std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&, TfLiteSparsity const&)'
./tensorflow/lite/kernels/internal/reference/densify.h:38: error: undefined reference to 'tflite::optimize::sparsity::FormatConverter<signed char>::SparseToDense(signed char const*)'
tensorflow/lite/kernels/embedding_lookup_sparse.cc:178: error: undefined reference to 'TfLiteTensorRealloc'
tensorflow/lite/kernels/expand_dims.cc:105: error: undefined reference to 'TfLiteTensorRealloc'
./tensorflow/lite/kernels/internal/reference/sparse_ops/fully_connected.h:35: error: undefined reference to 'tflite::optimize::sparsity::FormatConverter<float>::FormatConverter(std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&, TfLiteSparsity const&)'
./tensorflow/lite/kernels/internal/reference/sparse_ops/fully_connected.h:37: error: undefined reference to 'tflite::optimize::sparsity::FormatConverter<float>::SparseToDense(float const*)'
tensorflow/lite/kernels/if.cc:85: error: undefined reference to 'tflite::impl::Subgraph::ResizeInputTensor(int, std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&)'
tensorflow/lite/kernels/if.cc:92: error: undefined reference to 'tflite::impl::Subgraph::AllocateTensors()'
tensorflow/lite/kernels/if.cc:85: error: undefined reference to 'tflite::impl::Subgraph::ResizeInputTensor(int, std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&)'
tensorflow/lite/kernels/if.cc:92: error: undefined reference to 'tflite::impl::Subgraph::AllocateTensors()'
tensorflow/lite/kernels/if.cc:155: error: undefined reference to 'tflite::impl::Subgraph::Invoke()'
tensorflow/lite/kernels/reshape.cc:156: error: undefined reference to 'TfLiteTensorRealloc'
tensorflow/lite/kernels/while.cc:152: error: undefined reference to 'tflite::impl::Subgraph::AllocateTensors()'
tensorflow/lite/kernels/while.cc:170: error: undefined reference to 'tflite::impl::Subgraph::AllocateTensors()'
tensorflow/lite/kernels/while.cc:57: error: undefined reference to 'tflite::impl::Subgraph::ResizeInputTensor(int, std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&)'
tensorflow/lite/kernels/while.cc:267: error: undefined reference to 'tflite::impl::Subgraph::Invoke()'
tensorflow/lite/kernels/while.cc:292: error: undefined reference to 'tflite::impl::Subgraph::Invoke()'
tensorflow/lite/kernels/while.cc:57: error: undefined reference to 'tflite::impl::Subgraph::ResizeInputTensor(int, std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&)'
tensorflow/lite/kernels/register.cc:34: error: undefined reference to 'tflite::MutableOpResolver::AddBuiltin(tflite::BuiltinOperator, TfLiteRegistration const*, int)'
tensorflow/lite/kernels/register.cc:35: error: undefined reference to 'tflite::MutableOpResolver::AddBuiltin(tflite::BuiltinOperator, TfLiteRegistration const*, int)'
tensorflow/lite/kernels/register.cc:36: error: undefined reference to 'tflite::MutableOpResolver::AddBuiltin(tflite::BuiltinOperator, TfLiteRegistration const*, int, int)'
tensorflow/lite/kernels/register.cc:38: error: undefined reference to 'tflite::MutableOpResolver::AddBuiltin(tflite::BuiltinOperator, TfLiteRegistration const*, int)'
tensorflow/lite/kernels/register.cc:39: error: undefined reference to 'tflite::MutableOpResolver::AddBuiltin(tflite::BuiltinOperator, TfLiteRegistration const*, int, int)'
tensorflow/lite/kernels/register.cc:41: error: undefined reference to 'tflite::MutableOpResolver::AddBuiltin(tflite::BuiltinOperator, TfLiteRegistration const*, int, int)'
tensorflow/lite/kernels/register.cc:43: error: undefined reference to 'tflite::MutableOpResolver::AddBuiltin(tflite::BuiltinOperator, TfLiteRegistration const*, int, int)'
tensorflow/lite/kernels/register.cc:52: error: undefined reference to 'tflite::MutableOpResolver::AddBuiltin(tflite::BuiltinOperator, TfLiteRegistration const*, int)'
tensorflow/lite/kernels/register.cc:291: error: undefined reference to 'tflite::MutableOpResolver::AddCustom(char const*, TfLiteRegistration const*, int)'
tensorflow/lite/kernels/register.cc:294: error: undefined reference to 'tflite::MutableOpResolver::AddCustom(char const*, TfLiteRegistration const*, int)'
tensorflow/lite/kernels/register.cc:295: error: undefined reference to 'tflite::MutableOpResolver::AddCustom(char const*, TfLiteRegistration const*, int)'
tensorflow/lite/kernels/register.cc:297: error: undefined reference to 'tflite::MutableOpResolver::AddCustom(char const*, TfLiteRegistration const*, int)'
external/androidndk/ndk/sources/cxx-stl/llvm-libc++/include/unordered_map:0: error: undefined reference to 'vtable for tflite::MutableOpResolver'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
./tensorflow/lite/kernels/register.h:0: error: undefined reference to 'vtable for tflite::MutableOpResolver'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/sergey/FelgoProjects/TensorFlowLiteQtVPlay/tensorflow//bazel-bin/tensorflow/lite/kernels/libbuiltin_ops.pic.a(register.pic.o):register.cc:vtable for tflite::ops::builtin::BuiltinOpResolver: error: undefined reference to 'tflite::MutableOpResolver::FindOp(tflite::BuiltinOperator, int) const'
/home/sergey/FelgoProjects/TensorFlowLiteQtVPlay/tensorflow//bazel-bin/tensorflow/lite/kernels/libbuiltin_ops.pic.a(register.pic.o):register.cc:vtable for tflite::ops::builtin::BuiltinOpResolver: error: undefined reference to 'tflite::MutableOpResolver::FindOp(char const*, int) const'
/home/sergey/FelgoProjects/TensorFlowLiteQtVPlay/tensorflow//bazel-bin/tensorflow/lite/kernels/libbuiltin_ops.pic.a(register.pic.o):register.cc:typeinfo for tflite::ops::builtin::BuiltinOpResolver: error: undefined reference to 'typeinfo for tflite::MutableOpResolver'
../../Felgo/Felgo/android_armv7/include/QtQml/qqml.h:0: error: undefined reference to 'ObjectsRecogFilter::staticMetaObject'
../../Felgo/Felgo/android_armv7/include/QtQml/qqml.h:0: error: undefined reference to 'ObjectsRecogFilter::staticMetaObject'
../TensorFlowLiteQtVPlay/auxutils.h:0: error: undefined reference to 'vtable for AuxUtils'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../Felgo/Felgo/android_armv7/include/QtCore/qmetatype.h:0: error: undefined reference to 'ObjectsRecogFilter::staticMetaObject'
../../Felgo/Felgo/android_armv7/include/QtCore/qmetatype.h:0: error: undefined reference to 'ObjectsRecogFilter::staticMetaObject'
../TensorFlowLiteQtVPlay/objectsrecogfilter.h:0: error: undefined reference to 'vtable for ObjectsRecogFilter'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../TensorFlowLiteQtVPlay/tensorflowthread.h:0: error: undefined reference to 'vtable for TensorflowThread'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../TensorFlowLiteQtVPlay/tensorflowthread.h:0: error: undefined reference to 'vtable for WorkerTF'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../TensorFlowLiteQtVPlay/tensorflow/tensorflow/lite/mutable_op_resolver.h:0: error: undefined reference to 'vtable for tflite::MutableOpResolver'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/sergey/android-ndk-r20b/sources/cxx-stl/llvm-libc++/include/memory:2339: error: undefined reference to 'tflite::FlatBufferModel::~FlatBufferModel()'
/home/sergey/android-ndk-r20b/sources/cxx-stl/llvm-libc++/include/memory:2339: error: undefined reference to 'tflite::impl::Interpreter::~Interpreter()'
main.o:main.cpp:vtable for QQmlPrivate::QQmlElement<ObjectsRecogFilter>: error: undefined reference to 'ObjectsRecogFilter::metaObject() const'
main.o:main.cpp:vtable for QQmlPrivate::QQmlElement<ObjectsRecogFilter>: error: undefined reference to 'ObjectsRecogFilter::qt_metacast(char const*)'
main.o:main.cpp:vtable for QQmlPrivate::QQmlElement<ObjectsRecogFilter>: error: undefined reference to 'ObjectsRecogFilter::qt_metacall(QMetaObject::Call, int, void**)'
main.o:main.cpp:typeinfo for QQmlPrivate::QQmlElement<ObjectsRecogFilter>: error: undefined reference to 'typeinfo for ObjectsRecogFilter'
../TensorFlowLiteQtVPlay/objectsrecogfilter.cpp:16: error: undefined reference to 'ObjectsRecogFilter::initializedChanged(bool const&)'
../TensorFlowLiteQtVPlay/objectsrecogfilter.cpp:0: error: undefined reference to 'vtable for ObjectsRecogFilter'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../TensorFlowLiteQtVPlay/objectsrecogfilter.cpp:161: error: undefined reference to 'ObjectsRecogFilter::runTensorFlow(QImage)'
../TensorFlowLiteQtVPlay/objectsrecogfilter.cpp:300: error: undefined reference to 'ObjectsRecogFilter::initializedChanged(bool const&)'
../TensorFlowLiteQtVPlay/objectsrecogfilter.cpp:248: error: undefined reference to 'ObjectsRecogFilter::initializedChanged(bool const&)'
../TensorFlowLiteQtVPlay/objectsrecogfilter.cpp:276: error: undefined reference to 'ObjectsRecogFilter::initializedChanged(bool const&)'
../TensorFlowLiteQtVPlay/tensorflowthread.cpp:16: error: undefined reference to 'WorkerTF::results(int, QStringList, QList<double>, QList<QRectF>, double)'
../TensorFlowLiteQtVPlay/tensorflowthread.cpp:17: error: undefined reference to 'WorkerTF::finished()'
../TensorFlowLiteQtVPlay/tensorflowthread.cpp:0: error: undefined reference to 'vtable for TensorflowThread'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../TensorFlowLiteQtVPlay/tensorflowthread.cpp:47: error: undefined reference to 'TensorflowThread::results(int, QStringList, QList<double>, QList<QRectF>, double)'
../TensorFlowLiteQtVPlay/tensorflowthread.h:0: error: undefined reference to 'vtable for WorkerTF'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:109: error: undefined reference to 'tflite::FlatBufferModel::BuildFromFile(char const*, tflite::ErrorReporter*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:118: error: undefined reference to 'tflite::impl::InterpreterBuilder::InterpreterBuilder(tflite::FlatBufferModel const&, tflite::OpResolver const&)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:121: error: undefined reference to 'tflite::impl::InterpreterBuilder::operator()(std::__ndk1::unique_ptr<tflite::impl::Interpreter, std::__ndk1::default_delete<tflite::impl::Interpreter> >*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:128: error: undefined reference to 'tflite::impl::Interpreter::UseNNAPI(bool)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:131: error: undefined reference to 'tflite::impl::Interpreter::SetNumThreads(int)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:136: error: undefined reference to 'tflite::impl::Interpreter::AllocateTensors()'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:166: error: undefined reference to 'tflite::impl::InterpreterBuilder::~InterpreterBuilder()'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:166: error: undefined reference to 'tflite::impl::InterpreterBuilder::~InterpreterBuilder()'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:272: error: undefined reference to 'tflite::impl::Interpreter::Invoke()'
../TensorFlowLiteQtVPlay/tensorflow/tensorflow/lite/stderr_reporter.h:0: error: undefined reference to 'vtable for tflite::StderrReporter'
/home/sergey/android-ndk-r20b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:316: error: undefined reference to 'tflite::DefaultErrorReporter()'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:316: error: undefined reference to 'tflite::impl::Interpreter::Interpreter(tflite::ErrorReporter*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:321: error: undefined reference to 'tflite::impl::Interpreter::AddTensors(int, int*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:324: error: undefined reference to 'tflite::impl::Interpreter::AddTensors(int, int*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:327: error: undefined reference to 'tflite::impl::Interpreter::SetInputs(std::__ndk1::vector<int, std::__ndk1::allocator<int> >)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:328: error: undefined reference to 'tflite::impl::Interpreter::SetOutputs(std::__ndk1::vector<int, std::__ndk1::allocator<int> >)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:337: error: undefined reference to 'tflite::MutableOpResolver::FindOp(tflite::BuiltinOperator, int) const'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:340: error: undefined reference to 'tflite::impl::Interpreter::AddNodeWithParameters(std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&, std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&, char const*, unsigned int, void*, TfLiteRegistration const*, int*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:341: error: undefined reference to 'tflite::impl::Interpreter::AllocateTensors()'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:354: error: undefined reference to 'tflite::impl::Interpreter::Invoke()'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:316: error: undefined reference to 'tflite::DefaultErrorReporter()'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:316: error: undefined reference to 'tflite::impl::Interpreter::Interpreter(tflite::ErrorReporter*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:321: error: undefined reference to 'tflite::impl::Interpreter::AddTensors(int, int*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:324: error: undefined reference to 'tflite::impl::Interpreter::AddTensors(int, int*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:327: error: undefined reference to 'tflite::impl::Interpreter::SetInputs(std::__ndk1::vector<int, std::__ndk1::allocator<int> >)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:328: error: undefined reference to 'tflite::impl::Interpreter::SetOutputs(std::__ndk1::vector<int, std::__ndk1::allocator<int> >)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:337: error: undefined reference to 'tflite::MutableOpResolver::FindOp(tflite::BuiltinOperator, int) const'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:340: error: undefined reference to 'tflite::impl::Interpreter::AddNodeWithParameters(std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&, std::__ndk1::vector<int, std::__ndk1::allocator<int> > const&, char const*, unsigned int, void*, TfLiteRegistration const*, int*)'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:341: error: undefined reference to 'tflite::impl::Interpreter::AllocateTensors()'
../TensorFlowLiteQtVPlay/tensorflowlite.cpp:354: error: undefined reference to 'tflite::impl::Interpreter::Invoke()'
../TensorFlowLiteQtVPlay/tensorflow/tensorflow/lite/interpreter.h:178: error: undefined reference to 'tflite::impl::Interpreter::SetTensorParametersReadWrite(int, TfLiteType, char const*, unsigned int, int const*, TfLiteQuantizationParams, bool, unsigned int, int const*)'
tensorflow/lite/string_util.cc:108: error: undefined reference to 'TfLiteTensorReset'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libTensorFlowLiteQtVPlay.so] Error 1
I am the author of this tutorial. Could you try to compile TensorFlow with libstdc++ by using this command as described in the tutorial:
bazel build --cxxopt='--std=c++11' -c opt --config=android_arm tensorflow/lite/java:libtensorflowlite_jni
Maybe your problem is related to mixing libc++ and libstdc++, Qt uses libstdc++ and you are compiling TensorFlow with libc++ in your bazel command.
Let me know if this helps.
I'm trying to compile LLVM/Clang 8.0.1 for Android with Cmake (since autotools i used before are no longer supported) on mac.
I'm using https://github.com/llvm/llvm-project.git.
In build dir i'm using the following configure script (followed manuals):
cmake ../llvm \
-DCMAKE_INSTALL_PREFIX=/Users/asmirnov/Library/Android/llvm_android_arm \
-DLLVM_ENABLE_PROJECTS=clang \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_THREADS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD="ARM;X86" \
-DLIBCLANG_BUILD_STATIC=ON \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_ZLIB=OFF \
\
-DCMAKE_CROSSCOMPILING=True \
-DLLVM_TABLEGEN=/Users/asmirnov/Library/Android/llvm/bin/llvm-tblgen \
-DCLANG_TABLEGEN=/Users/asmirnov/Documents/dev/src/llvm-project/build/bin/clang-tblgen \
-DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf \
-DLLVM_TARGET_ARCH=ARM \
-DBUILD_SHARED_LIBS=ON \
-DLLVM_ENABLE_PIC=False \
-DCMAKE_TOOLCHAIN_FILE=/Users/asmirnov/Library/Android/ndk/android-ndk-r20/build/cmake/android.toolchain.cmake
As you can see i'm using CMake toolchain file from Android NDK (20).
Also i've compiled it locally and passing LLVM_TABLEGEN and CLANG_TABLEGEN.
Configuration went successfully, but during the build i get the following errors:
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:27: error: undefined reference to 'llvm::Pass::~Pass()'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:33: error: undefined reference to 'llvm::errs()'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:34: error: undefined reference to 'llvm::errs()'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:34: error: undefined reference to 'llvm::Value::getName() const'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:34: error: undefined reference to 'llvm::raw_ostream::write_escaped(llvm::StringRef, bool)'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/include/llvm/Support/raw_ostream.h:149: error: undefined reference to 'llvm::raw_ostream::write(unsigned char)'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/include/llvm/Support/raw_ostream.h:174: error: undefined reference to 'llvm::raw_ostream::write(char const*, unsigned int)'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:45: error: undefined reference to 'llvm::Pass::~Pass()'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:51: error: undefined reference to 'llvm::errs()'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:52: error: undefined reference to 'llvm::errs()'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:52: error: undefined reference to 'llvm::Value::getName() const'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/lib/Transforms/Hello/Hello.cpp:52: error: undefined reference to 'llvm::raw_ostream::write_escaped(llvm::StringRef, bool)'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/include/llvm/PassSupport.h:98: error: undefined reference to 'llvm::PassRegistry::getPassRegistry()'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/include/llvm/PassSupport.h:98: error: undefined reference to 'llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool)'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/include/llvm/PassSupport.h:98: error: undefined reference to 'llvm::PassRegistry::getPassRegistry()'
/Users/asmirnov/Documents/dev/src/llvm-project/llvm/include/llvm/PassSupport.h:98: error: undefined reference to 'llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool)'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::~Pass()'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::getPassName() const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::print(llvm::raw_ostream&, llvm::Module const*) const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::FunctionPass::createPrinterPass(llvm::raw_ostream&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&) const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::FunctionPass::assignPassManager(llvm::PMStack&, llvm::PassManagerType)'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::preparePassManager(llvm::PMStack&)'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::FunctionPass::getPotentialPassManagerType() const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::getAnalysisUsage(llvm::AnalysisUsage&) const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::releaseMemory()'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::getAdjustedAnalysisPointer(void const*)'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::getAsImmutablePass()'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::getAsPMDataManager()'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::verifyAnalysis() const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello: error: undefined reference to 'llvm::Pass::dumpPassStructure(unsigned int)'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::~Pass()'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::getPassName() const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::print(llvm::raw_ostream&, llvm::Module const*) const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::FunctionPass::createPrinterPass(llvm::raw_ostream&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&) const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::FunctionPass::assignPassManager(llvm::PMStack&, llvm::PassManagerType)'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::preparePassManager(llvm::PMStack&)'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::FunctionPass::getPotentialPassManagerType() const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::releaseMemory()'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::getAdjustedAnalysisPointer(void const*)'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::getAsImmutablePass()'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::getAsPMDataManager()'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::verifyAnalysis() const'
CMakeFiles/LLVMHello.dir/Hello.cpp.o:Hello.cpp:vtable for (anonymous namespace)::Hello2: error: undefined reference to 'llvm::Pass::dumpPassStructure(unsigned int)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/LLVMHello.so] Error 1
make[1]: *** [lib/Transforms/Hello/CMakeFiles/LLVMHello.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Am i doing anything wrong? Is it LLVM/Clang bug? Any workaround?
I don't know if this is your only problem, but this is definitely wrong and could cause Clang to not find the right libraries:
-DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf
Android is arm-linux-androideabi$API_LEVEL. arm-linux-gnueabihf is a GNU/Linux target.
Yup, this requires some work arounds similar to this. Also use -DLLVM_DEFAULT_TARGET_TRIPLE="armv7a-linux-androideabi"
I want integrate android NDK with Halcon.
I try use the libs ( headers files) to evoke Halcon methods.
For example:
#include <jni.h>
#include "com_example_joseubuntu_integrationhalcon_MainActivity.h"
# include "HALCONCpp/HalconCpp.h"
# include "HALCONCpp/HDevThread.h"
using namespace HalconCpp;
JNIEXPORT void JNICALL Java_com_example_joseubuntu_integrationhalcon_MainActivity_testFunction(JNIEnv * env, jobject obj)
{
HTuple hv_BarCodeHandle;
HTuple hv_DecodedDataStrings;
HObject ho_Image,ho_SymbolRegions;
CreateBarCodeModel(HTuple(), HTuple(), &hv_BarCodeHandle);
SetBarCodeParam(hv_BarCodeHandle, "stop_after_result_num", 1);
ReadImage(&ho_Image, "/res/drawable/codebar");
FindBarCode(ho_Image, &ho_SymbolRegions, hv_BarCodeHandle, "EAN-13", &hv_DecodedDataStrings);
WriteImage(ho_SymbolRegions, "png", "0xffff00", "Teste.png");
}
Is a simple example to read barCodes, i don't know if this work, because i have this errors:
Error:error: undefined reference to 'HalconCpp::HTuple::~HTuple()'
Error:error: undefined reference to 'HalconCpp::HTuple::HTuple(char const*)'
Error:error: undefined reference to 'HalconCpp::HTuple::HTuple()'
Error:error: undefined reference to 'HalconCpp::HTuple::~HTuple()'
Error:error: undefined reference to 'HalconCpp::HObjectBase::HObjectBase()'
Error:error: undefined reference to 'HalconCpp::CreateBarCodeModel(HalconCpp::HTuple const&, HalconCpp::HTuple const&, HalconCpp::HTuple*)'
Error:error: undefined reference to 'HalconCpp::HTuple::HTuple()'
Error:error: undefined reference to 'HalconCpp::HTuple::~HTuple()'
Error:error: undefined reference to 'HalconCpp::SetBarCodeParam(HalconCpp::HTuple const&, HalconCpp::HTuple const&, HalconCpp::HTuple const&)'
Error:error: undefined reference to 'HalconCpp::HObjectBase::HObjectBase()'
Error:error: undefined reference to 'HalconCpp::HTuple::HTuple(int)'
Error:error: undefined reference to 'HalconCpp::HTuple::HTuple()'
Error:error: undefined reference to 'HalconCpp::HTuple::HTuple()'
Error:error: undefined reference to 'HalconCpp::HTuple::~HTuple()'
Error:error: undefined reference to 'HalconCpp::HTuple::HTuple(char const*)'
Error:error: undefined reference to 'HalconCpp::ReadImage(HalconCpp::HObject*, HalconCpp::HTuple const&)'
Error:error: undefined reference to 'HalconCpp::HTuple::HTuple(char const*)'
Error:error: undefined reference to 'HalconCpp::FindBarCode(HalconCpp::HObject const&, HalconCpp::HObject*, HalconCpp::HTuple const&, HalconCpp::HTuple const&, HalconCpp::HTuple*)'
Error:error: undefined reference to 'HalconCpp::HTuple::HTuple(char const*)'
Error:error: undefined reference to 'HalconCpp::WriteImage(HalconCpp::HObject const&, HalconCpp::HTuple const&, HalconCpp::HTuple const&, HalconCpp::HTuple const&)'
Error:error: undefined reference to 'HalconCpp::HObjectBase::~HObjectBase()'
Error:error: undefined reference to 'HalconCpp::HObjectBase::~HObjectBase()'
Thanks!
Do you have the halcon library for android?
If the library you used is not for android, it cannot work.
If you have the library for android, you should import the so library in the Android.mk like this:
include $(CLEAR_VARS)
LOCAL_MODULE := libhalcon
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libhalcon.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libhalconcpp
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libhalconcpp.so
include $(PREBUILT_SHARED_LIBRARY)
Hello I am trying to compile pjsua for android video calling. After following steps on pjusa I am getting following errors.
../src/pjsua/pjsua_app_cli.c:1253: error: undefined reference to 'pjsua_conf_disconnect'
../src/pjsua/pjsua_app_cli.c:1277: error: undefined reference to 'pj_strncpy_with_null'
../src/pjsua/pjsua_app_cli.c:1279: error: undefined reference to 'pjsua_conf_adjust_rx_level'
../src/pjsua/pjsua_app_cli.c:1291: error: undefined reference to 'pjsua_conf_adjust_tx_level'
../src/pjsua/pjsua_app_cli.c:1314: error: undefined reference to 'pjsua_codec_set_priority'
../src/pjsua/pjsua_app_cli.c:1318: error: undefined reference to 'pjsua_vid_codec_set_priority'
../src/pjsua/pjsua_app_cli.c:1333: error: undefined reference to 'pjsua_get_state'
../src/pjsua/pjsua_app_cli.c:1335: error: undefined reference to 'pj_cli_get_cmd_id'
../src/pjsua/pjsua_app_cli.c:1353: error: undefined reference to 'pjsua_snd_get_setting'
../src/pjsua/pjsua_app_cli.c:1356: error: undefined reference to 'pj_perror_2'
../src/pjsua/pjsua_app_cli.c:1370: error: undefined reference to 'pjsua_snd_set_setting'
../src/pjsua/pjsua_app_cli.c:1372: error: undefined reference to 'pj_perror_4'
../src/pjsua/pjsua_app_cli.c:1383: error: undefined reference to 'pjsua_dump'
../src/pjsua/pjsua_app_cli.c:1394: error: undefined reference to 'pj_log_1'
../src/pjsua/pjsua_app_cli.c:1414: error: undefined reference to 'pj_log_1'
../src/pjsua/pjsua_app_cli.c:1419: error: undefined reference to 'pj_file_open'
../src/pjsua/pjsua_app_cli.c:1425: error: undefined reference to 'pj_file_write'
../src/pjsua/pjsua_app_cli.c:1426: error: undefined reference to 'pj_file_close'
../src/pjsua/pjsua_app_cli.c:1443: error: undefined reference to 'pjsua_get_state'
../src/pjsua/pjsua_app_cli.c:1473: error: undefined reference to 'pjsua_call_get_count'
../src/pjsua/pjsua_app_cli.c:1491: error: undefined reference to 'pj_strncpy'
../src/pjsua/pjsua_app_cli.c:1498: error: undefined reference to 'pjsua_msg_data_init'
../src/pjsua/pjsua_app_cli.c:1500: error: undefined reference to 'pjsua_call_make_call'
../src/pjsua/pjsua_app_cli.c:1514: error: undefined reference to 'pjsua_call_get_count'
../src/pjsua/pjsua_app_cli.c:1536: error: undefined reference to 'pj_strncpy'
../src/pjsua/pjsua_app_cli.c:1544: error: undefined reference to 'pjsua_call_make_call'
../src/pjsua/pjsua_app_cli.c:1583: error: undefined reference to 'pjsua_msg_data_init'
../src/pjsua/pjsua_app_cli.c:1594: error: undefined reference to 'pjsip_generic_string_hdr_init2'
../src/pjsua/pjsua_app_cli.c:1610: error: undefined reference to 'pjsua_call_answer2'
../src/pjsua/pjsua_app_cli.c:1623: error: undefined reference to 'pjsua_call_hangup_all'
../src/pjsua/pjsua_app_cli.c:1625: error: undefined reference to 'pjsua_call_hangup'
../src/pjsua/pjsua_app_cli.c:1634: error: undefined reference to 'pjsua_call_set_hold'
../src/pjsua/pjsua_app_cli.c:1650: error: undefined reference to 'pjsua_call_reinvite2'
../src/pjsua/pjsua_app_cli.c:1662: error: undefined reference to 'pjsua_call_update2'
../src/pjsua/pjsua_app_cli.c:1732: error: undefined reference to 'pjsua_msg_data_init'
../src/pjsua/pjsua_app_cli.c:1735: error: undefined reference to 'pjsip_generic_string_hdr_init2'
../src/pjsua/pjsua_app_cli.c:1748: error: undefined reference to 'pjsua_call_xfer'
../src/pjsua/pjsua_app_cli.c:1753: error: undefined reference to 'pjsua_call_xfer'
../src/pjsua/pjsua_app_cli.c:1778: error: undefined reference to 'pjsua_enum_calls'
../src/pjsua/pjsua_app_cli.c:1819: error: undefined reference to 'pjsua_call_is_active'
../src/pjsua/pjsua_app_cli.c:1828: error: undefined reference to 'pjsip_generic_string_hdr_init2'
../src/pjsua/pjsua_app_cli.c:1833: error: undefined reference to 'pjsua_call_xfer_replaces'
../src/pjsua/pjsua_app_cli.c:1846: error: undefined reference to 'pjsua_call_is_active'
../src/pjsua/pjsua_app_cli.c:1856: error: undefined reference to 'pjsua_call_process_redirect'
../src/pjsua/pjsua_app_cli.c:1860: error: undefined reference to 'pjsua_call_process_redirect'
../src/pjsua/pjsua_app_cli.c:1863: error: undefined reference to 'pjsua_call_process_redirect'
../src/pjsua/pjsua_app_cli.c:1866: error: undefined reference to 'pjsua_call_process_redirect'
../src/pjsua/pjsua_app_cli.c:1880: error: undefined reference to 'pjsua_call_has_media'
../src/pjsua/pjsua_app_cli.c:1895: error: undefined reference to 'pjsua_call_dial_dtmf'
../src/pjsua/pjsua_app_cli.c:1941: error: undefined reference to 'pjsua_call_send_request'
../src/pjsua/pjsua_app_cli.c:1965: error: undefined reference to 'pjsua_acc_get_count'
../src/pjsua/pjsua_app_cli.c:2023: error: undefined reference to 'pjsua_call_send_request'
../src/pjsua/pjsua_app_cli.c:2032: error: undefined reference to 'pjsua_call_get_count'
../src/pjsua/pjsua_app_cli.c:2141: error: undefined reference to 'pjsua_pool_create'
../src/pjsua/pjsua_app_cli.c:2153: error: undefined reference to 'pjsua_pool_create'
../src/pjsua/pjsua_app_cli.c:2190: error: undefined reference to 'pjsua_call_set_vid_strm'
../src/pjsua/pjsua_app_cli.c:2201: error: undefined reference to 'pjsua_call_vid_strm_op_param_default'
../src/pjsua/pjsua_app_cli.c:2204: error: undefined reference to 'pjsua_call_get_stream_info'
../src/pjsua/pjsua_app_cli.c:2214: error: undefined reference to 'pjsua_call_set_vid_strm'
../src/pjsua/pjsua_app_cli.c:2229: error: undefined reference to 'pjsua_call_vid_strm_op_param_default'
../src/pjsua/pjsua_app_cli.c:2233: error: undefined reference to 'pjsua_call_set_vid_strm'
../src/pjsua/pjsua_app_cli.c:2244: error: undefined reference to 'pjsua_call_vid_strm_op_param_default'
../src/pjsua/pjsua_app_cli.c:2248: error: undefined reference to 'pjsua_call_set_vid_strm'
../src/pjsua/pjsua_app_cli.c:2255: error: undefined reference to 'pjsua_call_vid_strm_op_param_default'
../src/pjsua/pjsua_app_cli.c:2273: error: undefined reference to 'pjmedia_vid_dev_refresh'
../src/pjsua/pjsua_app_cli.c:2285: error: undefined reference to 'pjsua_vid_preview_param_default'
../src/pjsua/pjsua_app_cli.c:2288: error: undefined reference to 'pjsua_vid_preview_start'
../src/pjsua/pjsua_app_cli.c:2289: error: undefined reference to 'pjsua_vid_preview_get_win'
../src/pjsua/pjsua_app_cli.c:2292: error: undefined reference to 'pjsua_vid_preview_get_win'
../src/pjsua/pjsua_app_cli.c:2296: error: undefined reference to 'pjsua_vid_win_set_show'
../src/pjsua/pjsua_app_cli.c:2297: error: undefined reference to 'pjsua_vid_preview_stop'
../src/pjsua/pjsua_app_cli.c:2307: error: undefined reference to 'pjsua_vid_enum_codecs'
../src/pjsua/pjsua_app_cli.c:2319: error: undefined reference to 'pjsua_vid_codec_get_param'
../src/pjsua/pjsua_app_cli.c:2323: error: undefined reference to 'pjmedia_format_get_video_format_detail'
../src/pjsua/pjsua_app_cli.c:2342: error: undefined reference to 'pjsua_vid_codec_set_priority'
../src/pjsua/pjsua_app_cli.c:2357: error: undefined reference to 'pjsua_vid_codec_get_param'
../src/pjsua/pjsua_app_cli.c:2361: error: undefined reference to 'pjsua_vid_codec_set_param'
../src/pjsua/pjsua_app_cli.c:2377: error: undefined reference to 'pjsua_vid_codec_get_param'
../src/pjsua/pjsua_app_cli.c:2381: error: undefined reference to 'pjsua_vid_codec_set_param'
../src/pjsua/pjsua_app_cli.c:2401: error: undefined reference to 'pjsua_vid_codec_set_param'
../src/pjsua/pjsua_app_cli.c:2414: error: undefined reference to 'pjsua_vid_enum_wins'
../src/pjsua/pjsua_app_cli.c:2421: error: undefined reference to 'pjsua_vid_win_get_info'
../src/pjsua/pjsua_app_cli.c:2438: error: undefined reference to 'pjsua_vid_win_set_show'
../src/pjsua/pjsua_app_cli.c:2448: error: undefined reference to 'pjsua_vid_win_set_pos'
../src/pjsua/pjsua_app_cli.c:2458: error: undefined reference to 'pjsua_vid_win_set_size'
../src/pjsua/pjsua_app_cli.c:2552: error: undefined reference to 'pj_strtoul'
../src/pjsua/pjsua_app_cli.c:2554: error: undefined reference to 'pj_thread_sleep'
../src/pjsua/pjsua_app_cli.c:2566: error: undefined reference to 'pjsua_detect_nat_type'
../src/pjsua/pjsua_app_cli.c:2576: error: undefined reference to 'pj_cli_quit'
../src/pjsua/pjsua_app_cli.c:2590: error: undefined reference to 'pj_throw_exception_'
../src/pjsua/pjsua_app_cli.c:2610: error: undefined reference to 'pj_scan_init'
../src/pjsua/pjsua_app_cli.c:2612: error: undefined reference to 'pj_push_exception_handler_'
../src/pjsua/pjsua_app_cli.c:2617: error: undefined reference to 'pj_scan_get_until_chr'
../src/pjsua/pjsua_app_cli.c:2623: error: undefined reference to 'pj_scan_fini'
../src/pjsua/pjsua_app_cli.c:2626: error: undefined reference to 'pj_pop_exception_handler_'
../src/pjsua/pjsua_app_cli.c:2640: error: undefined reference to 'pj_cli_quit'
../src/pjsua/pjsua_app_cli.c:2736: error: undefined reference to 'pj_cli_add_cmd_from_xml'
../src/pjsua/pjsua_app_cli.c:2792: error: undefined reference to 'pj_cli_add_cmd_from_xml'
../src/pjsua/pjsua_app_cli.c:2837: error: undefined reference to 'pj_cli_add_cmd_from_xml'
../src/pjsua/pjsua_app_cli.c:2872: error: undefined reference to 'pj_cli_add_cmd_from_xml'
../src/pjsua/pjsua_app_common.c:52: error: undefined reference to 'pj_strtoul'
../src/pjsua/pjsua_app_common.c:55: error: undefined reference to 'pj_strtoul'
../src/pjsua/pjsua_app_common.c:57: error: undefined reference to 'pj_strtoul'
../src/pjsua/pjsua_app_common.c:69: error: undefined reference to 'pjsua_call_get_max_count'
../src/pjsua/pjsua_app_common.c:71: error: undefined reference to 'pjsua_call_is_active'
../src/pjsua/pjsua_app_common.c:78: error: undefined reference to 'pjsua_call_is_active'
../src/pjsua/pjsua_app_common.c:92: error: undefined reference to 'pjsua_call_get_max_count'
../src/pjsua/pjsua_app_common.c:125: error: undefined reference to 'pjsip_method_init_np'
../src/pjsua/pjsua_app_common.c:127: error: undefined reference to 'pjsua_acc_create_request'
../src/pjsua/pjsua_app_common.c:129: error: undefined reference to 'pjsip_endpt_send_request'
../src/pjsua/pjsua_app_common.c:148: error: undefined reference to 'pjsua_call_dump'
../src/pjsua/pjsua_app_common.c:151: error: undefined reference to 'pj_log_get_decor'
../src/pjsua/pjsua_app_common.c:152: error: undefined reference to 'pj_log_set_decor'
../src/pjsua/pjsua_app_common.c:154: error: undefined reference to 'pj_log_set_decor'
../src/pjsua/pjsua_app_common.c:170: error: undefined reference to 'pj_log_set_decor'
../src/pjsua/pjsua_app_common.c:245: error: undefined reference to 'pjsua_vid_win_get_info'
../src/pjsua/pjsua_app_common.c:250: error: undefined reference to 'pjsua_vid_win_set_pos'
../src/pjsua/pjsua_app_common.c:257: error: undefined reference to 'pjsua_vid_win_set_pos'
../src/pjsua/pjsua_app_common.c:289: error: undefined reference to 'pjmedia_vid_dev_cap_name'
../src/pjsua/pjsua_app_common.c:301: error: undefined reference to 'pjmedia_get_video_format_info'
../src/pjsua/pjsua_app_common.c:323: error: undefined reference to 'pjsua_vid_dev_count'
../src/pjsua/pjsua_app_common.c:331: error: undefined reference to 'pjsua_vid_dev_get_info'
../src/pjsua/pjsua_app_common.c:336: error: undefined reference to 'pjsua_vid_dev_get_info'
../src/pjsua/pjsua_app_common.c:342: error: undefined reference to 'pjsua_vid_dev_get_info'
../src/pjsua/pjsua_app_config.c:219: error: undefined reference to 'pj_log_write'
../src/pjsua/pjsua_app_config.c:237: error: undefined reference to 'pj_pool_calloc'
../src/pjsua/pjsua_app_config.c:300: error: undefined reference to 'pj_pool_alloc'
../src/pjsua/pjsua_app_config.c:513: error: undefined reference to 'pj_getopt_long'
../src/pjsua/pjsua_app_config.c:562: error: undefined reference to 'pj_log_set_level'
../src/pjsua/pjsua_app_config.c:588: error: undefined reference to 'pj_log_set_color'
../src/pjsua/pjsua_app_config.c:589: error: undefined reference to 'pj_log_set_color'
../src/pjsua/pjsua_app_config.c:590: error: undefined reference to 'pj_log_set_color'
../src/pjsua/pjsua_app_config.c:591: error: undefined reference to 'pj_log_set_color'
../src/pjsua/pjsua_app_config.c:607: error: undefined reference to 'pj_dump_config'
../src/pjsua/pjsua_app_config.c:682: error: undefined reference to 'pjsua_verify_sip_url'
../src/pjsua/pjsua_app_config.c:692: error: undefined reference to 'pjsua_verify_sip_url'
../src/pjsua/pjsua_app_config.c:702: error: undefined reference to 'pjsua_verify_sip_url'
../src/pjsua/pjsua_app_config.c:776: error: undefined reference to 'pjsua_verify_url'
../src/pjsua/pjsua_app_config.c:786: error: undefined reference to 'pjsua_verify_sip_url'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pj_optind'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pj_optarg'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pjsip_use_compact_form'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pjsip_include_allow_hdr_in_dlg'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pjmedia_add_rtpmap_for_static_pt'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pj_optarg'
../src/pjsua/pjsua_app_config.c:899: error: undefined reference to 'pjsua_verify_url'
../src/pjsua/pjsua_app_config.c:1047: error: undefined reference to 'pj_rand'
../src/pjsua/pjsua_app_config.c:539: error: undefined reference to 'pj_getopt_long'
../src/pjsua/pjsua_app_config.c:1366: error: undefined reference to 'pj_stricmp'
../src/pjsua/pjsua_app_config.c:1425: error: undefined reference to 'pj_optarg'
../src/pjsua/pjsua_app_config.c:1425: error: undefined reference to 'pj_optind'
../src/pjsua/pjsua_app_config.c:1434: error: undefined reference to 'pjsua_config_default'
../src/pjsua/pjsua_app_config.c:1435: error: undefined reference to 'pj_get_version'
../src/pjsua/pjsua_app_config.c:1436: error: undefined reference to 'pj_get_sys_info'
../src/pjsua/pjsua_app_config.c:1437: error: undefined reference to 'pj_strdup2_with_null'
../src/pjsua/pjsua_app_config.c:1439: error: undefined reference to 'pjsua_logging_config_default'
../src/pjsua/pjsua_app_config.c:1440: error: undefined reference to 'pjsua_media_config_default'
../src/pjsua/pjsua_app_config.c:1441: error: undefined reference to 'pjsua_transport_config_default'
../src/pjsua/pjsua_app_config.c:1443: error: undefined reference to 'pjsua_transport_config_default'
../src/pjsua/pjsua_app_config.c:1460: error: undefined reference to 'pjsua_acc_config_default'
../src/pjsua/pjsua_app_config.c:1463: error: undefined reference to 'pjsua_buddy_config_default'
../src/pjsua/pjsua_app_config.c:1528: error: undefined reference to 'pj_strcat2'
../src/pjsua/pjsua_app_config.c:1536: error: undefined reference to 'pj_strcat2'
../src/pjsua/pjsua_app_config.c:1544: error: undefined reference to 'pj_strcat2'
../src/pjsua/pjsua_app_config.c:1548: error: undefined reference to 'pj_strcat2'
../src/pjsua/pjsua_app_config.c:2070: error: undefined reference to 'pjsip_use_compact_form'
/home/neosoft/PJSUA/pjproject-2.4.5/pjlib/include/pj/list.h:128: error: undefined reference to 'pj_list_insert_before'
../src/pjsua/pjsua_app_legacy.c:53: error: undefined reference to 'pjsua_enum_buddies'
../src/pjsua/pjsua_app_legacy.c:86: error: undefined reference to 'pjsua_get_buddy_count'
../src/pjsua/pjsua_app_legacy.c:86: error: undefined reference to 'pjsua_get_buddy_count'
../src/pjsua/pjsua_app_legacy.c:183: error: undefined reference to 'pjsua_acc_get_info'
../src/pjsua/pjsua_app_legacy.c:218: error: undefined reference to 'pjsua_enum_accs'
../src/pjsua/pjsua_app_legacy.c:375: error: undefined reference to 'pjsua_call_get_stream_info'
../src/pjsua/pjsua_app_legacy.c:430: error: undefined reference to 'pjmedia_vid_dev_refresh'
../src/pjsua/pjsua_app_legacy.c:440: error: undefined reference to 'pjsua_vid_preview_param_default'
../src/pjsua/pjsua_app_legacy.c:443: error: undefined reference to 'pjsua_vid_preview_start'
../src/pjsua/pjsua_app_legacy.c:444: error: undefined reference to 'pjsua_vid_preview_get_win'
../src/pjsua/pjsua_app_legacy.c:447: error: undefined reference to 'pjsua_vid_preview_get_win'
../src/pjsua/pjsua_app_legacy.c:451: error: undefined reference to 'pjsua_vid_win_set_show'
../src/pjsua/pjsua_app_legacy.c:452: error: undefined reference to 'pjsua_vid_preview_stop'
../src/pjsua/pjsua_app_legacy.c:465: error: undefined reference to 'pjsua_vid_enum_wins'
../src/pjsua/pjsua_app_legacy.c:482: error: undefined reference to 'pjsua_vid_win_set_show'
../src/pjsua/pjsua_app_legacy.c:489: error: undefined reference to 'pjsua_vid_win_set_pos'
../src/pjsua/pjsua_app_legacy.c:496: error: undefined reference to 'pjsua_vid_win_set_size'
../src/pjsua/pjsua_app_legacy.c:512: error: undefined reference to 'pjsua_vid_enum_codecs'
../src/pjsua/pjsua_app_legacy.c:528: error: undefined reference to 'pjmedia_format_get_video_format_detail'
../src/pjsua/pjsua_app_legacy.c:558: error: undefined reference to 'pjsua_vid_codec_set_param'
../src/pjsua/pjsua_app_legacy.c:625: error: undefined reference to 'pj_strncpy'
../src/pjsua/pjsua_app_legacy.c:636: error: undefined reference to 'pjsua_call_make_call'
../src/pjsua/pjsua_app_legacy.c:667: error: undefined reference to 'pj_strncpy'
../src/pjsua/pjsua_app_legacy.c:684: error: undefined reference to 'pjsua_detect_nat_type'
../src/pjsua/pjsua_app_legacy.c:724: error: undefined reference to 'pjsua_call_send_typing_ind'
../src/pjsua/pjsua_app_legacy.c:727: error: undefined reference to 'pjsua_im_typing'
../src/pjsua/pjsua_app_legacy.c:737: error: undefined reference to 'pjsua_call_send_typing_ind'
../src/pjsua/pjsua_app_legacy.c:740: error: undefined reference to 'pjsua_im_typing'
../src/pjsua/pjsua_app_legacy.c:749: error: undefined reference to 'pjsua_call_send_im'
../src/pjsua/pjsua_app_legacy.c:752: error: undefined reference to 'pjsua_im_send'
../src/pjsua/pjsua_app_legacy.c:815: error: undefined reference to 'pjsua_call_answer2'
../src/pjsua/pjsua_app_legacy.c:828: error: undefined reference to 'pjsua_call_hangup_all'
../src/pjsua/pjsua_app_legacy.c:866: error: undefined reference to 'pjsua_acc_is_valid'
../src/pjsua/pjsua_app_legacy.c:867: error: undefined reference to 'pjsua_acc_set_default'
../src/pjsua/pjsua_app_legacy.c:894: error: undefined reference to 'pjsua_buddy_add'
../src/pjsua/pjsua_app_legacy.c:918: error: undefined reference to 'pjsua_acc_config_default'
../src/pjsua/pjsua_app_legacy.c:931: error: undefined reference to 'pjsua_acc_add'
../src/pjsua/pjsua_app_legacy.c:947: error: undefined reference to 'pjsua_buddy_is_valid'
../src/pjsua/pjsua_app_legacy.c:950: error: undefined reference to 'pjsua_buddy_del'
../src/pjsua/pjsua_app_legacy.c:965: error: undefined reference to 'pjsua_acc_is_valid'
../src/pjsua/pjsua_app_legacy.c:968: error: undefined reference to 'pjsua_acc_del'
../src/pjsua/pjsua_app_legacy.c:976: error: undefined reference to 'pjsua_call_set_hold'
../src/pjsua/pjsua_app_legacy.c:985: error: undefined reference to 'pjsua_call_reinvite2'
../src/pjsua/pjsua_app_legacy.c:991: error: undefined reference to 'pjsua_call_update2'
../src/pjsua/pjsua_app_legacy.c:1011: error: undefined reference to 'pjsua_enum_codecs'
../src/pjsua/pjsua_app_legacy.c:1020: error: undefined reference to 'pjsua_vid_enum_codecs'
../src/pjsua/pjsua_app_legacy.c:1058: error: undefined reference to 'pjsua_codec_set_priority'
../src/pjsua/pjsua_app_legacy.c:1110: error: undefined reference to 'pjsua_call_xfer'
../src/pjsua/pjsua_app_legacy.c:1116: error: undefined reference to 'pjsua_call_xfer'
../src/pjsua/pjsua_app_legacy.c:1138: error: undefined reference to 'pjsua_enum_calls'
../src/pjsua/pjsua_app_legacy.c:1200: error: undefined reference to 'pjsua_call_xfer_replaces'
../src/pjsua/pjsua_app_legacy.c:1210: error: undefined reference to 'pjsua_call_has_media'
../src/pjsua/pjsua_app_legacy.c:1230: error: undefined reference to 'pjsua_call_dial_dtmf'
../src/pjsua/pjsua_app_legacy.c:1276: error: undefined reference to 'pjsua_call_send_request'
../src/pjsua/pjsua_app_legacy.c:1293: error: undefined reference to 'pjsua_acc_get_count'
../src/pjsua/pjsua_app_legacy.c:1342: error: undefined reference to 'pjsua_call_send_request'
../src/pjsua/pjsua_app_legacy.c:1378: error: undefined reference to 'pj_thread_sleep'
../src/pjsua/pjsua_app_legacy.c:1393: error: undefined reference to 'pjsua_buddy_subscribe_pres'
../src/pjsua/pjsua_app_legacy.c:1398: error: undefined reference to 'pjsua_buddy_subscribe_pres'
../src/pjsua/pjsua_app_legacy.c:1414: error: undefined reference to 'pjsua_acc_set_registration'
../src/pjsua/pjsua_app_legacy.c:1420: error: undefined reference to 'pjsua_acc_set_registration'
../src/pjsua/pjsua_app_legacy.c:1513: error: undefined reference to 'pjsua_acc_set_online_status2'
../src/pjsua/pjsua_app_legacy.c:1527: error: undefined reference to 'pjsua_enum_conf_ports'
../src/pjsua/pjsua_app_legacy.c:1534: error: undefined reference to 'pjsua_conf_get_port_info'
../src/pjsua/pjsua_app_legacy.c:1581: error: undefined reference to 'pjsua_conf_disconnect'
../src/pjsua/pjsua_app_legacy.c:1598: error: undefined reference to 'pjsua_conf_adjust_rx_level'
../src/pjsua/pjsua_app_legacy.c:1604: error: undefined reference to 'pjsua_conf_adjust_tx_level'
../src/pjsua/pjsua_app_legacy.c:1642: error: undefined reference to 'pj_file_open'
../src/pjsua/pjsua_app_legacy.c:1647: error: undefined reference to 'pj_file_write'
../src/pjsua/pjsua_app_legacy.c:1648: error: undefined reference to 'pj_file_close'
../src/pjsua/pjsua_app_legacy.c:1660: error: undefined reference to 'pjsua_dump'
../src/pjsua/pjsua_app_legacy.c:1730: error: undefined reference to 'pjsua_call_setting_default'
collect2: error: ld returned 1 exit status
make[1]: *** [../bin/pjsua-arm-unknown-linux-androideabi] Error 1
make[1]: Leaving directory `/home/neosoft/PJSUA/pjproject-2.4.5/pjsip-apps/build'
make: *** [pjsua-arm-unknown-linux-androideabi] Error 2
Stuck for a while on this issue. Any suggestions on this?
Android ndk-path should be available in the ANDROID_NDK_ROOT environment variable.
Configure and compile pjsip with the desired TARGET_ANDROID_API, arch and buildtype:
$ NDK_TOOLCHAIN_VERSION=clang APP_PLATFORM=android-${TARGET_ANDROID_API} TARGET_ABI=$arch BUILD_TYPE=${buildtype} ./configure-android --use-ndk-cflags
$ make dep
$ make
Compile pjsua:
$ cd pjsip-apps/src/swig
$ make
libpjsua2.so will be created in pjsip-apps/src/swig/java/android/libs/armeabi directory.
I have successfully build CSipSimple for android by make command. After that, when I try to build video support libary by calling make VideoLibs command, there is an error appears.
[armeabi] SharedLibrary : libpj_video_android.so
[armeabi-v7a] SharedLibrary : libpj_video_android.so
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1086: error: undefined reference to 'av_strerror'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1324: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1325: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1328: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1329: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1430: error: undefined reference to 'avcodec_get_frame_defaults'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1455: error: undefined reference to 'av_init_packet'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1460: error: undefined reference to 'avcodec_encode_video2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:409: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:427: error: undefined reference to 'av_opt_set_int'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:434: error: undefined reference to 'av_opt_set_int'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:442: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:445: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1116: error: undefined reference to 'avcodec_alloc_context3'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1125: error: undefined reference to 'avcodec_alloc_context3'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1185: error: undefined reference to 'avcodec_open2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1200: error: undefined reference to 'avcodec_open2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1222: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1223: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1228: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1229: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1680: error: undefined reference to 'avcodec_get_frame_defaults'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1683: error: undefined reference to 'av_init_packet'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1705: error: undefined reference to 'avcodec_decode_video2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:629: error: undefined reference to 'avcodec_register_all'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:632: error: undefined reference to 'av_codec_next'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:172: error: undefined reference to 'sws_freeContext'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:152: error: undefined reference to 'sws_scale'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:112: error: undefined reference to 'sws_getContext'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:113: error: undefined reference to 'av_log_get_level'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:88: error: undefined reference to 'av_log_set_level'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:89: error: undefined reference to 'av_log_set_callback'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:90: error: undefined reference to 'av_register_all'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/armeabi/libpj_video_android.so] Error 1
make[1]: *** Waiting for unfinished jobs....
[armeabi-v7a] Install : libpjsipjni.so => ./libs/armeabi-v7a/libpjsipjni.so
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1086: error: undefined reference to 'av_strerror'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1324: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1325: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1328: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1329: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1430: error: undefined reference to 'avcodec_get_frame_defaults'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1455: error: undefined reference to 'av_init_packet'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1460: error: undefined reference to 'avcodec_encode_video2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:409: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:427: error: undefined reference to 'av_opt_set_int'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:434: error: undefined reference to 'av_opt_set_int'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:442: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:445: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1116: error: undefined reference to 'avcodec_alloc_context3'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1125: error: undefined reference to 'avcodec_alloc_context3'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1185: error: undefined reference to 'avcodec_open2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1200: error: undefined reference to 'avcodec_open2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1222: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1223: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1228: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1229: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1680: error: undefined reference to 'avcodec_get_frame_defaults'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1683: error: undefined reference to 'av_init_packet'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1705: error: undefined reference to 'avcodec_decode_video2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:629: error: undefined reference to 'avcodec_register_all'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:632: error: undefined reference to 'av_codec_next'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:632: error: undefined reference to 'av_codec_next'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:172: error: undefined reference to 'sws_freeContext'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:152: error: undefined reference to 'sws_scale'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:112: error: undefined reference to 'sws_getContext'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:113: error: undefined reference to 'av_log_get_level'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:88: error: undefined reference to 'av_log_set_level'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:89: error: undefined reference to 'av_log_set_callback'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:90: error: undefined reference to 'av_register_all'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/armeabi-v7a/libpj_video_android.so] Error 1
make[1]: Leaving directory `/home/alexchengalan/android/files/CSipSimple-trunk/CSipSimple'
make: *** [VideoLibs] Error 2
It would be great if anyone can help me out of this problem.
Modify jni\pjsip\android_toolchain\pjmedia\Video.mk; then, it would be ok.
# Ffmpeg codec
BASE_FFMPEG_BUILD_DIR := $(LOCAL_PATH)/../../../ffmpeg/build/ffmpeg/$(TARGET_ARCH_ABI)/lib
LOCAL_LDLIBS += $(BASE_FFMPEG_BUILD_DIR)/libavcodec.a \
$(BASE_FFMPEG_BUILD_DIR)/libavformat.a \
$(BASE_FFMPEG_BUILD_DIR)/libswscale.a \
$(BASE_FFMPEG_BUILD_DIR)/libavutil.a
# Add X264
BASE_X264_BUILD_DIR := $(LOCAL_PATH)/../../../ffmpeg/build/x264/$(TARGET_ARCH_ABI)/lib
LOCAL_LDLIBS += $(BASE_X264_BUILD_DIR)/libx264.a
For details, see: (https://groups.google.com/forum/#!topic/csipsimple-dev/bSauDx-hnR0)