secretflow/psi

bazel build //... -c opt编译报错

Closed this issue · 6 comments

报错信息:
Starting local Bazel server and connecting to it...
WARNING: Download from https://golang.org/dl/?mode=json&include=all failed: class java.io.IOException connect timed out
INFO: Repository com_github_intel_ipp instantiated at:
/home/admin/dev/psi/WORKSPACE:19:9: in
/home/admin/dev/psi/bazel/repositories.bzl:46:26: in psi_deps
/home/admin/dev/psi/bazel/repositories.bzl:130:10: in _com_github_intel_ipp
/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
Repository rule http_archive defined at:
/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in
WARNING: Download from https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730
ERROR: An error occurred during the fetch of repository 'com_github_intel_ipp':
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz] to /root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/com_github_intel_ipp/temp11243300090666680070/ippcp_2021.8.tar.gz: Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730
ERROR: /home/admin/dev/psi/WORKSPACE:19:9: fetching http_archive rule //external:com_github_intel_ipp: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz] to /root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/com_github_intel_ipp/temp11243300090666680070/ippcp_2021.8.tar.gz: Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730
INFO: Repository boost instantiated at:
/home/admin/dev/psi/WORKSPACE:59:11: in
/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/com_github_nelhage_rules_boost/boost/boost.bzl:156:10: in boost_deps
/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
Repository rule http_archive defined at:
/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in
INFO: Repository com_github_libsodium instantiated at:
/home/admin/dev/psi/WORKSPACE:28:10: in
/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/yacl/bazel/repositories.bzl:40:26: in yacl_deps
/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/yacl/bazel/repositories.bzl:280:10: in _com_github_libsodium
/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
Repository rule http_archive defined at:
/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in
ERROR: /home/admin/dev/psi/psi/cryptor/BUILD.bazel:48:15: //psi/cryptor:ipp_ecc_cryptor depends on @com_github_intel_ipp//:ipp in repository @com_github_intel_ipp which failed to fetch. no such package '@com_github_intel_ipp//': java.io.IOException: Error downloading [https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz] to /root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/com_github_intel_ipp/temp11243300090666680070/ippcp_2021.8.tar.gz: Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730
ERROR: Analysis of target '//psi/utils:recovery_test' failed; build aborted:
INFO: Elapsed time: 77.606s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (152 packages loaded, 11480 targets configured)
环境:docker 容器:secretflow/ubuntu-base-ci:latest
代码版本:v0.4.0.dev240329

不建议使用dev版本,你可以尝试用v0.4.2b0版本。

不建议使用dev版本,你可以尝试用v0.4.2b0版本。

更换版本后,仍会出现如下报错:

WARNING: Download from https://github.com/boostorg/boost/releases/download/boost-1.83.0/boost-1.83.0.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 401 Unauthorized
ERROR: An error occurred during the fetch of repository 'boost':
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/boostorg/boost/releases/download/boost-1.83.0/boost-1.83.0.tar.gz] to /root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/boost/temp1139301268959359863/boost-1.83.0.tar.gz: GET returned 401 Unauthorized
其中,boost-1.83.0.tar.gz下载的非常慢,我尝试了几次,都在中途中断了,请问老师有什么好的办法可以解决这个问题吗?

不建议使用dev版本,你可以尝试用v0.4.2b0版本。

更换版本后,仍会出现如下报错:

WARNING: Download from https://github.com/boostorg/boost/releases/download/boost-1.83.0/boost-1.83.0.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 401 Unauthorized ERROR: An error occurred during the fetch of repository 'boost': Traceback (most recent call last): File "/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl download_info = ctx.download_and_extract( Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/boostorg/boost/releases/download/boost-1.83.0/boost-1.83.0.tar.gz] to /root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/boost/temp1139301268959359863/boost-1.83.0.tar.gz: GET returned 401 Unauthorized 其中,boost-1.83.0.tar.gz下载的非常慢,我尝试了几次,都在中途中断了,请问老师有什么好的办法可以解决这个问题吗?

网络问题现在还没有很好的解决方式,只能通过重试或者更换机器的方法来解决。

不建议使用dev版本,你可以尝试用v0.4.2b0版本。

更换版本后,仍会出现如下报错:
WARNING: Download from https://github.com/boostorg/boost/releases/download/boost-1.83.0/boost-1.83.0.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 401 Unauthorized ERROR: An error occurred during the fetch of repository 'boost': Traceback (most recent call last): File "/root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl download_info = ctx.download_and_extract( Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/boostorg/boost/releases/download/boost-1.83.0/boost-1.83.0.tar.gz] to /root/.cache/bazel/_bazel_root/13daebdf0034d7b09b88f2569aaae16c/external/boost/temp1139301268959359863/boost-1.83.0.tar.gz: GET returned 401 Unauthorized 其中,boost-1.83.0.tar.gz下载的非常慢,我尝试了几次,都在中途中断了,请问老师有什么好的办法可以解决这个问题吗?

网络问题现在还没有很好的解决方式,只能通过重试或者更换机器的方法来解决。

好的,谢谢您

我使用v0.4.2b0仍然有类似的问题,但是从main拉取的代码就没这个问题,也不知道为啥。

WARNING: Download from https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730
ERROR: An error occurred during the fetch of repository 'com_github_intel_ipp':
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz] to /root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/com_github_intel_ipp/temp4387419854172070889/ippcp_2021.8.tar.gz: Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730
ERROR: /home/admin/dev/pir/psi/WORKSPACE:19:9: fetching http_archive rule //external:com_github_intel_ipp: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz] to /root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/com_github_intel_ipp/temp4387419854172070889/ippcp_2021.8.tar.gz: Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730
ERROR: /home/admin/dev/pir/psi/psi/cryptor/BUILD.bazel:45:15: //psi/cryptor:ipp_ecc_cryptor depends on @com_github_intel_ipp//:ipp in repository @com_github_intel_ipp which failed to fetch. no such package '@com_github_intel_ipp//': java.io.IOException: Error downloading [https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz] to /root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/com_github_intel_ipp/temp4387419854172070889/ippcp_2021.8.tar.gz: Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730
ERROR: Analysis of target '//psi/ecdh:ecdh_psi' failed; build aborted:
INFO: Elapsed time: 3.413s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 3 targets configured)

我使用v0.4.2b0仍然有类似的问题,但是从main拉取的代码就没这个问题,也不知道为啥。

WARNING: Download from https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730 ERROR: An error occurred during the fetch of repository 'com_github_intel_ipp': Traceback (most recent call last): File "/root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl download_info = ctx.download_and_extract( Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz] to /root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/com_github_intel_ipp/temp4387419854172070889/ippcp_2021.8.tar.gz: Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730 ERROR: /home/admin/dev/pir/psi/WORKSPACE:19:9: fetching http_archive rule //external:com_github_intel_ipp: Traceback (most recent call last): File "/root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl download_info = ctx.download_and_extract( Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz] to /root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/com_github_intel_ipp/temp4387419854172070889/ippcp_2021.8.tar.gz: Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730 ERROR: /home/admin/dev/pir/psi/psi/cryptor/BUILD.bazel:45:15: //psi/cryptor:ipp_ecc_cryptor depends on @com_github_intel_ipp//:ipp in repository @com_github_intel_ipp which failed to fetch. no such package '@com_github_intel_ipp//': java.io.IOException: Error downloading [https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.8.tar.gz] to /root/.cache/bazel/_bazel_root/1249b27fcf10dbabf7759ba5eb2db384/external/com_github_intel_ipp/temp4387419854172070889/ippcp_2021.8.tar.gz: Checksum was d70f42832337775edb022ca8ac1ac418f272e791ec147778ef7942aede414cdc but wanted 1ecfa70328221748ceb694debffa0106b92e0f9bf6a484f8e8512c2730c7d730 ERROR: Analysis of target '//psi/ecdh:ecdh_psi' failed; build aborted: INFO: Elapsed time: 3.413s INFO: 0 processes. FAILED: Build did NOT complete successfully (1 packages loaded, 3 targets configured)

看了一下,应该是repositories.bzl这个文件里com_github_intel_ipp相关的SHA256值设置的有问题,更新后就没问题了