我正在从源头构建drake,特别是Russ的分支:https://github.com/RussTedrake/drake
直到最后一条命令make -j,所有操作都没有问题。
其中我得到了以下输出:
[ 12%] Performing build step for 'drake_cxx_python'
INFO: Analyzed target //:install (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/chewchiashaoyuan/Documents/Software/drake/bindings/pydrake/BUILD.bazel:780:22: GenerateMypyStubs bindings/pydrake/pydrake/__init__.pyi failed: (Exit 1): stubgen failed: error executing command bazel-out/darwin-opt/bin/bindings/pydrake/stubgen --quiet '--package=pydrake' '--output=bazel-out/darwin-opt/bin/bindings/pydrake'
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Matplotlib created a temporary config/cache directory at /var/folders/sl/37m0k__51_3_5c5j02w201r40000gn/T/matplotlib-8mr5qkfg because the default path (/Users/chewchiashaoyuan/.matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
Critical error during semantic analysis: /usr/local/lib/python3.10/site-packages/pydrake/symbolic.pyi:203: error: invalid syntax
Target //:install failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /Users/chewchiashaoyuan/Documents/Software/drake/BUILD.bazel:63:8 Middleman _middlemen/install-runfiles failed: (Exit 1): stubgen failed: error executing command bazel-out/darwin-opt/bin/bindings/pydrake/stubgen --quiet '--package=pydrake' '--output=bazel-out/darwin-opt/bin/bindings/pydrake'
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
INFO: Elapsed time: 9.617s, Critical Path: 9.33s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
make[2]: *** [drake_cxx_python-prefix/src/drake_cxx_python-stamp/drake_cxx_python-build] Error 1
make[1]: *** [CMakeFiles/drake_cxx_python.dir/all] Error 2
make: *** [all] Error 2我的操作系统是: macOS蒙特雷12.6版
完整的make -j -d输出是这里
我引用了source.html、https://drake.mit.edu/bazel.html#snopt和https://github.com/RobotLocomotion/drake/issues/12175 --我做了以下工作:
git clone https://github.com/RussTedrake/drake
cd drake
git checkout kin_traj_opt2
./setup/mac/install_prereqs.sh
cd ..
mkdir drake-build
cd drake-build
cmake -DWITH_ROBOTLOCOMOTION_SNOPT=ON ../drake
make -j修复尝试:尝试删除整个drake目录并从头开始执行整个过程,得到相同的错误。
发布于 2022-10-28 05:27:49
错误消息中的一个文件名非常突出:/usr/local/lib/python3.10/site-packages/pydrake/symbolic.pyi。看起来您已经将sudo pip install drake安装到了一个系统范围的目录中。这很可能会干扰德雷克的源头构建,需要移除。
https://stackoverflow.com/questions/74230444
复制相似问题