tensorflow: Error about repository 'mkl_dnn' occurred during the process of building Tensorflow from source
System information
- OS Platform and Distribution: Linux Ubuntu 18.04 LTS
- TensorFlow installed from (source or binary): source
- Python version: 3.6.9
- Installed using virtualenv? pip? conda?: no
- Bazel version (if compiling from source): 2.0.0
- GCC/Compiler version (if compiling from source): 7.5.0
- CUDA/cuDNN version: n/a
- GPU model and memory: n/a
- CPU model: AMD Opteron 4122
Describe the problem The following problems occurred when using bazel to build Tensorflow:
ERROR: An error occurred during the fetch of repository ‘mkl_dnn’: java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz, https://github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz] to /root/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/mkl_dnn/v0.21.3.tar.gz: Checksum was a0211aeb5e7dad50b97fa5dffc1a2fe2fe732572d4164e1ee8750a2ede43fbec but wanted 31e78581e59d7e60d4becaba3834fc6a5bf2dccdae3e16b7f70d89ceab38423f
ERROR: /root/tensorflow/tensorflow/core/kernels/BUILD:799:1: //tensorflow/core/kernels:eigen_contraction_kernel_with_mkl depends on @mkl_dnn//:mkldnn_single_threaded in repository @mkl_dnn which failed to fetch. no such package ‘@mkl_dnn//’: java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz, https://github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz] to /root/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/mkl_dnn/v0.21.3.tar.gz: Checksum was a0211aeb5e7dad50b97fa5dffc1a2fe2fe732572d4164e1ee8750a2ede43fbec but wanted 31e78581e59d7e60d4becaba3834fc6a5bf2dccdae3e16b7f70d89ceab38423f
ERROR: Analysis of target ‘//tensorflow/tools/pip_package:build_pip_package’ failed; build aborted: no such package ‘@mkl_dnn//’: java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz, https://github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz] to /root/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/mkl_dnn/v0.21.3.tar.gz: Checksum was a0211aeb5e7dad50b97fa5dffc1a2fe2fe732572d4164e1ee8750a2ede43fbec but wanted 31e78581e59d7e60d4becaba3834fc6a5bf2dccdae3e16b7f70d89ceab38423f
Provide the exact sequence of commands / steps that you executed before running into the problem
bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
Any other info / logs
INFO: Options provided by the client: Inherited ‘common’ options: --isatty=1 --terminal_columns=241
INFO: Reading rc options for ‘build’ from /root/tensorflow/.bazelrc: Inherited ‘common’ options: --experimental_repo_remote_exec
INFO: Reading rc options for ‘build’ from /root/tensorflow/.bazelrc: ‘build’ options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --java_toolchain=//third_party/toolchains/java:tf_java_toolchain --host_java_toolchain=//third_party/toolchains/java:tf_java_toolchain --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --noincompatible_prohibit_aapt1 --enable_platform_specific_config --config=v2
INFO: Reading rc options for ‘build’ from /root/tensorflow/.tf_configure.bazelrc: ‘build’ options: --action_env PYTHON_BIN_PATH=/usr/bin/python3 --action_env PYTHON_LIB_PATH=/usr/lib/python3/dist-packages --python_path=/usr/bin/python3 --config=xla --action_env TF_CONFIGURE_IOS=0
INFO: Found applicable config definition build:v2 in file /root/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:xla in file /root/tensorflow/.bazelrc: --action_env=TF_ENABLE_XLA=1 --define=with_xla_support=true
INFO: Found applicable config definition build:linux in file /root/tensorflow/.bazelrc: --copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 --config=dynamic_kernels
INFO: Found applicable config definition build:dynamic_kernels in file /root/tensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz failed: class java.io.IOException connect timed out
WARNING: Download from https://github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException Checksum was a0211aeb5e7dad50b97fa5dffc1a2fe2fe732572d4164e1ee8750a2ede43fbec but wanted 31e78581e59d7e60d4becaba3834fc6a5bf2dccdae3e16b7f70d89ceab38423f
ERROR: An error occurred during the fetch of repository ‘mkl_dnn’: java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz, https://github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz] to /root/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/mkl_dnn/v0.21.3.tar.gz: Checksum was a0211aeb5e7dad50b97fa5dffc1a2fe2fe732572d4164e1ee8750a2ede43fbec but wanted 31e78581e59d7e60d4becaba3834fc6a5bf2dccdae3e16b7f70d89ceab38423f
INFO: Call stack for the definition of repository ‘icu’ which is a third_party_http_archive (rule definition at /root/tensorflow/third_party/repo.bzl:219:28): - /root/tensorflow/third_party/icu/workspace.bzl:11:5 - /root/tensorflow/tensorflow/workspace.bzl:59:5 - /root/tensorflow/tensorflow/workspace.bzl:103:5 - /root/tensorflow/WORKSPACE:19:1
INFO: Call stack for the definition of repository ‘llvm-project’ which is a tf_http_archive (rule definition at /root/tensorflow/third_party/repo.bzl:134:19): - /root/tensorflow/tensorflow/workspace.bzl:600:5 - /root/tensorflow/WORKSPACE:19:1
INFO: Call stack for the definition of repository ‘functools32_archive’ which is a tf_http_archive (rule definition at /root/tensorflow/third_party/repo.bzl:134:19): - /root/tensorflow/tensorflow/workspace.bzl:378:5 - /root/tensorflow/WORKSPACE:19:1
ERROR: /root/tensorflow/tensorflow/core/kernels/BUILD:799:1: //tensorflow/core/kernels:eigen_contraction_kernel_with_mkl depends on @mkl_dnn//:mkldnn_single_threaded in repository @mkl_dnn which failed to fetch. no such package ‘@mkl_dnn//’: java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz, https://github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz] to /root/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/mkl_dnn/v0.21.3.tar.gz: Checksum was a0211aeb5e7dad50b97fa5dffc1a2fe2fe732572d4164e1ee8750a2ede43fbec but wanted 31e78581e59d7e60d4becaba3834fc6a5bf2dccdae3e16b7f70d89ceab38423f
ERROR: Analysis of target ‘//tensorflow/tools/pip_package:build_pip_package’ failed; build aborted: no such package ‘@mkl_dnn//’: java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz, https://github.com/intel/mkl-dnn/archive/v0.21.3.tar.gz] to /root/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/mkl_dnn/v0.21.3.tar.gz: Checksum was a0211aeb5e7dad50b97fa5dffc1a2fe2fe732572d4164e1ee8750a2ede43fbec but wanted 31e78581e59d7e60d4becaba3834fc6a5bf2dccdae3e16b7f70d89ceab38423f
INFO: Elapsed time: 102.424s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (312 packages loaded, 10125 targets configured)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (1 by maintainers)
@MRinel vim tensorflow/workspace.bzl modify the line: strip_prefix = “mkl-dnn-0.20.3” to strip_prefix = “oneDNN-0.20.3”
source version is r1.15
Errros are related to dead links and illegal sha256 sum. It should be fairly easy to reproduce. just git checkout r1.15 and follow standard compile procedure on https://www.tensorflow.org/install/source.
I managed to compile tf after these changes
thw@thw-s5:~/code/tf-gitee/tensorflow$ git diff
It compiles with this build command. config=noXXXX must be included otherwise there will be more dead links.
Same problem, have you solved?
ERROR: /home1/marong/tensorflow/tensorflow/core/kernels/BUILD:761:1: no such package '@mkl_dnn//': java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/github.com/intel/mkl-dnn/archive/v0.20.6.tar.gz, https://github.com/intel/mkl-dnn/archive/v0.20.6.tar.gz] to /home1/marong/.cache/bazel/_bazel_marong/76b40f17b3be2ddbb9aa8139c2f8684b/external/mkl_dnn/v0.20.6.tar.gz: Checksum was f1de676fddeb94132c5ae480fb03a64f03deda10b09b3141373f2b2fe5cd031d but wanted 74675e93eef339ff3d9a9be95c15d0c7ad8736a5356c23428ab2e33dcdb8e3e1 and referenced by '//tensorflow/core/kernels:eigen_contraction_kernel_with_mkl'I try to modify sha checksum by the correct one(f1de67…) in
tensorflow/workspace.bzl, but another error occurs :tensorflow/tensorflow/core/kernels/BUILD:761:1: no such package '@mkl_dnn//': java.io.IOException: Error extracting /home1/marong/.cache/bazel/_bazel_marong/76b40f17b3be2ddbb9aa8139c2f8684b/external/mkl_dnn/v0.20.6.tar.gz to /home1/marong/.cache/bazel/_bazel_marong/76b40f17b3be2ddbb9aa8139c2f8684b/external/mkl_dnn: Prefix "mkl-dnn-0.20.6" was given, but not found in the archive. Here are possible prefixes for this archive: "oneDNN-0.20.6". and referenced by '//tensorflow/core/kernels:eigen_contraction_kernel_with_mkl'I think the
possible prefix "oneDNN-0.20.6"is not correct, but I have no idea to deal with the error. Any advice would be greatly appreciated.