<p dir="auto">Building tensorflow with makefile method gets stuck at</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gcc --std=c++11 -DIS_SLIM_BUILD -O0 -I. -I/home/tensorflow/tensorflow/contrib/makefile/downloads/ -I/home/tensorflow/tensorflow/contrib/makefile/downloads/eigen-eigen-9e1b48c333aa -I/home/tensorflow/tensorflow/contrib/makefile/gen/proto/ -I/home/tensorflow/tensorflow/contrib/makefile/gen/proto_text/ -I/usr/local/include -I/usr/local/include/c++/4.9.4/ -I/usr/local/include/c++/4.9.4/arm-linux-gnueabihf/ \
-o /home/tensorflow/tensorflow/contrib/makefile/gen/bin/benchmark /home/tensorflow/tensorflow/contrib/makefile/gen/obj/tensorflow/core/util/reporter.o /home/tensorflow/tensorflow/contrib/makefile/gen/obj/tensorflow/tools/benchmark/benchmark_model.o /home/tensorflow/tensorflow/contrib/makefile/gen/obj/tensorflow/tools/benchmark/benchmark_model_main.o \
 -Wl,--allow-multiple-definition -Wl,--whole-archive /home/tensorflow/tensorflow/contrib/makefile/gen/lib/libtensorflow-core.a -L/usr/local/lib -lstdc++ -lprotobuf -lz -lm -ldl -lpthread
/home/tensorflow/tensorflow/contrib/makefile/gen/lib/libtensorflow-core.a(conv_ops.o): In function `tensorflow::LaunchDeepConvOp&lt;Eigen::ThreadPoolDevice, float&gt;::Run(tensorflow::OpKernelContext*, tensorflow::Tensor const&amp;, tensorflow::Tensor const&amp;, int, int, int, int, int, int, int, int, int, int, int, int, int, tensorflow::Tensor*, tensorflow::TensorFormat)':
conv_ops.cc:(.text._ZN10tensorflow16LaunchDeepConvOpIN5Eigen16ThreadPoolDeviceEfE3RunEPNS_15OpKernelContextERKNS_6TensorES8_iiiiiiiiiiiiiPS6_NS_12TensorFormatE[_ZN10tensorflow16LaunchDeepConvOpIN5Eigen16ThreadPoolDeviceEfE3RunEPNS_15OpKernelContextERKNS_6TensorES8_iiiiiiiiiiiiiPS6_NS_12TensorFormatE]+0x58): undefined reference to `tensorflow::CanUseDeepConv2D(int, int, int, int, int, int, int, int)'
conv_ops.cc:(.text._ZN10tensorflow16LaunchDeepConvOpIN5Eigen16ThreadPoolDeviceEfE3RunEPNS_15OpKernelContextERKNS_6TensorES8_iiiiiiiiiiiiiPS6_NS_12TensorFormatE[_ZN10tensorflow16LaunchDeepConvOpIN5Eigen16ThreadPoolDeviceEfE3RunEPNS_15OpKernelContextERKNS_6TensorES8_iiiiiiiiiiiiiPS6_NS_12TensorFormatE]+0x174): undefined reference to `tensorflow::functor::DeepConv2D&lt;Eigen::ThreadPoolDevice, float&gt;::operator()(tensorflow::OpKernelContext*, tensorflow::Conv2DArgs const&amp;, float const*, float const*, float*)'
collect2: error: ld returned 1 exit status
tensorflow/contrib/makefile/Makefile:485: recipe for target '/home/tensorflow/tensorflow/contrib/makefile/gen/bin/benchmark' failed
make: *** [/home/tensorflow/tensorflow/contrib/makefile/gen/bin/benchmark] Error 1"><pre class="notranslate"><code class="notranslate">gcc --std=c++11 -DIS_SLIM_BUILD -O0 -I. -I/home/tensorflow/tensorflow/contrib/makefile/downloads/ -I/home/tensorflow/tensorflow/contrib/makefile/downloads/eigen-eigen-9e1b48c333aa -I/home/tensorflow/tensorflow/contrib/makefile/gen/proto/ -I/home/tensorflow/tensorflow/contrib/makefile/gen/proto_text/ -I/usr/local/include -I/usr/local/include/c++/4.9.4/ -I/usr/local/include/c++/4.9.4/arm-linux-gnueabihf/ \
-o /home/tensorflow/tensorflow/contrib/makefile/gen/bin/benchmark /home/tensorflow/tensorflow/contrib/makefile/gen/obj/tensorflow/core/util/reporter.o /home/tensorflow/tensorflow/contrib/makefile/gen/obj/tensorflow/tools/benchmark/benchmark_model.o /home/tensorflow/tensorflow/contrib/makefile/gen/obj/tensorflow/tools/benchmark/benchmark_model_main.o \
 -Wl,--allow-multiple-definition -Wl,--whole-archive /home/tensorflow/tensorflow/contrib/makefile/gen/lib/libtensorflow-core.a -L/usr/local/lib -lstdc++ -lprotobuf -lz -lm -ldl -lpthread
/home/tensorflow/tensorflow/contrib/makefile/gen/lib/libtensorflow-core.a(conv_ops.o): In function `tensorflow::LaunchDeepConvOp&lt;Eigen::ThreadPoolDevice, float&gt;::Run(tensorflow::OpKernelContext*, tensorflow::Tensor const&amp;, tensorflow::Tensor const&amp;, int, int, int, int, int, int, int, int, int, int, int, int, int, tensorflow::Tensor*, tensorflow::TensorFormat)':
conv_ops.cc:(.text._ZN10tensorflow16LaunchDeepConvOpIN5Eigen16ThreadPoolDeviceEfE3RunEPNS_15OpKernelContextERKNS_6TensorES8_iiiiiiiiiiiiiPS6_NS_12TensorFormatE[_ZN10tensorflow16LaunchDeepConvOpIN5Eigen16ThreadPoolDeviceEfE3RunEPNS_15OpKernelContextERKNS_6TensorES8_iiiiiiiiiiiiiPS6_NS_12TensorFormatE]+0x58): undefined reference to `tensorflow::CanUseDeepConv2D(int, int, int, int, int, int, int, int)'
conv_ops.cc:(.text._ZN10tensorflow16LaunchDeepConvOpIN5Eigen16ThreadPoolDeviceEfE3RunEPNS_15OpKernelContextERKNS_6TensorES8_iiiiiiiiiiiiiPS6_NS_12TensorFormatE[_ZN10tensorflow16LaunchDeepConvOpIN5Eigen16ThreadPoolDeviceEfE3RunEPNS_15OpKernelContextERKNS_6TensorES8_iiiiiiiiiiiiiPS6_NS_12TensorFormatE]+0x174): undefined reference to `tensorflow::functor::DeepConv2D&lt;Eigen::ThreadPoolDevice, float&gt;::operator()(tensorflow::OpKernelContext*, tensorflow::Conv2DArgs const&amp;, float const*, float const*, float*)'
collect2: error: ld returned 1 exit status
tensorflow/contrib/makefile/Makefile:485: recipe for target '/home/tensorflow/tensorflow/contrib/makefile/gen/bin/benchmark' failed
make: *** [/home/tensorflow/tensorflow/contrib/makefile/gen/bin/benchmark] Error 1
</code></pre></div>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li>
<p dir="auto"><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: N/A</p>
</li>
<li>
<p dir="auto"><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Linux Ubuntu 16.04.4</p>
</li>
<li>
<p dir="auto"><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>: N/A</p>
</li>
<li>
<p dir="auto"><strong>TensorFlow installed from (source or binary)</strong>: binary from pip</p>
</li>
<li>
<p dir="auto"><strong>TensorFlow version (use command below)</strong>: v1.14.0-rc1-22-gaf24dc91b5 1.14.0</p>
</li>
<li>
<p dir="auto"><strong>Python version</strong>: 3.5.2</p>
</li>
<li>
<p dir="auto"><strong>Bazel version (if compiling from source)</strong>: N/A</p>
</li>
<li>
<p dir="auto"><strong>GCC/Compiler version (if compiling from source)</strong>: N/A</p>
</li>
<li>
<p dir="auto"><strong>CUDA/cuDNN version</strong>: N/A</p>
</li>
<li>
<p dir="auto"><strong>GPU model and memory</strong>: N/A</p>
</li>
<li>
<p dir="auto"><strong>Exact command to reproduce</strong>:</p>
<ol dir="auto">
<li>launch jupyter notebook,</li>
<li>download tutorial from google colab (<a href="https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/estimators/boosted_trees.ipynb" rel="nofollow">https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/estimators/boosted_trees.ipynb</a>),</li>
<li>run the notebook.</li>
</ol>
</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Hi, I'm currently learning TensorFlow from the tutorials of the TF site.</p>
<p dir="auto">But, during exercise in the tutorial (<a href="https://www.tensorflow.org/tutorials/estimators/boosted_trees" rel="nofollow">https://www.tensorflow.org/tutorials/estimators/boosted_trees</a>), I got a strange error.</p>
<p dir="auto">TensorFlow was constantly crashed with the code, although it was provided from official site. I tried both jupyter notebook and plain python code.</p>
<p dir="auto">So I googled the problem a little bit, and found that there's a workaround (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="202030379" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/6968" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/6968/hovercard" href="https://github.com/tensorflow/tensorflow/issues/6968">#6968</a>), i.e.,</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sudo apt install libtcmalloc-minimal4
export LD_PRELOAD=&quot;/usr/lib/libtcmalloc_minimal.so.4&quot;"><pre class="notranslate">sudo apt install libtcmalloc-minimal4
<span class="pl-k">export</span> LD_PRELOAD=<span class="pl-s"><span class="pl-pds">"</span>/usr/lib/libtcmalloc_minimal.so.4<span class="pl-pds">"</span></span></pre></div>
<p dir="auto">And then the code worked flawlessly.</p>
<p dir="auto">However, this leaves another questions, and these are what I really wonder;</p>
<ol dir="auto">
<li>
<p dir="auto">does this problem happen to some boundary cases like mine? Perhaps I am missing some configurations. I'll be glad to let me know.</p>
</li>
<li>
<p dir="auto">if not, that is, <code class="notranslate">tcmalloc</code> is necessary for the TensorFlow, and considering that <code class="notranslate">tcmalloc</code> is not distributed with the every default linux (for example, ubuntu) installations, might be there a better way to evade this situation?</p>
</li>
</ol>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">Before applying the <code class="notranslate">tcmalloc</code> package, jupyter kernel died with this message,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Kernel Restarting

The kernel appears to have died. It will restart automatically."><pre class="notranslate"><code class="notranslate">Kernel Restarting

The kernel appears to have died. It will restart automatically.
</code></pre></div>
<p dir="auto">Here is some snippet of the log message.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="*** Error in `/home/sungjin/.virtualenvs/boost/bin/python3': malloc(): memory corruption (fast): 0x00007fe0e804d6d0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fe1f56097e5]"><pre class="notranslate"><code class="notranslate">*** Error in `/home/sungjin/.virtualenvs/boost/bin/python3': malloc(): memory corruption (fast): 0x00007fe0e804d6d0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fe1f56097e5]
</code></pre></div>