如何解决在 Ubuntu VM 上构建 Drake
我一直在尝试在运行 Ubuntu 18.04.5 的虚拟机上安装 Drake。不幸的是,二进制安装和源代码安装都不起作用。在源码安装的情况下,运行<button type="button" onclick="addNewName()">Add Name</button>
<div id="newNames"></div>
$("#newForm").validate({
rules: {
'name[]': {
required: true
}
},messages: {
'answer[]': "Please enter value"
},submitHandler: function(form) {
console.log("successs");
}
});
function addNewName() {
const addName = '<input type="text" name="answer[]">'
$('#newNames').append(`${addName}`);
}
(和bazel build //...
)脚本后,出现以下错误:
install_prereqs
我认为通过像在 this thread 中那样安装 username@ubuntu:~/code/drake$ bazel build //...
INFO: Analyzed 7909 targets (0 packages loaded,0 targets configured).
INFO: Found 7909 targets...
ERROR: /home/username/code/drake/multibody/plant/BUILD.bazel:56:17: C++ compilation of rule '//multibody/plant:multibody_plant_core' Failed (Exit 4): gcc Failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 309 argument(s) skipped)
Use --sandBox_debug to see verbose messages from the sandBox gcc Failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 309 argument(s) skipped)
Use --sandBox_debug to see verbose messages from the sandBox
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
INFO: Elapsed time: 131.608s,Critical Path: 109.56s
INFO: 81 processes: 56 internal,25 linux-sandBox.
Failed: Build did NOT complete successfully
可以解决问题。我跟着 this guide 安装了多个版本 og gcc 8
,设置为 8,这样做后得到这个错误:
gcc
如果此信息有帮助,我在我的主机上安装了 Mac 二进制文件,它们似乎可以正常运行。
任何帮助将不胜感激!
解决方法
这不是 GCC 8 问题(您应该撤消 GCC 8 安装更改)。
错误信息“gcc: internal compiler error: Killed (program cc1plus)”表示编译器崩溃了。最有可能的原因是它的内存 (RAM) 不足。
如果构建使用多个内核进行编译,那么以较少的并发进行编译应该会有所帮助。也许试试bazel build //... -j 1
。如果有帮助,您可以通过 https://docs.bazel.build/versions/master/guide.html#bazelrc-the-bazel-configuration-file 将其放入点文件中,以便在该机器上构建作业时始终受到限制。
但是,如果一次只编译一个文件并且您仍然运行内存,那么您可能需要增加虚拟机的内存分配。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。