undefined references
mjjdick opened this issue · 4 comments
Hi, your work is really great!
I run the inference,but just got these error:
/home/mjj/Tensorflow/tensorflow/tensorflow_dist/libtensorflow_cc.so:‘tensorflow::Node::requested_device[abi:cxx11]() const’undefined references
/home/mjj/Tensorflow/tensorflow/tensorflow_dist/libtensorflow_cc.so:‘tensorflow::SetAttrValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, tensorflow::AttrValue*)’undefined references
/home/mjj/Tensorflow/tensorflow/tensorflow_dist/libtensorflow_cc.so:‘stream_executor::blas::AlgorithmConfig::ToString[abi:cxx11]() const’undefined references
/home/mjj/Tensorflow/tensorflow/tensorflow_dist/libtensorflow_cc.so:对‘tensorflow::OpDef* google::protobuf::Arena::CreateMaybeMessage<tensorflow::OpDef>(google::protobuf::Arena*)’undefined references
it seems to be cmake error, and my cmake output is:
-- Detecting TensorFlow info
-- Detecting TensorFlow info - done
-- Found TensorFlow: (found suitable exact version "1.9.0")
-- TensorFlow-ABI is 0
-- TensorFlow-INCLUDE_DIR is /usr/local/lib/python2.7/dist-packages/tensorflow/include
-- TensorFlow-LIBRARY is /usr/local/lib/python2.7/dist-packages/tensorflow/libtensorflow_framework.so
-- TensorFlow-CC-LIBRARY is /home/mjj/Tensorflow/tensorflow/tensorflow_dist/libtensorflow_cc.so
-- TensorFlow-SOURCE-DIRECTORY is /home/mjj/Tensorflow/tensorflow
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mjj/Tensorflow_robosense/tensorflow-cmake/inference/cc/cmake-build-debug
so , can any one help me? I will be very thx!
What is the output of:
nm -C /home/mjj/Tensorflow/tensorflow/tensorflow_dist/libtensorflow_cc.so | grep requested_device
nm -g /home/mjj/Tensorflow/tensorflow/tensorflow_dist/libtensorflow_cc.so | grep requested_device
nm -C /usr/local/lib/python2.7/dist-packages/tensorflow/libtensorflow_framework.so | grep requested_device
nm -g /usr/local/lib/python2.7/dist-packages/tensorflow/libtensorflow_framework.so | grep requested_device
And the elephant in the room: Did you use pip install from your local tensorflow installation from source or do you just use pip install tensorflow-gpu
? There might be a version mismatch.
@PatWie thx for your answer! yes, I just use pip install tensorflow-gpu
before. so I pip uninstall tensorflow-gpu
and reinstall it use pip install tensorflow-gpu --user
.
and then the tensorflow version become 1.10, bug the error is still exist!
here is the cmake outputs:
-- Detecting TensorFlow info -- Detecting TensorFlow info - done -- Found TensorFlow: (found suitable exact version "1.10.0") -- TensorFlow-ABI is 0 -- TensorFlow-INCLUDE_DIR is /home/mjj/.local/lib/python2.7/site-packages/tensorflow/include -- TensorFlow-LIBRARY is /home/mjj/.local/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so -- TensorFlow-CC-LIBRARY is /home/mjj/Tensorflow/tensorflow/tensorflow_dist/libtensorflow_cc.so -- TensorFlow-SOURCE-DIRECTORY is /home/mjj/Tensorflow/tensorflow -- Configuring done -- Generating done -- Build files have been written to: /home/mjj/Tensorflow_robosense/tensorflow-cmake/inference/cc/cmake-build-debug
and for command:
nm -C /home/mjj/Tensorflow/tensorflow/tensorflow_dist/libtensorflow_cc.so | grep requested_device
the output is:
`
U tensorflow::Node::set_requested_device(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
U tensorflow::Node::requested_deviceabi:cxx11 const
U tensorflow::OpKernel::requested_deviceabi:cxx11 const
`
for command:
U _ZN10tensorflow4Node20set_requested_deviceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE U _ZNK10tensorflow4Node16requested_deviceB5cxx11Ev U _ZNK10tensorflow8OpKernel16requested_deviceB5cxx11Ev
for command:
nm -C /home/mjj/.local/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so | grep requested_device
the output is:
00000000004b0e80 T tensorflow::Node::set_requested_device(std::string const&) 00000000004ad140 T tensorflow::Node::requested_device() const 00000000004617d0 T tensorflow::OpKernel::requested_device() const
for command:
nm -g /home/mjj/.local/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so | grep requested_device
the output is:
00000000004b0e80 T _ZN10tensorflow4Node20set_requested_deviceERKSs 00000000004ad140 T _ZNK10tensorflow4Node16requested_deviceEv 00000000004617d0 T _ZNK10tensorflow8OpKernel16requested_deviceEv
I do not know the outputs means, look forward your help, thx again!
This is not how it is supposed to work. If you want to run the inference examples you will need to build your own pip package locally and install your own pip package then to ensure all libraries will match.
You already built the libtensorflow_cc.so file. Please follow the official guide to built that wheel file ...whl.