\n\nTensorflow C++ naive build -

vhmi4jdf  于 6个月前  发布在  其他
关注(0)|答案(9)|浏览(59)
  • Please make sure that this is a build/installation issue. As per our GitHub Policy , we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template*
    System information
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: no
  • TensorFlow installed from (source or binary): source
  • TensorFlow version: 2.0 (also tried versions up to to 2.7)
  • Python version: 3.9.8
  • Installed using virtualenv? pip? conda?:
  • Bazel version (if compiling from source): 3.7.2
  • GCC/Compiler version (if compiling from source): gcc 10.2
  • CUDA/cuDNN version: 11.5/8.0
  • GPU model and memory: NVidia Geforce 940MX
    Describe the problem

An error occurred during the fetch of repository 'com_google_protobuf':

Provide the exact sequence of commands / steps that you executed before running into the problem

git clone https://github.com/tensorflow/tensorflow.git .
git checkout r2.0
bazel clean
configure
bazel build tensorflow:tensorflow_cc

Any other info / logs

F:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\tensorflow\tf>bazel build tensorflow:tensorflow_cc
INFO: Reading 'startup' options from c:\users\seth a quarshie.bazelrc: --output_user_root=F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/dl-tool/bazel/.bazel
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=126
INFO: Options provided by the client:
'build' options: --python_path=F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/dl-tool/python/python.exe
INFO: Reading rc options for 'build' from f:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\tensorflow\tf.bazelrc:
'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --copt=-w --config=v2
INFO: Found applicable config definition build:v2 in file f:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\tensorflow\tf.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Repository com_google_protobuf instantiated at:
F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/WORKSPACE:19:16: in
F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/tensorflow/workspace.bzl:432:20: in tf_repositories
Repository rule tf_http_archive defined at:
F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/third_party/repo.bzl:124:34: in
INFO: Repository 'com_google_protobuf' used the following cache hits instead of downloading the corresponding file.

If the definition of 'com_google_protobuf' was updated, verify that the hashes were also updated.
ERROR: An error occurred during the fetch of repository 'com_google_protobuf':
Traceback (most recent call last):
File "F:/workdir/units/unit_1_asa/ai/project/c++/ml
错误:跳过 'tensorflow:tensorflow_cc':没有这样的包 '@com_google_protobuf//':非零返回代码(256)在执行 'F:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\dl-tool\msys2\msys64\usr\bin -l -c "patch" "-p1" "-d" "F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/dl-tool/bazel/.bazel/6iwvpnw5/external/com_google_protobuf" "-i" "F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/third_party/protobuf/protobuf.patch"':
标准输出:
标准错误:java.io.IOException: 错误:src/main/native/windows/process.cc(202): CreateProcessW("F:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\dl-tool\msys2\msys64\usr\bin" -l -c ""patch" "-p1" "-d" "F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/dl-tool/bazel/.bazel/6iwvpnw5/external/com_google_protobuf" "-i" "F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/third_party/protobuf/protobuf.patch""):访问被拒绝。
(错误:5)
警告:目标模式解析失败。
错误:没有这样的包 '@com_google_protobuf//':非零返回代码(256)在执行 'F:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\dl-tool\msys2\msys64\usr\bin -l -c "patch" "-p1" "-d" "F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/dl-tool/bazel/.bazel/6iwvpnw5/external/com_google_protobuf" "-i" "F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/third_party/protobuf/protobuf.patch"':
标准输出:
标准错误:java.io.IOException: 错误:src/main/native/windows/process.cc(202): CreateProcessW("F:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\dl-tool\msys2\msys64\usr\bin" -l -c ""patch" "-p1" "-d" "F:/workdir/units/unit_1_asa

uidvcgyl

uidvcgyl1#

@dzorwulu,

请查看这个链接 123,它们有类似的错误。这会有所帮助。谢谢!

l3zydbqr

l3zydbqr2#

谢谢,但所建议的问题的解决方案都没有奏效。请提出其他解决措施。

ybzsozfc

ybzsozfc3#

如何解决与此问题相关的以下下载404消息:
警告:从 https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/43d6991c2a4cc2ac374e68c029634f2b59ffdfdf.tar.gz 下载失败:类 com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET 返回 404 Not Found
警告:从 http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/64c92c8013b557087351c91b5423b6046d10f206.tar.gz 下载失败:类 com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET 返回 404 Not Found
curl 也产生相同的错误:
curl https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/43d6991c2a4cc2ac374e68c029634f2b59ffdfdf.tar.gz
NoSuchKey 指定的密钥不存在。没有这样的对象:mirror.tensorflow.org/github.com/llvm/llvm-project/archive/43d6991c2a4cc2ac374e68c029634f2b59ffdfdf.tar.gz

vvppvyoh

vvppvyoh4#

你好!@dzorwulu !你能尝试在 TensorFlow 2.9 和 Bazel 5.0.0 上运行以下命令,并告诉我们结果吗?谢谢!

$bazel build -c opt --config=monolithic //tensorflow:libtensorflow_cc.so$

3mpgtkmj

3mpgtkmj5#

这个问题已经被自动标记为过时,因为它没有最近的活动。如果没有进一步的活动发生,它将被关闭。谢谢。

nuypyhwy

nuypyhwy6#

关闭为陈旧状态。如果您想进一步处理此问题,请重新打开。

yqhsw0fo

yqhsw0fo7#

你对你的问题的解决是否满意?

2o7dmzc5

2o7dmzc58#

你好,管家-
建议的构建没有成功。LLVM包问题再次出现。这些文件的密钥是否错误?请查看附件中的日志文件。

js5cn81o

js5cn81o9#

F:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\tensorflow\tf>git clone [https://github.com/tensorflow/tensorflow.git](https://github.com/tensorflow/tensorflow.git) .
Cloning into '.'...
 remote: Enumerating objects: 1379309, done.
 remote: Counting objects: 100% (513/513), done.
 remote: Compressing objects: 100% (299/299), done.
 remote: Total 1379309 (delta 253), reused 420 (delta 211), pack-reused 1378796
 Receiving objects: 100% (1379309/1379309), 900.37 MiB | 17.99 MiB/s, done.
 Resolving deltas: 100% (1120606/1120606), done.
 Updating files: 100% (26806/26806), done.
// checkout r2.9 --------------------------------------
F:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\tensorflow\tf>git checkout r2.9
 Updating files: 100% (8436/8436), done.
 Switched to a new branch 'r2.9'
 Branch 'r2.9' set up to track remote branch 'r2.9' from 'origin'.
// build -----------------------------------------------
F:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\tensorflow\tf>bazel build -c opt --config=monolithic //tensorflow:libtensorflow_cc.so
 Starting local Bazel server and connecting to it...
 WARNING: The following configs were expanded more than once: [monolithic]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
 INFO: Reading 'startup' options from c:\users\seth a quarshie.bazelrc: --output_user_root=F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/dl-tool/bazel/.
 INFO: Options provided by the client:
 Inherited 'common' options: --isatty=1 --terminal_columns=174
 INFO: Reading rc options for 'build' from f:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\tensorflow\tf.bazelrc:
 Inherited 'common' options: --experimental_repo_remote_exec
 INFO: Options provided by the client:
 'build' options: --python_path=F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/dl-tool/python/python.exe
 INFO: Reading rc options for 'build' from f:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\tensorflow\tf.bazelrc:
 'build' options: --define framework_shared_object=true --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 --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/jit/python_tests,tensorflow/compiler/mlir/tfrt/jit/tests,tensorflow/compiler/mlir/tfrt/jit/tests/ir,tensorflow/compiler/mlir/tfrt/jit/tests/analysis,tensorflow/compiler/mlir/tfrt/jit/tests/jit,tensorflow/compiler/mlir/tfrt/jit/tests/lhlo_to_tfrt,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core
无法翻译,因为这是一段计算机程序的输出日志,没有实际意义。
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
加载:0个包已加载
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
这是一段关于Bazel构建工具加载和提取外部库的日志。在这段时间内,Bazel尝试从不同的时间点获取并提取名为`com_google_googleapis`的外部库,但始终未能成功。
这是一段计算机程序在下载和提取文件的过程,使用的是Bazel构建工具。
从上述输出来看,这是一个关于构建TensorFlow项目的过程。在这个过程中,Bazel工具用于下载和解析依赖项。然而,在下载过程中遇到了一个问题,即从"[https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e.tar.gz](https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e.tar.gz)"下载失败,返回了404 Not Found错误。这可能是由于网络问题或者该地址的资源不存在导致的。
这是一个关于TensorFlow的分析过程,共加载了35个包,配置了13个目标。
Analyzing: target //tensorflow:libtensorflow_cc.so (79 packages loaded, 309 targets configured)
 Analyzing: target //tensorflow:libtensorflow_cc.so (85 packages loaded, 348 targets configured)
 Analyzing: target //tensorflow:libtensorflow_cc.so (98 packages loaded, 353 targets configured)
 currently loading: tensorflow/compiler/mlir/tensorflow ... (4 packages)
 Fetching @com_google_absl; fetching
 Analyzing: target //tensorflow:libtensorflow_cc.so (101 packages loaded, 419 targets configured)
 Analyzing: target //tensorflow:libtensorflow_cc.so (104 packages loaded, 431 targets configured)
 Analyzing: target //tensorflow:libtensorflow_cc.so (104 packages loaded, 431 targets configured)
 currently loading: tensorflow/compiler/mlir/tensorflow ... (2 packages)
 Analyzing: target //tensorflow:libtensorflow_cc.so (104 packages loaded, 431 targets configured)
 currently loading: tensorflow/compiler/mlir/tensorflow ... (2 packages)
 Analyzing: target //tensorflow:libtensorflow_cc.so (104 packages loaded, 431 targets configured)
 currently loading: tensorflow/compiler/mlir/tensorflow ... (2 packages)
 Fetching @com_google_absl; fetching
 INFO: Repository llvm-project instantiated at:
 F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/WORKSPACE:15:14: in 
 F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/tensorflow/workspace2.bzl:880:21: in workspace
 F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/tensorflow/workspace2.bzl:519:15: in _tf_repositories
 F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/tensorflow/tf/third_party/llvm/setup.bzl:22:19: in llvm_setup
 Repository rule llvm_configure defined at:
 F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software/dl-tool/bazel/.bazel/6iwvpnw5/external/llvm-raw/utils/bazel/configure.bzl:83:33: in 
 Analyzing: target //tensorflow:libtensorflow_cc.so (104 packages loaded, 431 targets configured)
 currently loading: tensorflow/compiler/mlir/tensorflow ... (2 packages)
 Fetching @com_google_absl; fetching
 ERROR: An error occurred during the fetch of repository 'llvm-project':
 Traceback (most recent call last):
 File "F:/workdir/units/unit_1_asa/ai/project/c++/ml/dl/software//dl-tool//python//python.exe" F:\workdir\units\unit_1_asa\ai\project\c++\ml\dl\software\dl-tool\bazel\.bazel\6iwvpnw5\external\llvm-raw\utils\bazel\configure.bzl, line 73, column 25, in _llvm_configure_impl
 _overlay_directories(repository_ctx)
 File "F:/workdir/units/unit_1_asa/ai
执行失败:符号链接权限不足。
F:workdirunits\unit_1_asa\ai\project\c++ml\dl\software\tensorflow\tf>

相关问题