i'm using mac v10.14.4
i build tensorflow with the command shown on readme(bazel build --config=opt //tensorflow/tools/lib_package:libtensorflow) and when i do 'make -j4' i get
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
this error.
i have opencv v4.1.0 and tensorflow v1.12
exact output is ***********************
g++ -Wall -O2 -ggdb -std=c++11 -I/Users/angie/Desktop/FaceDetection/include pkg-config --cflags /usr/local/Cellar/opencv/4.1.0_1/lib/pkgconfig/opencv4.pc
-I/Users/angie/Desktop/vision-2d/tf_standalone/include -c camera.cpp -o camera.o
g++ -fpic -shared -o libmtcnn.so mtcnn.os comm_lib.os utils.os tensorflow_mtcnn.os
g++ -Wall -O2 -ggdb -std=c++11 -I/Users/angie/Desktop/FaceDetection/include pkg-config --cflags /usr/local/Cellar/opencv/4.1.0_1/lib/pkgconfig/opencv4.pc
-I/Users/angie/Desktop/vision-2d/tf_standalone/include -c mtcnn.cpp -o mtcnn.o
g++ -Wall -O2 -ggdb -std=c++11 -I/Users/angie/Desktop/FaceDetection/include pkg-config --cflags /usr/local/Cellar/opencv/4.1.0_1/lib/pkgconfig/opencv4.pc
-I/Users/angie/Desktop/vision-2d/tf_standalone/include -c comm_lib.cpp -o comm_lib.o
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<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_RNet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_ONet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_RNet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_ONet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_RNet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_ONet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_RNet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_ONet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_RNet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_ONet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_RNet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_ONet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_RNet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_ONet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_RNet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) in tensorflow_mtcnn.os
tf_mtcnn::run_ONet(cv::Mat const&, std::__1::vector<face_box, std::__1::allocator<face_box> >&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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::allocatorcv::Mat >&, float*, int, int) in comm_lib.os
std::__1::__split_buffer<cv::Mat, std::__1::allocatorcv::Mat&>::~__split_buffer() in comm_lib.os
tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
cv::MatExpr::~MatExpr() in tensorflow_mtcnn.os
"cv::Mat::updateContinuityFlag()", referenced from:
set_input_buffer(std::__1::vector<cv::Mat, std::__1::allocatorcv::Mat >&, float*, int, int) in comm_lib.os
copy_one_patch(cv::Mat const&, face_box&, float*, int, int) in tensorflow_mtcnn.os
"cv::Mat::copySize(cv::Mat const&)", referenced from:
set_input_buffer(std::__1::vector<cv::Mat, std::__1::allocatorcv::Mat >&, float*, int, int) in comm_lib.os
void std::__1::vector<cv::Mat, std::__1::allocatorcv::Mat >::__push_back_slow_path<cv::Mat const&>(cv::Mat const&&&) in comm_lib.os
std::__1::vector<cv::Mat, std::__1::allocatorcv::Mat >::__swap_out_circular_buffer(std::__1::__split_buffer<cv::Mat, std::__1::allocatorcv::Mat&>&) 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, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*, char const*, int)", referenced from:
set_input_buffer(std::__1::vector<cv::Mat, std::__1::allocatorcv::Mat >&, float*, int, int) in comm_lib.os
copy_one_patch(cv::Mat const&, face_box&, float*, int, int) 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<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
"cv::fastFree(void*)", referenced from:
set_input_buffer(std::__1::vector<cv::Mat, std::__1::allocatorcv::Mat >&, float*, int, int) in comm_lib.os
std::__1::__split_buffer<cv::Mat, std::__1::allocatorcv::Mat&>::~__split_buffer() in comm_lib.os
tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
cv::MatExpr::~MatExpr() in tensorflow_mtcnn.os
"cv::operator-(cv::Mat const&, cv::Scalar const&)", referenced from:
tf_mtcnn::detect(cv::Mat&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) in tensorflow_mtcnn.os
"cv::Mat::t() const", referenced from:
tf_mtcnn::detect(cv::Mat&, std::__1::vector<face_box, std::__1::allocator<face_box> >&) 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<face_box> >&) 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]: *** [libmtcnn.so] Error 1
make[1]: *** Waiting for unfinished jobs....
camera.cpp:101:71: warning: implicit conversion from 'double' to 'int' changes value from 1.8 to 1 [-Wliteral-conversion]
box.landmark.y[l]), 1, cv::Scalar(0, 0, 255), 1.8);
^~~
1 warning generated.
make: *** [libs] Error 2