Serj Serj - 1 year ago 236
Linux Question

Error building Tensorflow on CentOS 7

I am trying to compile Tensorflow (r1.3) on CentOS 7.

My environment: gcc (g++) 7.20, bazel 0.5.3, python3 (with all
necessary dependencies listed on tensorflow web site), swig 3.0.12,
openjdk 8. Everything is installed in the users scope, without root access.

Whenever I am trying to build a python package invoking following command

bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package

I am getting this error:


2017-08-24 11:40:35.734659: W
tensorflow/core/framework/] Squeeze can't find input
squeeze_dims to rename ERROR:
Couldn't build file tensorflow/python/
SWIGing tensorflow/python/tensorflow.i failed (Exit 1).


However building C++ lib (bazel build --config=opt // working without any issues

Am I doing something wrong?

Update 25.08.2017:
ok, it seems that SWIG is build automatically from source when running bazel build. The version of shipped SWIG version is 3.0.8. But still, I have no clue how to solve this problem.

Answer Source

ok, problem solved by using bazel version 0.5.1. Newer version producing the same error.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download