Tulsi编译失败
Xcode12.4, bazel 4.0@brew
20210218 tulsi最新
解决办法:跑了/usr/local/Cellar/python@2/
将这个目录去掉或者改名字为不可用,然后系统默认跑了python3就好了
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File “/usr/local/Cellar/python@2/2.7.15_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 147, in
globals()[__func_name] = __get_hash(__func_name)
File “/usr/local/Cellar/python@2/2.7.15_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ’ + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
File “/private/var/tmp/_bazel_root/404dba2c540961784bf5cbf2eab299bc/sandbox/darwin-sandbox/40/execroot/main/bazel-out/host/bin/external/build_bazel_rules_apple/tools/bundletool/bundletool.runfiles/build_bazel_rules_apple/tools/bundletool/bundletool.py”, line 237, in
_main(sys.argv[1])
File “/private/var/tmp/_bazel_root/404dba2c540961784bf5cbf2eab299bc/sandbox/darwin-sandbox/40/execroot/main/bazel-out/host/bin/external/build_bazel_rules_apple/tools/bundletool/bundletool.runfiles/build_bazel_rules_apple/tools/bundletool/bundletool.py”, line 225, in _main
bundler.run()
File “/private/var/tmp/_bazel_root/404dba2c540961784bf5cbf2eab299bc/sandbox/darwin-sandbox/40/execroot/main/bazel-out/host/bin/external/build_bazel_rules_apple/tools/bundletool/bundletool.runfiles/build_bazel_rules_apple/tools/bundletool/bundletool.py”, line 117, in run
f.get(‘contents_only’, False), out_zip)
File “/private/var/tmp/_bazel_root/404dba2c540961784bf5cbf2eab299bc/sandbox/darwin-sandbox/40/execroot/main/bazel-out/host/bin/external/build_bazel_rules_apple/tools/bundletool/bundletool.runfiles/build_bazel_rules_apple/tools/bundletool/bundletool.py”, line 154, in _add_files
self._write_entry(dest, f.read(), fexec, out_zip)
File “/private/var/tmp/_bazel_root/404dba2c540961784bf5cbf2eab299bc/sandbox/darwin-sandbox/40/execroot/main/bazel-out/host/bin/external/build_bazel_rules_apple/tools/bundletool/bundletool.runfiles/build_bazel_rules_apple/tools/bundletool/bundletool.py”, line 193, in _write_entry
new_hash = hashlib.md5(data).digest()
AttributeError: ‘module’ object has no attribute ‘md5’
Note: The failure of target @build_bazel_rules_apple//tools/bundletool:bundletool (with exit code 1) may have been caused by the fact that it is running under Python 2 instead of Python 3. Examine the error to determine if that appears to be the problem. Since this target is built in the host configuration, the only way to change its version is to set --host_force_python=PY3, which affects the entire build.
If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See https://github.com/bazelbuild/bazel/issues/7899 for more information.
Target //:tulsi failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 106.563s, Critical Path: 69.54s
INFO: 90 processes: 51 internal, 26 darwin-sandbox, 13 local.
FAILED: Build did NOT complete successfully