OAID / FaceDetection

C++ project to implement MTCNN, a perfect face detect algorithm, on different DL frameworks. The most popular frameworks: caffe/mxnet/tensorflow, are all suppported now
Apache License 2.0
272 stars 108 forks source link

make problem #3

Closed jjjjohnson closed 6 years ago

jjjjohnson commented 6 years ago

Hi everyone,

I want to tensorflow and have built the libtensorflow.so myself. I have the following error when make:

Undefined symbols for architecture x86_64: "_TF_CloseSession", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os "_TF_DeleteGraph", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os "_TF_DeleteSession", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os "_TF_DeleteStatus", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os tf_mtcnn::load_model(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os "_TF_DeleteTensor", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_Dim", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_GetCode", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_GraphImportGraphDef", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os "_TF_GraphOperationByName", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_ImportGraphDefOptionsSetPrefix", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_Message", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewGraph", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewImportGraphDefOptions", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewSession", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewSessionOptions", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewStatus", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_NewTensor", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_SessionRun", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os "_TF_TensorData", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "cv::copyMakeBorder(cv::_InputArray const&, cv::OutputArray const&, int, int, int, int, int, cv::Scalar const&)", referenced from: copy_one_patch(cv::Mat const&, face_box&, float, int, int) in tensorflow_mtcnn.os "cv::Mat::deallocate()", referenced from: set_input_buffer(std::1::vector<cv::Mat, std::1::allocator >&, float, int, int) in comm_lib.os std::1::split_buffer<cv::Mat, std::1::allocator&>::~split_buffer() in comm_lib.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os copy_one_patch(cv::Mat const&, face_box&, float*, int, int) in tensorflow_mtcnn.os tf_mtcnn::detect(cv::Mat&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os cv::MatExpr::~MatExpr() in tensorflow_mtcnn.os "cv::Mat::copySize(cv::Mat const&)", referenced from: set_input_buffer(std::1::vector<cv::Mat, std::1::allocator >&, float, int, int) in comm_lib.os void std::1::vector<cv::Mat, std::1::allocator >::push_back_slow_path<cv::Mat const&>(cv::Mat const&&&) in comm_lib.os std::1::vector<cv::Mat, std::1::allocator >::swap_out_circular_buffer(std::1::split_buffer<cv::Mat, std::__1::allocator&>&) in comm_lib.os "cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)", referenced from: copy_one_patch(cv::Mat const&, face_box&, float, int, int) in tensorflow_mtcnn.os "cv::error(int, cv::String const&, char const, char const, int)", referenced from: cv::Mat::Mat(int, int, int, void, unsigned long) in comm_lib.os cv::Mat::Mat(int, int, int, void, unsigned long) in tensorflow_mtcnn.os "cv::String::deallocate()", referenced from: cvflann::anyimpl::big_any_policy::static_delete(void) in mtcnn.os cvflann::anyimpl::big_any_policy::move(void const, void) in mtcnn.os cv::Mat::Mat(int, int, int, void*, unsigned long) in comm_lib.os cvflann::anyimpl::big_any_policy::static_delete(void) in comm_lib.os cvflann::anyimpl::big_any_policy::move(void const, void) in comm_lib.os cvflann::anyimpl::big_any_policy::static_delete(void) in utils.os cvflann::anyimpl::big_any_policy::move(void const, void) in utils.os ... "cv::String::allocate(unsigned long)", referenced from: cv::Mat::Mat(int, int, int, void, unsigned long) in comm_lib.os cv::Mat::Mat(int, int, int, void, unsigned long) in tensorflow_mtcnn.os "cv::resize(cv::_InputArray const&, cv::OutputArray const&, cv::Size, double, double, int)", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os copy_one_patch(cv::Mat const&, face_box&, float*, int, int) in tensorflow_mtcnn.os "cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "cv::fastFree(void*)", referenced from: set_input_buffer(std::1::vector<cv::Mat, std::1::allocator >&, float*, int, int) in comm_lib.os std::1::split_buffer<cv::Mat, std::1::allocator&>::~split_buffer() in comm_lib.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os copy_one_patch(cv::Mat const&, face_box&, float, int, int) in tensorflow_mtcnn.os tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os cv::MatExpr::~MatExpr() in tensorflowmtcnn.os "cv::operator-(cv::Mat const&, cv::Scalar const&)", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os "cv::operator(cv::MatExpr const&, double)", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os "cv::Mat::t() const", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "cv::Mat::convertTo(cv::_OutputArray const&, int, double, double) const", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [Makefile:32: libmtcnn.so] Error 1 make[1]: Leaving directory '/Users/jinjunjie/Desktop/Work/codes/combined-mtcnn-cpp/libmtcnn' make: [Makefile:23: libs] Error 2

My make version is: GNU Make 4.2.1 Built for x86_64-apple-darwin16.5.0

Thanks a ton!

cyberfire commented 6 years ago

Could you please format and cleanup the log firstly?

Thanks, Haitao