<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:<br>
Yes, see below.</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:<br>
Ubuntu 16.04</li>
<li><strong>TensorFlow installed from (source or binary)</strong>:<br>
Source</li>
<li><strong>TensorFlow version (use command below)</strong>:<br>
v1.3.0-0-g9e76bf324 1.3.0</li>
<li><strong>Python version</strong>:<br>
3.5.2</li>
<li><strong>Bazel version (if compiling from source)</strong>:<br>
0.5.4</li>
<li><strong>CUDA/cuDNN version</strong>:<br>
8.0.44 / 5.1.5</li>
<li><strong>GPU model and memory</strong>:<br>
Any.</li>
<li><strong>Exact command to reproduce</strong>:<br>
See below.</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">When compiling a custom op using nvcc, which includes <code class="notranslate">tensorflow/core/util/cuda_kernel_helper.h</code>, I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/local/cuda-8.0/bin/nvcc -c -o ~/Code/libspn/build/ops/gather_columns_functor_gpu.cu.cc.o ~/Code/libspn/libspn/ops/gather_columns_functor_gpu.cu.cc -std=c++11 -x=cu -Xcompiler -fPIC -DGOOGLE_CUDA=1 --expt-relaxed-constexpr -I ~/.local/lib/python3.5/site-packages/tensorflow/include -gencode=arch=compute_35,&quot;code=sm_35,compute_35&quot; -gencode=arch=compute_52,&quot;code=sm_52,compute_52&quot; -gencode=arch=compute_61,&quot;code=sm_61,compute_61&quot;
In file included from ~/.local/lib/python3.5/site-packages/tensorflow/include/tensorflow/core/platform/default/stream_executor.h:26:0,
                 from ~/.local/lib/python3.5/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor.h:24,
                 from ~/.local/lib/python3.5/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:26,
                 from ~/Code/libspn/libspn/ops/gather_columns_functor_gpu.cu.h:11,
                 from ~/Code/libspn/libspn/ops/gather_columns_functor_gpu.cu.cc:5:
~/.local/lib/python3.5/site-packages/tensorflow/include/tensorflow/stream_executor/dso_loader.h:32:30: fatal error: cuda/cuda_config.h: No such file or directory
compilation terminated."><pre class="notranslate"><code class="notranslate">/usr/local/cuda-8.0/bin/nvcc -c -o ~/Code/libspn/build/ops/gather_columns_functor_gpu.cu.cc.o ~/Code/libspn/libspn/ops/gather_columns_functor_gpu.cu.cc -std=c++11 -x=cu -Xcompiler -fPIC -DGOOGLE_CUDA=1 --expt-relaxed-constexpr -I ~/.local/lib/python3.5/site-packages/tensorflow/include -gencode=arch=compute_35,"code=sm_35,compute_35" -gencode=arch=compute_52,"code=sm_52,compute_52" -gencode=arch=compute_61,"code=sm_61,compute_61"
In file included from ~/.local/lib/python3.5/site-packages/tensorflow/include/tensorflow/core/platform/default/stream_executor.h:26:0,
                 from ~/.local/lib/python3.5/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor.h:24,
                 from ~/.local/lib/python3.5/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:26,
                 from ~/Code/libspn/libspn/ops/gather_columns_functor_gpu.cu.h:11,
                 from ~/Code/libspn/libspn/ops/gather_columns_functor_gpu.cu.cc:5:
~/.local/lib/python3.5/site-packages/tensorflow/include/tensorflow/stream_executor/dso_loader.h:32:30: fatal error: cuda/cuda_config.h: No such file or directory
compilation terminated.
</code></pre></div>
<p dir="auto">Copying <code class="notranslate">cuda_config.h</code> to <code class="notranslate">/site-packages/tensorflow/include/tensorflow/stream_executor/cuda</code> solves the problem.</p>
<p dir="auto">The same issue has been observed by several other users in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="198353988" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/6602" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/6602/hovercard" href="https://github.com/tensorflow/tensorflow/issues/6602">#6602</a> (see the comments added after the issue was closed).</p>
<hr>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: No. Simply calling "import tensorflow" already crashes.</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Raspbian GNU/Linux 9 (Stretch)</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: Source</li>
<li><strong>TensorFlow version (use command below)</strong>: TensorFlow 1.6.0</li>
<li><strong>Python version</strong>: Python 3.5.3</li>
<li><strong>Bazel version (if compiling from source)</strong>: Bazel 0.11.1</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>: GCC 6.3.0 20170124</li>
<li><strong>CUDA/cuDNN version</strong>: I didn't install with CUDA support</li>
<li><strong>GPU model and memory</strong>: n/a</li>
<li><strong>Exact command to reproduce</strong>: "import tensorflow" in the Python environment</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">I built TensorFlow on Raspbian Linux for the Raspberry Pi 3 Model B. The problem is that when I try to import it in Python, the program instantly crashes, saying: "Failed to load native TensorFlow runtime." The full traceback is below.</p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">Only need to call "import tensorflow" on Python3 to reproduce the traceback below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py&quot;, line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py&quot;, line 28, in _pywrap_tensorflow_internal = swig_import_helper() File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py&quot;, line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File &quot;/usr/lib/python3.5/imp.py&quot;, line 242, in load_module return load_dynamic(name, filename, file) File &quot;/usr/lib/python3.5/imp.py&quot;, line 342, in load_dynamic return _load(spec) ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow9ConcatCPUINS_8bfloat16EEEvPNS_10DeviceBaseERKSt6vectorISt10unique_ptrINS_6TTypesIT_Li2EiE11ConstMatrixESt14default_deleteIS9_EESaISC_EEPNS8_6MatrixE"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "/usr/lib/python3.5/imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic return _load(spec) ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow9ConcatCPUINS_8bfloat16EEEvPNS_10DeviceBaseERKSt6vectorISt10unique_ptrINS_6TTypesIT_Li2EiE11ConstMatrixESt14default_deleteIS9_EESaISC_EEPNS8_6MatrixE
</code></pre></div>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;idex.py&quot;, line 1, in import gui File &quot;/home/pi/Desktop/IDEX/scripts/gui.py&quot;, line 10, in import fun_util File &quot;signlang/fun_util.py&quot;, line 3, in import tensorflow as tf File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/init.py&quot;, line 24, in from tensorflow.python import * # pylint: disable=redefined-builtin File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/init.py&quot;, line 49, in from tensorflow.python import pywrap_tensorflow File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py&quot;, line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py&quot;, line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py&quot;, line 28, in _pywrap_tensorflow_internal = swig_import_helper() File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py&quot;, line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File &quot;/usr/lib/python3.5/imp.py&quot;, line 242, in load_module return load_dynamic(name, filename, file) File &quot;/usr/lib/python3.5/imp.py&quot;, line 342, in load_dynamic return _load(spec) ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow9ConcatCPUINS_8bfloat16EEEvPNS_10DeviceBaseERKSt6vectorISt10unique_ptrINS_6TTypesIT_Li2EiE11ConstMatrixESt14default_deleteIS9_EESaISC_EEPNS8_6MatrixE

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions. Include the entire stack trace above this error message when asking for help."><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "idex.py", line 1, in import gui File "/home/pi/Desktop/IDEX/scripts/gui.py", line 10, in import fun_util File "signlang/fun_util.py", line 3, in import tensorflow as tf File "/usr/local/lib/python3.5/dist-packages/tensorflow/init.py", line 24, in from tensorflow.python import * # pylint: disable=redefined-builtin File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/init.py", line 49, in from tensorflow.python import pywrap_tensorflow File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "/usr/lib/python3.5/imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic return _load(spec) ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow9ConcatCPUINS_8bfloat16EEEvPNS_10DeviceBaseERKSt6vectorISt10unique_ptrINS_6TTypesIT_Li2EiE11ConstMatrixESt14default_deleteIS9_EESaISC_EEPNS8_6MatrixE

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.
</code></pre></div>