lingvo icon indicating copy to clipboard operation
lingvo copied to clipboard

fatal error: tensorflow/core/platform/threadpool.h: No such file or directory

Open yinjunbo opened this issue 5 years ago • 3 comments

I have tried to run the StarNet on local machine. As far as I understand, it is essential to run ./docs/generate_apidoc.sh first to get the needed file. But I met these problems:

INFO: Analyzed 6 targets (0 packages loaded, 0 targets configured).
INFO: Found 6 targets...
ERROR: /home/ssd/junbo/repository/lingvo/lingvo/core/ops/BUILD:380:1: C++ compilation of rule '//lingvo/core/ops:preconditioner_op_kernels' f
ailed (Exit 1) gcc failed: error executing command /usr/local/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -W
no-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 67 argument(s) skipp
ed)

Use --sandbox_debug to see verbose messages from the sandbox
In file included from lingvo/core/ops/preconditioner_op_kernels.cc:19:0:
./lingvo/core/ops/preconditioner_captain.h:23:10: fatal error: tensorflow/core/platform/threadpool.h: No such file or directory
 #include "tensorflow/core/platform/threadpool.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
INFO: Elapsed time: 7.725s, Critical Path: 7.44s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

yinjunbo avatar May 18 '20 14:05 yinjunbo

Env: CentOS 7 tensorflow-gpu 2.0 GCC 4.8

yinjunbo avatar May 19 '20 04:05 yinjunbo

Could you check:

python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())'

and see if that file (tensorflow/core/platform/threadpool.h) lives under that directory?

It's best to build the whole thing:

bazel build -c opt lingvo:trainer

first.

drpngx avatar May 19 '20 15:05 drpngx

@drpngx Thanks. Fixed it with tensorflow-gpu>=2.1

yinjunbo avatar May 27 '20 12:05 yinjunbo