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 #2

Closed kuaikuaikim closed 7 years ago

kuaikuaikim commented 7 years ago

i have disable the arm_compute, but met another problem whem make your project. I built the libmtcnn.so successfully. Link the test.a just print these problem below.

/home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to TF_DeleteTensor' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference toTF_DeleteStatus' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to TF_DeleteSession' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference toTF_DeleteGraph' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to TF_Message' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference toTF_TensorData' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to TF_NewGraph' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference toTF_NewSessionOptions' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to TF_SessionRun' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference toTF_NewSession' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to TF_CloseSession' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference toTF_GraphOperationByName' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to TF_GraphImportGraphDef' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference toTF_NewStatus' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to TF_Dim' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference toTF_NewTensor' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to TF_GetCode' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference toTF_NewImportGraphDefOptions' /home/sg/workspace/mtcnn/libmtcnn/libmtcnn.so: undefined reference to `TF_ImportGraphDefOptionsSetPrefix' collect2: error: ld returned 1 exit status Makefile:18: recipe for target 'test' failed make: *** [test] Error 1

cyberfire commented 7 years ago

As the pre-built libtensorflow.so is for arm64, and if you are trying this on x86, ld will complain.

You can workaround this by two methods: 1) Skip tensorflow support by setting TF_ON=0 2) Build libtensorflow.so as guided in README.md

Thanks,

cyberfire

cyberfire commented 7 years ago

Please re-open if meet new issue

flankechen commented 6 years ago

Hi, I have the same problem. I follow this https://www.tensorflow.org/install/install_c for tensorflow c apis, but not bazel build. I do have libtensorflow.so in TENSORFLOW_ROOT. I guess I have to link it to test/camera.a as well?

kapildevkumara commented 4 years ago

Seems to be similar to this issue. The fix works like charm. I had to add the install library path to variable(LD_LIBRARY_PATH)