<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>Linux Ubuntu 18.04.2 LTS:</li>
<li>TensorFlow installed from tar.gz source file</li>
<li>TensorFlow version: 2.0.0.alpha0</li>
<li>Python version: 3.5.2 (provided in Docker image)</li>
<li>Build inside Docker container (<a href="https://www.tensorflow.org/install/source#gpu_support_2" rel="nofollow">https://www.tensorflow.org/install/source#gpu_support_2</a>)</li>
<li>Bazel version - 0.19.2 (provided in docker image)</li>
<li>GCC/Compiler version (if compiling from source): gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11)  (provided in docker image)</li>
<li>CUDA/cuDNN version: /usr/local/cuda-10.0 (provided in docker image)</li>
<li>GPU model and memory: i7 980x  - no AVX instruction set so building locally with GPU support</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong><br>
The bazel build step fails with the following messages:</p>
<p dir="auto">root@67e84911cbdf:/tensorflow# bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package<br>
Starting local Bazel server and connecting to it...<br>
WARNING: The following configs were expanded more than once: [cuda]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.<br>
INFO: Repository rule 'build_bazel_rules_swift' returned: {"remote": "<a href="https://github.com/bazelbuild/rules_swift.git">https://github.com/bazelbuild/rules_swift.git</a>", "commit": "001736d056d7eae20f1f4da41bc9e6f036857296", "shallow_since": "2019-01-18", "init_submodules": False, "verbose": False, "strip_prefix": "", "patches": [], "patch_tool": "patch", "patch_args": ["-p0"], "patch_cmds": [], "name": "build_bazel_rules_swift"}<br>
ERROR: error loading package '': Extension file not found. Unable to load package for '//tensorflow:version_check.bzl': BUILD file not found on package path<br>
ERROR: error loading package '': Extension file not found. Unable to load package for '//tensorflow:version_check.bzl': BUILD file not found on package path<br>
INFO: Elapsed time: 8.103s<br>
INFO: 0 processes.<br>
FAILED: Build did NOT complete successfully (0 packages loaded)<br>
root@67e84911cbdf:</p>
<p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong></p>
<p dir="auto">Following the instructions here: <a href="https://www.tensorflow.org/install/source#gpu_support_2" rel="nofollow">https://www.tensorflow.org/install/source#gpu_support_2</a></p>
<p dir="auto">NOTE: These instructions work fine for the included tf-1.12 source and I've used them with a different Docker image for tf-1.13/</p>
<ol dir="auto">
<li>Start a Docker container using this command to mount a tf-2.0.0 directory within Docker</li>
</ol>
<p dir="auto">docker run --runtime=nvidia -it -w /tensorflow -v /home/mark/Docker_Run:/mnt -v /home/mark/CODE/tensorflow-2.0.0-alpha0:/tensorflow_source -e HOST_PERMS="$(id -u):$(id -g)"     tensorflow/tensorflow:devel-gpu-py3 bash</p>
<p dir="auto">This image provides python-3.5.2, bazel-0.19.2 &amp; cuda-10. It has a /tensorflow_src directory with tf-1.12 and nothing in the /tensorflow directory.</p>
<ol start="2" dir="auto">
<li>Copy the tf-2.0.0-alpha0 code from the external mounted /tensorflow_source directory into the internal /tensorflow directory:</li>
</ol>
<p dir="auto">rm -rf /tensorflow<br>
mkdir /tensorflow<br>
cp -R /tensorflow_source/. /tensorflow</p>
<ol start="3" dir="auto">
<li>Run the configure step accepting all default values</li>
</ol>
<p dir="auto">cd /tensorflow<br>
./configure</p>
<ol start="4" dir="auto">
<li>Run the bazel build step which fails with the message above.</li>
</ol>
<p dir="auto">NOTE: I've looked at a lot of Docker images and felt this one had the right stuff other than the alpha0 tensorflow codebase. If there's a better docker image or a better way to get the alpha0 code into the Docker image than mounting it outside of Docker please advise.</p>
<p dir="auto"><strong>Describe the current behavior</strong><br>
Option values of <code class="notranslate">java_outer_classname</code> in <code class="notranslate">tensorflow/compiler/tf2xla/host_compute_metadata.proto</code> and <code class="notranslate">tensorflow/compiler/tf2xla/tf2xla.proto</code> are the same, result in protoc failure for Java:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; protoc: stdout: . stderr: tensorflow/compiler/xla/rpc/xla_service.proto: warning: Import tensorflow/compiler/xla/xla_data.proto but not used.
  tensorflow/core/protobuf/replay_log.proto: warning: Import tensorflow/core/framework/graph.proto but not used.
  tensorflow/core/protobuf/replay_log.proto: warning: Import tensorflow/core/protobuf/cluster.proto but not used.
  org/tensorflow/tf2xla/Tf2XlaProtos.java: Tried to write the same file twice."><pre class="notranslate"><code class="notranslate">&gt; protoc: stdout: . stderr: tensorflow/compiler/xla/rpc/xla_service.proto: warning: Import tensorflow/compiler/xla/xla_data.proto but not used.
  tensorflow/core/protobuf/replay_log.proto: warning: Import tensorflow/core/framework/graph.proto but not used.
  tensorflow/core/protobuf/replay_log.proto: warning: Import tensorflow/core/protobuf/cluster.proto but not used.
  org/tensorflow/tf2xla/Tf2XlaProtos.java: Tried to write the same file twice.
</code></pre></div>
<p dir="auto"><strong>Describe the expected behavior</strong><br>
protoc succeeds without error.<br>
<code class="notranslate">java_outer_classname</code> in <code class="notranslate">tensorflow/compiler/tf2xla/host_compute_metadata.proto</code> may be renamed to <code class="notranslate">HostComputeMetadataProtos</code></p>
<p dir="auto"><strong>Code to reproduce the issue</strong></p>
<p dir="auto">Just protoc</p>
<p dir="auto"><strong>Other info / logs</strong></p>