<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow):  Stock example script.</li>
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOS Linux release 7.6.1810 (Core)</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: On my laptop,</li>
<li>TensorFlow installed from (source or binary): From source for c++ application.</li>
<li>TensorFlow version (use command below): v1.8.0</li>
<li>Python version: 2.7</li>
<li>Bazel version (if compiling from source): 0.15.1</li>
<li>GCC/Compiler version (if compiling from source): g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)</li>
<li>CUDA/cuDNN version: CPU only</li>
<li>GPU model and memory: None.</li>
</ul>
<p dir="auto"><strong>Describe the current behavior</strong><br>
I have a <a href="https://medium.com/@tomdeore/standalone-c-build-tensorflow-opencv-6dc9d8a1412d" rel="nofollow">Standalone c++ build</a> process for ubuntu and it works fine with my own code as well as with the c++ <a href="https://www.tensorflow.org/guide/extend/cc" rel="nofollow">example code</a> on tensorflow.</p>
<p dir="auto">But when i run the same code on CentOS platform. I get following runtime error message and the executable core dumps:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-07-11 10:20:42.027023: F tensorflow/core/framework/function.cc:1329] Check failed: GetOpGradFactory()-&gt;insert({op, func}).second Duplicated gradient for MapAccumulate
Aborted (core dumped)"><pre class="notranslate"><code class="notranslate">2019-07-11 10:20:42.027023: F tensorflow/core/framework/function.cc:1329] Check failed: GetOpGradFactory()-&gt;insert({op, func}).second Duplicated gradient for MapAccumulate
Aborted (core dumped)
</code></pre></div>
<p dir="auto">My compilation command is as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="g++ -std=gnu++11 -Wl,-rpath='$ORIGIN/lib' -fPIC -Iinclude -Llib  example.cc -ltensorflow_cc -ltensorflow_framework   -o example"><pre class="notranslate"><code class="notranslate">g++ -std=gnu++11 -Wl,-rpath='$ORIGIN/lib' -fPIC -Iinclude -Llib  example.cc -ltensorflow_cc -ltensorflow_framework   -o example
</code></pre></div>
<p dir="auto"><strong>Code to reproduce the issue</strong><br>
Provide a reproducible test case that is the bare minimum necessary to generate the problem.<br>
Please follow the steps provided on <a href="https://medium.com/@tomdeore/standalone-c-build-tensorflow-opencv-6dc9d8a1412d" rel="nofollow">blog</a>.</p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution : windows10</li>
<li>TensorFlow installed from : source</li>
<li>TensorFlow version: 1.11.0</li>
<li>Python version: Python 3.6.3 :: Anaconda custom (64-bit)</li>
<li>Installed using virtualenv? pip? conda?: conda</li>
<li>Bazel version (if compiling from source): 0.19.0 not from source</li>
</ul>
<p dir="auto">only cpu version.</p>
<p dir="auto">I followed the instruction from <a href="https://tensorflow.google.cn/install/source_windows#bazel_build" rel="nofollow">tensorflow official site.</a></p>
<p dir="auto">When I entered <code class="notranslate">bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package</code><br>
An error occurred</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
d:\tensorflow-1.11.0/.bazelrc
d:\tensorflow-1.11.0/tools/bazel.rc
ERROR: SymlinkDirectories(C:\Users\Administrator/_bazel_Administrator/install/46e308c2aba33f6ef6ad7b7f2c018098, c:\users\administrator\_bazel_administrator\buk4ctdf/install): CreateJunction:
FATAL: failed to create installation symlink 'c:\users\administrator\_bazel_administrator\buk4ctdf/install': success"><pre class="notranslate"><code class="notranslate">WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
d:\tensorflow-1.11.0/.bazelrc
d:\tensorflow-1.11.0/tools/bazel.rc
ERROR: SymlinkDirectories(C:\Users\Administrator/_bazel_Administrator/install/46e308c2aba33f6ef6ad7b7f2c018098, c:\users\administrator\_bazel_administrator\buk4ctdf/install): CreateJunction:
FATAL: failed to create installation symlink 'c:\users\administrator\_bazel_administrator\buk4ctdf/install': success
</code></pre></div>