首页 > 解决方案 > 使用 Bazel 构建 Drake_last_sha_with_original_matlab Atlas 时出现问题

问题描述

我一直在尝试在 Ubuntu 20.04 上使用 Bazel 从源代码构建 Drake 项目,但是运行时出现以下错误

bazel build :install

从 Atlas 根目录:

dmitriy@dmitriy-Lenovo-ideapad-310-15ISK:~/git/drake2/drake-last_sha_with_original_matlab/drake/examples/Atlas$ bazel build :models
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/home/dmitriy/git/drake2/drake-last_sha_with_original_matlab/tools/bazel.rc
ERROR: Traceback (most recent call last):
    File "/home/dmitriy/git/drake2/drake-last_sha_with_original_matlab/tools/third_party/kythe/tools/build_rules/config/pkg_config.bzl", line 176, column 42, in <toplevel>
        "build_file_template": attr.label(
Error in label: label() got unexpected keyword argument 'single_file'
ERROR: error loading package '': Extension file 'tools/third_party/kythe/tools/build_rules/config/pkg_config.bzl' has errors
INFO: Elapsed time: 0.119s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

标签: bazeldrake

解决方案


last_sha_with_original_matlab 分支已有 7 年以上的历史。你确定这是你想尝试运行的吗?大多数人不需要使用它。它仅对运行当时发表的论文中的示例有用。

https://drake.mit.edu/release_notes/older_releases.html是与此相关的文档。

它几乎肯定不会在 Ubuntu 20.04 上运行。您需要使用与 7 岁以上同时代的虚拟机,因此可能是 Ubuntu 14.04。

我还建议只使用二进制文件https://github.com/RobotLocomotion/drake/releases/tag/v0.9.11而不是重建它。


推荐阅读