Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

libcaffe2_detectron_custom_ops_gpu.so: undefined symbol: _ZN6caffe236FLAGS_caffe2_report_cpu_memory_usageE #66

Open
GarrickLin opened this issue Jan 12, 2019 · 2 comments

Comments

@GarrickLin
Copy link

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
Copy link

I met the same problems.

@williamdwl
Copy link

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants