<p dir="auto">Hi!<br>
I just tried building TF 1.2.0-rc1 with MKL, using:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bazel build --config=opt --config=cuda --config=mkl --copt=&quot;-DEIGEN_USE_VML&quot; -c opt //tensorflow/tools/pip_package:build_pip_package"><pre class="notranslate"><code class="notranslate">bazel build --config=opt --config=cuda --config=mkl --copt="-DEIGEN_USE_VML" -c opt //tensorflow/tools/pip_package:build_pip_package
</code></pre></div>
<p dir="auto">Where, in the <code class="notranslate">'./configure</code> step I said "yes" to both using MKL and to downloading it from the web. I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: /dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/BUILD:1544:1: undeclared inclusion(s) in rule '//tensorflow/core:core_cpu_base':
this rule is missing dependency declarations for the following files included by 'tensorflow/core/graph/mkl_tfconversion_pass.cc':
  '/dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/common_runtime/function.h'
  '/dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/common_runtime/device_mgr.h'
  '/dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/common_runtime/optimization_registry.h'
  '/dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/common_runtime/device_set.h'.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps."><pre class="notranslate"><code class="notranslate">ERROR: /dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/BUILD:1544:1: undeclared inclusion(s) in rule '//tensorflow/core:core_cpu_base':
this rule is missing dependency declarations for the following files included by 'tensorflow/core/graph/mkl_tfconversion_pass.cc':
  '/dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/common_runtime/function.h'
  '/dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/common_runtime/device_mgr.h'
  '/dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/common_runtime/optimization_registry.h'
  '/dataSSD/untom/tmp/tensorflow-1.2.0-rc1/tensorflow/core/common_runtime/device_set.h'.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
</code></pre></div>
<p dir="auto">EDIT: I used bazel 0.4.5 and Python 3.6.1</p>
<p dir="auto">Building with config MKL with the current master fails with build rule error.</p>
<h3 dir="auto">System information:</h3>
<p dir="auto">(contents from tf_env.txt)<br>
== cat /etc/issue ===============================================<br>
Linux desktop 4.4.0-75-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="116139237" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/96" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/96/hovercard" href="https://github.com/tensorflow/tensorflow/issues/96">#96</a>-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux<br>
VERSION="16.04.2 LTS (Xenial Xerus)"<br>
VERSION_ID="16.04"<br>
VERSION_CODENAME=xenial</p>
<p dir="auto">== are we in docker =============================================<br>
No</p>
<p dir="auto">== compiler =====================================================<br>
c++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609<br>
Copyright (C) 2015 Free Software Foundation, Inc.<br>
This is free software; see the source for copying conditions.  There is NO<br>
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
<p dir="auto">== uname -a =====================================================<br>
Linux desktop 4.4.0-75-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="116139237" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/96" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/96/hovercard" href="https://github.com/tensorflow/tensorflow/issues/96">#96</a>-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux</p>
<p dir="auto">== check pips ===================================================<br>
numpy (1.12.1)<br>
protobuf (3.3.0)<br>
tensorflow (1.1.0)</p>
<p dir="auto">== check for virtualenv =========================================<br>
False</p>
<p dir="auto">== tensorflow import ============================================<br>
tf.VERSION = 1.1.0-rc2<br>
tf.GIT_VERSION = v1.1.0-rc2-1163-gcbe5eb4<br>
tf.COMPILER_VERSION = v1.1.0-rc2-1163-gcbe5eb4<br>
Sanity check: array([1], dtype=int32)</p>
<p dir="auto">== env ==========================================================<br>
LD_LIBRARY_PATH is unset<br>
DYLD_LIBRARY_PATH is unset</p>
<p dir="auto">== nvidia-smi ===================================================</p>
<p dir="auto">== cuda libs  ===================================================</p>
<p dir="auto"><strong>Exact command to reproduce</strong>:</p>
<p dir="auto">bazel --output_user_root=/home/desktop/gtt/tfbuild_opt/ build --copt="-DEIGEN_USE_VML" --config=mkl -c opt //tensorflow/tools/pip_package:build_pip_package</p>
<h3 dir="auto">Describe the problem: Build with the above setup and following configure options fails with a build rule error.</h3>
<p dir="auto">$ ./configure<br>
Please specify the location of python. [Default is /usr/bin/python]:<br>
Found possible Python library paths:<br>
/usr/local/lib/python2.7/dist-packages<br>
/usr/lib/python2.7/dist-packages<br>
Please input the desired Python library path to use.  Default is [/usr/local/lib/python2.7/dist-packages]</p>
<p dir="auto">Using python library path: /usr/local/lib/python2.7/dist-packages<br>
Do you wish to build TensorFlow with MKL support? [y/N] y<br>
MKL support will be enabled for TensorFlow<br>
Do you wish to download MKL LIB from the web? [Y/n]<br>
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]:<br>
Do you wish to use jemalloc as the malloc implementation? [Y/n]<br>
jemalloc enabled<br>
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N]<br>
No Google Cloud Platform support will be enabled for TensorFlow<br>
Do you wish to build TensorFlow with Hadoop File System support? [y/N]<br>
No Hadoop File System support will be enabled for TensorFlow<br>
Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N]<br>
No XLA support will be enabled for TensorFlow<br>
Do you wish to build TensorFlow with VERBS support? [y/N]<br>
No VERBS support will be enabled for TensorFlow<br>
Do you wish to build TensorFlow with OpenCL support? [y/N]<br>
No OpenCL support will be enabled for TensorFlow<br>
Do you wish to build TensorFlow with CUDA support? [y/N]<br>
No CUDA support will be enabled for TensorFlow<br>
Warning: ignoring http_proxy in environment.<br>
...<br>
.....................<br>
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.<br>
Configuration finished</p>
<p dir="auto">Build failed with following error:</p>
<p dir="auto"><code class="notranslate">ERROR: /home/desktop/gtt/tensorflow/core/BUILD:1544:1: undeclared inclusion(s) in rule '//tensorflow/core:core_cpu_base': this rule is missing dependency declarations for the following files included by 'tensorflow/core/graph/mkl_tfconversion_pass.cc': '/home/desktop/gtt/tensorflow/core/common_runtime/function.h' '/home/desktop/gtt/tensorflow/core/common_runtime/device_mgr.h' '/home/desktop/gtt/tensorflow/core/common_runtime/optimization_registry.h' '/home/desktop/gtt/tensorflow/core/common_runtime/device_set.h'. ____Building complete. Target //tensorflow/tools/pip_package:build_pip_package failed to build Use --verbose_failures to see the command lines of failed build steps. ____Elapsed time: 615.488s, Critical Path: 227.18s</code></p>