tensorflow / addons

Useful extra functionality for TensorFlow 2.x maintained by SIG-addons
Apache License 2.0
1.69k stars 611 forks source link

Build failure against TF r2.16: third_party/eigen3/unsupported/Eigen/CXX11/Tensor: No such file or directory #2860

Closed plopresti closed 7 months ago

plopresti commented 9 months ago

System information

Describe the bug

Build fails with:

In file included from tensorflow_addons/custom_ops/seq2seq/cc/kernels/beam_search_ops.cc:22:
./tensorflow_addons/custom_ops/seq2seq/cc/kernels/beam_search_ops.h:21:10: fatal error: third_party/eigen3/unsupported/Eigen/CXX11/Tensor: No such file or directory
   21 | #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A clear and concise description of what the bug is.

Code to reproduce the issue

git clone https://github.com/tensorflow/addons.git
cd addons
git checkout master
python3 ./configure.py
bazel build build_pip_pkg
plopresti commented 7 months ago

I created my own work-around before I saw the pull request from @trevor-m :

tp=/path/to/venv/lib/python3.11/site-packages-tensorflow/include/third_party
mkdir "$tp"/eigen3
ln -s ../../unsupported ../../Eigen "$tp"/eigen3

...and then delete your Bazel cache and rebuild.

Of course the pull request has a much better approach.