Problem 1
fatal error: third_party/eigen3/unsupported/Eigen/CXX11/Tensor: No such file or directoryif you pip install using virtual environment, the include files are not copied.
Solution
1. Dirty one. Install tensorflow globally.2. The including files will be copied to
/usr/local/lib/python2.7/dist-packages/tensorflow/
Thus, we only need to copy them to ~/tensorflow/include python2.7.
The source files are stored in
tensorflow-1.5.0-rc0/third_party/eigen3/unsupported/Eigen/CXX11
Problem 2
fatal error: nsync_cv.h: No such file or directory
fatal error: nsync_mu.h: No such file or directory
Solution
1. modify source c++ file
find /usr/local/lib/python2.7/dist-packages/tensorflow/ -name "nsync_mu.h"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/external/nsync/public/nsync_mu.h
modify line 25 and 26 to include right path in /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/platform/default/mutex.h
2.
or modify makefile to add include path
add
nsync_cv.h
include:-I$TF_INC/external/nsync/public
maybe help you
I found it from https://www.tensorflow.org/extend/adding_an_op#build_the_op_library
I found it from https://www.tensorflow.org/extend/adding_an_op#build_the_op_library
below is official demo
TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')
g++ -std=c++11 -shared zero_out.cc -o zero_out.so -fPIC -I$TF_INC -I$TF_INC/external/nsync/public -L$TF_LIB -ltensorflow_framework -O2
Problem 3
Using tensorboardFile "/home/jinglu/tensorflow/bin/tensorboard", line 7, in <module>
from tensorboard.main import run_main
Solution
pip install tb-nightly
Undefined symbol: _ZTIN10tensorflow8OpKernelE
-L $TF_LIB -ltensorflow_framework
Problem 4
Undefined symbol: _ZTIN10tensorflow8OpKernelE
Solution
add the flags in g++-L $TF_LIB -ltensorflow_framework