Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make shared libraries with Bazel at Tensorflow

I've tried building tensorflow with bazel as follows:

bazel build -c opt --copt="-fPIC" --copt="-g0" //tensorflow/tools/pip_package:build_pip_package

I couldn't see .so file under ~/tensorflow/bazel-bin/tensorflow/core.

There are no .so files but .lo files and .a files.

Could you tell me how to make .so files of tensorflow library?

like image 211
szukiyu Avatar asked Jul 07 '16 22:07

szukiyu


1 Answers

//tensorflow:libtensorflow.so is the target you are looking for.

bazel build -c opt //tensorflow:libtensorflow.so

should produce the file in bazel-bin/tensorflow.

like image 97
keveman Avatar answered Sep 25 '22 01:09

keveman