facebookresearch / DetectAndTrack

The implementation of an algorithm presented in the CVPR18 paper: "Detect-and-Track: Efficient Pose Estimation in Videos"
Apache License 2.0
1k stars 186 forks source link

libcaffe2_detectron_custom_ops_gpu.so: undefined symbol: _ZN6caffe236FLAGS_caffe2_report_cpu_memory_usageE #66

Open GarrickLin opened 5 years ago

GarrickLin commented 5 years ago

I have finished compiling, and it raised error libcaffe2_detectron_custom_ops_gpu.so: undefined symbol: _ZN6caffe236FLAGS_caffe2_report_cpu_memory_usageE after I ran python tests/test_zero_even_op.py.

williamdwl commented 4 years ago

I met the same problems.

williamdwl commented 4 years ago

I solved ! In /path/to/DetectAndTrack/lib/CMakeLists.txt, Add a few lines in the beginning:

add_library(libprotobuf STATIC IMPORTED) 
# set path
set(PROTOBUF_LIB "/path/to/pytorch/build/lib/libprotobuf.a") 
set_property(TARGET libprotobuf PROPERTY IMPORTED_LOCATION "${PROTOBUF_LIB}")

You can find two target_link_libraries lines in this file(they are not adjacent):

target_link_libraries(caffe2_detectron_custom_ops caffe2_library) 
target_link_libraries(caffe2_detectron_custom_ops_gpu caffe2_gpu_library)

Edit the two lines, adding a "libprotobuf" at the end to each of them:

target_link_libraries(caffe2_detectron_custom_ops caffe2_library libprotobuf) 
target_link_libraries(caffe2_detectron_custom_ops_gpu caffe2_gpu_library libprotobuf)