英文:
Where can I find the generated binaries when building MediaPipe from source?
问题
我正在尝试在Ubuntu 20.04.6 LTS上使用Google Colab从源代码构建MediaPipe 0.8.5。以下是我尝试的详细步骤:
!git clone https://github.com/google/mediapipe.git
%cd mediapipe
!git checkout tags/v0.8.5
!bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1
构建命令似乎执行成功,输出日志显示成功。
但是,我注意到'bazel-bin'目录是空的。我应该在哪里找到生成的二进制文件?
我还尝试了以下命令:
!bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 //mediapipe/examples/desktop/face_detection:face_detection_cpu
出现以下错误:
An error occurred during the fetch of repository 'rules_cc': Traceback (most recent call last): File "/root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl download_info = ctx.download_and_extract( Error in download_and_extract: java.io.IOException: Error extracting /root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/rules_cc/temp9801135472723615924/master.zip to /root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/rules_cc/temp9801135472723615924: Prefix "rules_cc-master" was given, but not found in the archive.
构建失败,请检查相关依赖和配置。
英文:
I'm trying to build MediaPipe 0.8.5 from source on Ubuntu 20.04.6 LTS with Google Colab. Here are the detailed steps I tried
!git clone https://github.com/google/mediapipe.git
%cd mediapipe
!git checkout tags/v0.8.5
!bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1
The build command appeared to execute successfully, as indicated by the output logging.
However, I noticed that the 'bazel-bin' directory is empty. Where can I find the generated binaries?
I also tried
!bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 //mediapipe/examples/desktop/face_detection:face_detection_cpu
> Analyzing: target
> //mediapipe/examples/desktop/face_detection:face_detection_c\ pu (1
> packages loaded, 0 targets configured)
> currently loading: @bazel_tools//tools/cpp
> Fetching @rules_cc; fetching
> Fetching ...les_cc; Extracting /root/.cache/bazel/_bazel_root/847126637216\ ERROR: An error occurred
> during the fetch of repository 'rules_cc': Traceback (most recent
> call last): File
> "/root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/bazel_tools/tools/build_defs/repo/http.bzl",
> line 111, column 45, in _http_archive_impl download_info =
> ctx.download_and_extract( Error in download_and_extract:
> java.io.IOException: Error extracting
> /root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/rules_cc/temp9801135472723615924/master.zip
> to
> /root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/rules_cc/temp9801135472723615924:
> Prefix "rules_cc-master" was given, but not found in the archive. Here
> are possible prefixes for this archive: "rules_cc-main". Analyzing:
> target //mediapipe/examples/desktop/face_detection:face_detection_c
> pu (1 packages loaded, 0 targets configured)
> currently loading: @bazel_tools//tools/cpp
> Fetching ...les_cc; Extracting /root/.cache/bazel/_bazel_root/847126637216\ ERROR: While resolving
> toolchains for target
> //mediapipe/examples/desktop/face_detection:face_detection_cpu:
> com.google.devtools.build.lib.packages.RepositoryFetchException: no
> such package '@rules_cc//cc': java.io.IOException: Error extracting
> /root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/rules_cc/temp9801135472723615924/master.zip
> to
> /root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/rules_cc/temp9801135472723615924:
> Prefix "rules_cc-master" was given, but not found in the archive. Here
> are possible prefixes for this archive: "rules_cc-main". Analyzing:
> target //mediapipe/examples/desktop/face_detection:face_detection_c
> pu (1 packages loaded, 0 targets configured)
> currently loading: @bazel_tools//tools/cpp
> Fetching ...les_cc; Extracting /root/.cache/bazel/_bazel_root/847126637216\ ERROR: Analysis of target
> '//mediapipe/examples/desktop/face_detection:face_detection_cpu'
> failed; build aborted:
> com.google.devtools.build.lib.packages.RepositoryFetchException: no
> such package '@rules_cc//cc': java.io.IOException: Error extracting
> /root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/rules_cc/temp9801135472723615924/master.zip
> to
> /root/.cache/bazel/_bazel_root/84712663721631c6211d09ab74d72aa8/external/rules_cc/temp9801135472723615924:
> Prefix "rules_cc-master" was given, but not found in the archive. Here
> are possible prefixes for this archive: "rules_cc-main". Analyzing:
> target //mediapipe/examples/desktop/face_detection:face_detection_c
> pu (1 packages loaded, 0 targets configured)
> currently loading: @bazel_tools//tools/cpp
> Fetching ...les_cc; Extracting /root/.cache/bazel/_bazel_root/847126637216\ INFO: Elapsed time:
> 1.433s Analyzing: target //mediapipe/examples/desktop/face_detection:face_detection_c\ pu (1
> packages loaded, 0 targets configured)
> currently loading: @bazel_tools//tools/cpp
> Fetching ...les_cc; Extracting /root/.cache/bazel/_bazel_root/847126637216\ INFO: 0 processes.
> Analyzing: target
> //mediapipe/examples/desktop/face_detection:face_detection_c\ pu (1
> packages loaded, 0 targets configured)
> currently loading: @bazel_tools//tools/cpp
> Fetching ...les_cc; Extracting /root/.cache/bazel/_bazel_root/847126637216\ FAILED: Build did NOT
> complete successfully (1 packages loaded, 0 targets conf\ igured)
> currently loading: @bazel_tools//tools/cpp
> Fetching ...les_cc; Extracting /root/.cache/bazel/_bazel_root/847126637216\ FAILED: Build did NOT
> complete successfully (1 packages loaded, 0 targets conf\ igured)
> currently loading: @bazel_tools//tools/cpp
> Fetching ...les_cc; Extracting /root/.cache/bazel/_bazel_root/847126637216
> 31c6211d09ab74d72aa8/external/rules_cc/temp9801135472723615924/master.zip
答案1
得分: 1
你没有为Bazel提供任何要构建的目标,因此它成功地未构建任何内容。尝试构建一个示例:bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 //mediapipe/examples/desktop/face_detection:face_detection_cpu
。
英文:
You did not provide any target for Bazel to build, and therefore it successfully built nothing. Try building an example: bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 //mediapipe/examples/desktop/face_detection:face_detection_cpu
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论