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/op_gen_lib.cc:372] Squeeze can’t find input squeeze_dims to rename ERROR: /home/data/software/tensorflow/tensorflow/python/BUILD:2762:1: Couldn’t build file tensorflow/python/pywrap_tensorflow_internal.cc: SWIGing tensorflow/python/tensorflow.i failed (Exit 1).
…
However building C++ lib (bazel build –config=opt //tensorflow:libtensorflow_cc.so) 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.
Advertisement
Answer
ok, problem solved by using bazel version 0.5.1. Newer version producing the same error.