rohitgirdhar/AttentionalPoolingAction

undefined symbol: _ZN5boost13thread_detail20rollback_once_regionERNS_9once_flagE

Closed this issue · 3 comments

Hello,

I'm using ubuntu 16.04, gcc 5.4, and libboost1.58-dev:amd64. I followed this link to modify the Makefile in custom_ops folder. And I got the undefined symbol error as below. I don't know if my boost version is not correct? Or there could be some other reasons? I have confirmed that my boost libraries are installed in "/usr/lib/x86_64-linux-gnu". And boost header files are in "/usr/include/boost" (of course in my Makefile, BOOST_INC_DIR := $/usr/include, as in the aforementioned issue post). Thanks!

Traceback (most recent call last):
File "../train.py", line 16, in
from datasets import dataset_factory
File "/home/local/research/DL/AttentionalPoolingAction/src/datasets/dataset_factory.py", line 8, in
from datasets import hmdb51
File "/home/local/research/DL/AttentionalPoolingAction/src/datasets/hmdb51.py", line 8, in
from datasets.video_data_utils import gen_dataset
File "/home/local/research/DL/AttentionalPoolingAction/src/datasets/video_data_utils.py", line 18, in
from custom_ops.custom_ops_factory import read_json_pose, read_sparse_label
File "/home/local/research/DL/AttentionalPoolingAction/src/custom_ops/custom_ops_factory.py", line 16, in
os.path.join(ROOT_PATH, 'render_pose.so')).render_pose
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: /home/local/research/DL/AttentionalPoolingAction/src/custom_ops/render_pose.so: undefined symbol: _ZN5boost13thread_detail20rollback_once_regionERNS_9once_flagE

Does your boost installation have the boost.thread library compiled? Boost is largely include-only library but certain parts of it (like threads) needs to be specifically compiled. I would suggest trying to compile it from source with Threads turned on, and linking against that instead.

Build instructions are here, look for --with-libraries.

Thanks! I solved my problem. Some parts were not properly linked.

How do you solve this error? I had the same problem.