tensorflow: Newly included absl headers are missing from the include path
Newly included absl headers are present in the tf-nightly Python package but do not seem to be part of the include path, and now custom op plugin compilation fails.
This has been broken between tf_nightly-1.11.0.dev20180830 and tf_nightly-1.11.0.dev20180831.
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DHAVE_CUDA=1 -DHAVE_NCCL=1 -DHOROVOD_GPU_ALLREDUCE='N' -I/usr/local/cuda/include -I/usr/include/python2.7 -c horovod/tensorflow/mpi_ops.cc -o build/temp.linux-x86_64-2.7/horovod/tensorflow/mpi_ops.o -std=c++11 -fPIC -O2 -I/usr/local/include -pthread -Wl,-rpath -Wl,/usr/local/lib -Wl,--enable-new-dtags -L/usr/local/lib -lmpi -I/usr/local/lib/python2.7/dist-packages/tensorflow/include -D_GLIBCXX_USE_CXX11_ABI=0
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:24:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:25,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:23,
from horovod/tensorflow/mpi_ops.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/core/stringpiece.h:34:38: fatal error: absl/strings/string_view.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
cc @yunxing
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 28 (11 by maintainers)
Hello @dingevin
In your tensorflow installed top directory (that has Eigen, external, tensorflow, third_party, unsupported and etc.),
$ git clone https://github.com/abseil/abseil-cpp.git $ ln -s abseil-cpp/absl ./absl
Then you can install horovod
This probably helps https://github.com/tensorflow/tensorflow/commit/914f68bfc0d7629496cd5ef6a6104efc94b6eecc
@liamuk No solution, but I haven’t tried in a while. Unfortunately I can’t build at all now due to https://github.com/tensorflow/tensorflow/issues/22902, so I don’t know if it’s still an issue.
After updating to MacOS 10.14 and thus Xcode 10, I’m hitting a possibly related linker error when trying to load custom ops:
The custom op thinks the symbol is
but the actual symbol is
I.e.,
absl::string_viewvs.basic_string_view.