secretflow / spu

SPU (Secure Processing Unit) aims to be a provable, measurable secure computation device, which provides computation ability while keeping your private data protected.
https://www.secretflow.org.cn/docs/spu/en/
Apache License 2.0
241 stars 104 forks source link

bazel build pir 失败: bazel build //examples/cpp/pir:generate_pir_data -c opt #186

Closed dage0127 closed 1 year ago

dage0127 commented 1 year ago

Issue Type

Build/Install

Modules Involved

SPU compiler, PIR

Have you reproduced the bug with SPU HEAD?

Yes

Installation Kind

source

SPU Version

0.3.2b12

OS Platform and Distribution

Ubuntu 18.04

Python Version

3.8

Compiler Version

gcc 7.5.0

Current Behavior?

编译失败: bazel build //examples/cpp/pir:generate_pir_data -c opt 详情参考下面Log

Standalone code to reproduce the issue

编译失败:
bazel build //examples/cpp/pir:generate_pir_data -c opt
详情参考下面Log

Relevant log output

(sfhost) deepl@ht-PowerEdge-R740:~/spu$ bazel build //examples/cpp/pir:generate_pir_data -c opt DEBUG: Rule 'yacl' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1682254325 +0800" DEBUG: Repository yacl instantiated at: /home/haitaiwork/deepl/spu/WORKSPACE:19:9: in /home/haitaiwork/deepl/spu/bazel/repositories.bzl:45:10: in spu_deps /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe Repository rule git_repository defined at: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'tf_runtime' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'llvm-raw' because it already exists. WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/ed372d194f938b750855ad1297517d26f1102250.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/0aaa6e679847a4eeb407136e7b0bcef93ec652e6.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_grpc_grpc' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'zlib' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'rules_python' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'upb' because it already exists. WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found DEBUG: Rule 'org_interconnection' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1669271462 +0800" DEBUG: Repository org_interconnection instantiated at: /home/haitaiwork/deepl/spu/WORKSPACE:28:10: in /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/yacl/bazel/repositories.bzl:59:10: in yacl_deps /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe Repository rule git_repository defined at: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in INFO: Analyzed target //examples/cpp/pir:generate_pir_data (3 packages loaded, 2366 targets configured). INFO: Found 1 target... ERROR: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/zlib/BUILD.bazel:24:20: Foreign Cc - CMake: Building zlib failed: (Exit 1): bash failed: error executing command /bin/bash -c bazel-out/k8-opt/bin/external/zlib/zlib_foreign_cc/wrapper_build_script.sh

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging rules_foreign_cc: Build failed! rules_foreign_cc: Keeping temp build directory and dependencies directory for debug. rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag. rules_foreigncc: Printing build logs: ____ BEGIN BUILD LOGS _____

Bazel external C/C++ Rules. Building library zlib

Environment:__ LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/local/openmpi/lib/ EXT_BUILD_ROOT=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/6/execroot/spulib INSTALLDIR=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/6/execroot/spulib/bazel-out/k8-opt/bin/external/zlib/zlib PWD=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/6/execroot/spulib BUILD_TMPDIR=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/6/execroot/spulib/bazel-out/k8-opt/bin/external/zlib/zlib.build_tmpdir TMPDIR=/tmp EXT_BUILD_DEPS=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/6/execroot/spulib/bazel-out/k8-opt/bin/external/zlib/zlib.ext_build_deps SHLVL=3 BUILD_LOG=bazel-out/k8-opt/bin/external/zlib/zlib_foreign_cc/CMake.log BUILD_SCRIPT=bazel-out/k8-opt/bin/external/zlib/zlib_foreign_cc/build_script.sh BUILD_WRAPPER_SCRIPT=bazel-out/k8-opt/bin/external/zlib/zlib_foreign_cc/wrapper_build_script.sh PATH=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/6/execroot/spulib:/home/haitaiwork/deepl/bin:/home/haitaiwork/deepl/anaconda3/envs/sfhost/bin:/home/haitaiwork/deepl/anaconda3/condabin:/root/ll/bin:/home/haitaiwork/deepl/anaconda3/bin:/home/haoxh/apache-jmeter-5.4/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/jre/bin:/home/haitaiwork/data/projects/fate/common/spark/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/haitaiwork/data/projects/fate/common/hadoop/bin:/home/haitaiwork/data/projects/fate/common/hadoop/sbin:/usr/local/openmpi/bin:/usr/local/rabbitmq/rabbitmqserver-3.8.1/sbin:/home/haitaiwork/deepl/download/neo4j-community-4.2.18/bin =/usr/bin/env


CMake Error at CMakeLists.txt:4 (project): Running

'ninja' '--version'

failed with:

Permission denied

-- Configuring incomplete, errors occurred! END BUILD LOGS rules_foreign_cc: Build wrapper script location: bazel-out/k8-opt/bin/external/zlib/zlib_foreign_cc/wrapper_build_script.sh rules_foreign_cc: Build script location: bazel-out/k8-opt/bin/external/zlib/zlib_foreign_cc/build_script.sh rules_foreign_cc: Build log location: bazel-out/k8-opt/bin/external/zlib/zlib_foreign_cc/CMake.log

Target //examples/cpp/pir:generate_pir_data failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: /home/haitaiwork/deepl/spu/libspu/core/BUILD.bazel:19:15 Middleman _middlemen/_S_Slibspu_Score_Ccore-BazelCppSemantics_build_arch_k8-opt failed: (Exit 1): bash failed: error executing command /bin/bash -c bazel-out/k8-opt/bin/external/zlib/zlib_foreign_cc/wrapper_build_script.sh

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging INFO: Elapsed time: 12.026s, Critical Path: 0.45s INFO: 96 processes: 91 internal, 5 linux-sandbox. FAILED: Build did NOT complete successfully

anakinxc commented 1 year ago

Error downloading [https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz]

麻烦检查一下网络连接

dage0127 commented 1 year ago

谢谢及时支持。更新之后出现新的错误: (sfhost) deepl@ht-PowerEdge-R740:~/spu$ bazel build //examples/cpp/pir:generate_pir_data -c opt DEBUG: Rule 'yacl' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1682254325 +0800" DEBUG: Repository yacl instantiated at: /home/haitaiwork/deepl/spu/WORKSPACE:19:9: in /home/haitaiwork/deepl/spu/bazel/repositories.bzl:45:10: in spu_deps /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe Repository rule git_repository defined at: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'tf_runtime' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'llvm-raw' because it already exists. WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/ed372d194f938b750855ad1297517d26f1102250.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/0aaa6e679847a4eeb407136e7b0bcef93ec652e6.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_grpc_grpc' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'zlib' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'rules_python' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'upb' because it already exists. WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found DEBUG: Rule 'org_interconnection' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1669271462 +0800" DEBUG: Repository org_interconnection instantiated at: /home/haitaiwork/deepl/spu/WORKSPACE:28:10: in /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/yacl/bazel/repositories.bzl:59:10: in yacl_deps /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe Repository rule git_repository defined at: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in INFO: Analyzed target //examples/cpp/pir:generate_pir_data (0 packages loaded, 0 targets configured). INFO: Found 1 target... INFO: From Compiling llvm/lib/Support/VirtualFileSystem.cpp: external/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp: In member function 'std::unique_ptr llvm::vfs::RedirectingFileSystemParser::parseEntry(llvm::yaml::Node, llvm::vfs::RedirectingFileSystem, bool)': external/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp:1961:5: warning: 'Kind' may be used uninitialized in this function [-Wmaybe-uninitialized] switch (Kind) { ^~ INFO: From Compiling llvm/lib/Support/UnicodeCaseFold.cpp: external/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp:8:1: warning: multi-line comment [-Wcomment] // utils/unicode-case-fold.py \ ^ INFO: From Compiling llvm/lib/Support/RISCVISAInfo.cpp: external/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp: In member function 'void llvm::RISCVISAInfo::updateMaxELen()': external/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp:1092:16: warning: 'ZveELen' may be used uninitialized in this function [-Wmaybe-uninitialized] unsigned ZveELen; ^~~ INFO: From Compiling llvm/lib/Support/APFloat.cpp: external/llvm-project/llvm/lib/Support/APFloat.cpp: In member function 'llvm::Expected llvm::detail::IEEEFloat::convertFromDecimalString(llvm::StringRef, llvm::APFloatBase::roundingMode)': external/llvm-project/llvm/lib/Support/APFloat.cpp:3091:38: warning: 'D.llvm::decimalInfo::exponent' may be used uninitialized in this function [-Wmaybe-uninitialized] fs = roundSignificandWithExponent(decSignificand, partCount,

                                       D.exponent, rounding_mode);

external/llvm-project/llvm/lib/Support/APFloat.cpp:3027:36: warning: 'D.llvm::decimalInfo::normalizedExponent' may be used uninitialized in this function [-Wmaybe-uninitialized] (D.normalizedExponent + 1) * 28738 <=

external/llvm-project/llvm/lib/Support/APFloat.cpp:3088:16: warning: 'D.llvm::decimalInfo::lastSigDigit' may be used uninitialized in this function [-Wmaybe-uninitialized]
     } while (p <= D.lastSigDigit);
              ~~^~~~~~~~~~~~~~~~~
external/llvm-project/llvm/lib/Support/APFloat.cpp:3047:58: warning: 'D.llvm::decimalInfo::firstSigDigit' may be used uninitialized in this function [-Wmaybe-uninitialized]
     partCount = static_cast<unsigned int>(D.lastSigDigit - D.firstSigDigit) + 1;
                                           ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
INFO: From Compiling llvm/lib/Support/YAMLParser.cpp:
external/llvm-project/llvm/lib/Support/YAMLParser.cpp: In member function 'bool llvm::yaml::Scanner::findBlockScalarIndent(unsigned int&, unsigned int, unsigned int&, bool&)':
external/llvm-project/llvm/lib/Support/YAMLParser.cpp:1637:17: warning: 'LongestAllSpaceLine' may be used uninitialized in this function [-Wmaybe-uninitialized]
         setError(
         ~~~~~~~~^
             "Leading all-spaces line must be smaller than the block indent",
         LongestAllSpaceLine);
         ~~~~~~~~~~~~~~~~~~~~

ERROR: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/external/com_github_microsoft_seal/BUILD.bazel:24:19: Foreign Cc - CMake: Building seal failed: (Exit 1): bash failed: error executing command /bin/bash -c bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal_foreign_cc/wrapper_build_script.sh

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging rules_foreign_cc: Build failed! rules_foreign_cc: Keeping temp build directory and dependencies directory for debug. rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag. rules_foreigncc: Printing build logs: ____ BEGIN BUILD LOGS _____

Bazel external C/C++ Rules. Building library seal

Environment:__ LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/local/openmpi/lib/ EXT_BUILD_ROOT=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/648/execroot/spulib INSTALLDIR=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/648/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal PWD=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/648/execroot/spulib BUILD_TMPDIR=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/648/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal.build_tmpdir TMPDIR=/tmp EXT_BUILD_DEPS=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/648/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal.ext_build_deps SHLVL=3 BUILD_LOG=bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal_foreign_cc/CMake.log BUILD_SCRIPT=bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal_foreign_cc/build_script.sh BUILD_WRAPPER_SCRIPT=bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal_foreign_cc/wrapper_build_script.sh PATH=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/648/execroot/spulib:/home/haitaiwork/deepl/bin:/home/haitaiwork/deepl/anaconda3/envs/sfhost/bin:/home/haitaiwork/deepl/anaconda3/condabin:/root/ll/bin:/home/haitaiwork/deepl/anaconda3/bin:/home/haoxh/apache-jmeter-5.4/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/jre/bin:/home/haitaiwork/data/projects/fate/common/spark/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/haitaiwork/data/projects/fate/common/hadoop/bin:/home/haitaiwork/data/projects/fate/common/hadoop/sbin:/usr/local/openmpi/bin:/usr/local/rabbitmq/rabbitmqserver-3.8.1/sbin:/home/haitaiwork/deepl/download/neo4j-community-4.2.18/bin =/usr/bin/env


-- Build files have been written to: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/dff317ed9a5fa06fa40d05f23b79ff75/sandbox/linux-sandbox/648/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal.build_tmpdir

Target //examples/cpp/pir:generate_pir_data failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 39.910s, Critical Path: 39.11s INFO: 652 processes: 37 internal, 615 linux-sandbox. FAILED: Build did NOT complete successfully

anakinxc commented 1 year ago

gcc 版本太低了,要求请参考这里

dage0127 commented 1 year ago

更换成gcc 12,还是报错。 (sfhost) deepl@ht-PowerEdge-R740:~/spu-main$ gcc -v 使用内建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/12.2.0/lto-wrapper 目标:x86_64-pc-linux-gnu 配置为:./configure -enable-checking=release -enable-languages=c,c++ -disable-multilib 线程模型:posix Supported LTO compression algorithms: zlib gcc 版本 12.2.0 (GCC)

编译错误, (sfhost) deepl@ht-PowerEdge-R740:~/spu-main$ bazel build //examples/cpp/pir:generate_pir_data -c opt DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'tf_runtime' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'llvm-raw' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_grpc_grpc' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'zlib' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'rules_python' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'upb' because it already exists. INFO: Analyzed target //examples/cpp/pir:generate_pir_data (0 packages loaded, 0 targets configured). INFO: Found 1 target... ERROR: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/com_github_microsoft_seal/BUILD.bazel:24:19: Foreign Cc - CMake: Building seal failed: (Exit 1): bash failed: error executing command /bin/bash -c bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal_foreign_cc/wrapper_build_script.sh

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging rules_foreign_cc: Build failed! rules_foreign_cc: Keeping temp build directory and dependencies directory for debug. rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag. rules_foreigncc: Printing build logs: ____ BEGIN BUILD LOGS _____

Bazel external C/C++ Rules. Building library seal

Environment:__ LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/local/openmpi/lib/ EXT_BUILD_ROOT=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/100/execroot/spulib INSTALLDIR=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/100/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal PWD=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/100/execroot/spulib BUILD_TMPDIR=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/100/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal.build_tmpdir TMPDIR=/tmp EXT_BUILD_DEPS=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/100/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal.ext_build_deps SHLVL=3 BUILD_LOG=bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal_foreign_cc/CMake.log BUILD_SCRIPT=bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal_foreign_cc/build_script.sh BUILD_WRAPPER_SCRIPT=bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal_foreign_cc/wrapper_build_script.sh PATH=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/100/execroot/spulib:/home/haitaiwork/deepl/bin:/home/haitaiwork/deepl/anaconda3/envs/sfhost/bin:/home/haitaiwork/deepl/anaconda3/condabin:/root/ll/bin:/home/haitaiwork/deepl/anaconda3/bin:/home/haoxh/apache-jmeter-5.4/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/jre/bin:/home/haitaiwork/data/projects/fate/common/spark/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/haitaiwork/data/projects/fate/common/hadoop/bin:/home/haitaiwork/data/projects/fate/common/hadoop/sbin:/usr/local/openmpi/bin:/usr/local/rabbitmq/rabbitmqserver-3.8.1/sbin:/home/haitaiwork/deepl/download/neo4j-community-4.2.18/bin =/usr/bin/env


-- Build files have been written to: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/100/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal.build_tmpdir

Target //examples/cpp/pir:generate_pir_data failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: /home/haitaiwork/deepl/spu-main/examples/cpp/pir/BUILD.bazel:81:14 Linking examples/cpp/pir/generate_pir_data failed: (Exit 1): bash failed: error executing command /bin/bash -c bazel-out/k8-opt/bin/external/com_github_microsoft_seal/seal_foreign_cc/wrapper_build_script.sh

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging INFO: Elapsed time: 8.629s, Critical Path: 7.99s INFO: 13 processes: 13 internal. FAILED: Build did NOT complete successfully

anakinxc commented 1 year ago
-- The CXX compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0

bazel 依然在用 gcc 7.5.0

试一下 bazel clean --expunge 然后重新开始 build

dage0127 commented 1 year ago

清理: (sfhost) deepl@ht-PowerEdge-R740:~/spu-main$ bazel clean --expunge --async INFO: Starting clean. INFO: Output base moved to /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032_tmp_6007_c93e1b60-f3eb-483b-a4d3-1408f9dfae0b for deletion

编译,报错:

(sfhost) deepl@ht-PowerEdge-R740:~/spu-main$ bazel build //examples/cpp/pir:generate_pir_data -c opt Starting local Bazel server and connecting to it... DEBUG: Rule 'yacl' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1682574473 +0800" DEBUG: Repository yacl instantiated at: /home/haitaiwork/deepl/spu-main/WORKSPACE:19:9: in /home/haitaiwork/deepl/spu-main/bazel/repositories.bzl:45:10: in spu_deps /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe Repository rule git_repository defined at: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'tf_runtime' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'llvm-raw' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_grpc_grpc' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'zlib' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'rules_python' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11' because it already exists. DEBUG: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'upb' because it already exists. DEBUG: Rule 'org_interconnection' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1669271462 +0800" DEBUG: Repository org_interconnection instantiated at: /home/haitaiwork/deepl/spu-main/WORKSPACE:28:10: in /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/yacl/bazel/repositories.bzl:59:10: in yacl_deps /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe Repository rule git_repository defined at: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in INFO: Analyzed target //examples/cpp/pir:generate_pir_data (113 packages loaded, 10146 targets configured). INFO: Found 1 target... INFO: From Compiling llvm/lib/Support/UnicodeCaseFold.cpp: external/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp:8:1: warning: multi-line comment [-Wcomment] 8 | // utils/unicode-case-fold.py \ | ^ INFO: From Compiling src/google/protobuf/message_lite.cc: In file included from /usr/include/string.h:494, from external/com_google_protobuf/src/google/protobuf/stubs/port.h:39, from external/com_google_protobuf/src/google/protobuf/stubs/common.h:48, from external/com_google_protobuf/src/google/protobuf/message_lite.h:45, from external/com_google_protobuf/src/google/protobuf/message_lite.cc:36: In function 'void memcpy(void, const void, size_t)', inlined from 'uint8_t google::protobuf::io::EpsCopyOutputStream::WriteRaw(const void, int, uint8_t)' at external/com_google_protobuf/src/google/protobuf/io/coded_stream.h:706:16, inlined from 'virtual uint8_t google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(uint8_t, google::protobuf::io::EpsCopyOutputStream) const' at external/com_google_protobuf/src/google/protobuf/implicit_weak_message.h:84:28, inlined from 'bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream) const' at external/com_google_protobuf/src/google/protobuf/message_lite.cc:412:30: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:33: warning: 'void __builtin___memcpy_chk(void, const void, long unsigned int, long unsigned int)' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 34 | return builtin___memcpy_chk (dest, src, len, bos0 (dest)); | ~~~~~^~~~~~~~~ INFO: From Compiling src/google/protobuf/message_lite.cc: In file included from /usr/include/string.h:494, from external/com_google_protobuf/src/google/protobuf/stubs/port.h:39, from external/com_google_protobuf/src/google/protobuf/stubs/common.h:48, from external/com_google_protobuf/src/google/protobuf/message_lite.h:45, from external/com_google_protobuf/src/google/protobuf/message_lite.cc:36: In function 'void memcpy(void, const void, size_t)', inlined from 'uint8_t google::protobuf::io::EpsCopyOutputStream::WriteRaw(const void, int, uint8_t)' at external/com_google_protobuf/src/google/protobuf/io/coded_stream.h:706:16, inlined from 'virtual uint8_t google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(uint8_t, google::protobuf::io::EpsCopyOutputStream) const' at external/com_google_protobuf/src/google/protobuf/implicit_weak_message.h:84:28, inlined from 'bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream) const' at external/com_google_protobuf/src/google/protobuf/message_lite.cc:412:30: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:33: warning: 'void builtin___memcpy_chk(void, const void, long unsigned int, long unsigned int)' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 34 | return builtin_memcpy_chk (dest, src, len, bos0 (dest)); | ~~~~~^~~~~~~~~ INFO: From Compiling llvm/lib/Support/RISCVISAInfo.cpp: external/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp: In member function 'void llvm::RISCVISAInfo::updateMaxELen()': external/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp:1111:16: warning: 'ZveELen' may be used uninitialized [-Wmaybe-uninitialized] 1111 | unsigned ZveELen; | ^~~ INFO: From Compiling llvm/lib/Support/JSON.cpp: In file included from external/llvm-project/llvm/include/llvm/Support/FormatVariadic.h:34, from external/llvm-project/llvm/include/llvm/Support/JSON.h:54, from external/llvm-project/llvm/lib/Support/JSON.cpp:9: In static member function 'static size_t llvm::detail::HelperFunctions::consumeNumHexDigits(llvm::StringRef&, llvm::HexPrintStyle, size_t)', inlined from 'static void llvm::format_provider<T, typename std::enable_if<llvm::detail::use_integral_formatter::value, void>::type>::format(const T&, llvm::raw_ostream&, llvm::StringRef) [with T = unsigned int]' at external/llvm-project/llvm/include/llvm/Support/FormatProviders.h:136:35: external/llvm-project/llvm/include/llvm/Support/FormatProviders.h:96:27: warning: 'HS' may be used uninitialized [-Wmaybe-uninitialized] 96 | if (isPrefixedHexStyle(Style)) | ~~~~^~~~~ external/llvm-project/llvm/include/llvm/Support/FormatProviders.h: In static member function 'static void llvm::format_provider<T, typename std::enable_if<llvm::detail::use_integral_formatter::value, void>::type>::format(const T&, llvm::raw_ostream&, llvm::StringRef) [with T = unsigned int]': external/llvm-project/llvm/include/llvm/Support/FormatProviders.h:133:19: note: 'HS' was declared here 133 | HexPrintStyle HS; | ^~ INFO: From Compiling llvm/lib/Support/Signals.cpp: In file included from external/llvm-project/llvm/include/llvm/Support/Chrono.h:13, from external/llvm-project/llvm/include/llvm/Support/FileSystem.h:33, from external/llvm-project/llvm/lib/Support/Signals.cpp:22: In static member function 'static size_t llvm::detail::HelperFunctions::consumeNumHexDigits(llvm::StringRef&, llvm::HexPrintStyle, size_t)', inlined from 'static void llvm::format_provider<T, typename std::enable_if<llvm::detail::use_integral_formatter::value, void>::type>::format(const T&, llvm::raw_ostream&, llvm::StringRef) [with T = int]' at external/llvm-project/llvm/include/llvm/Support/FormatProviders.h:136:35: external/llvm-project/llvm/include/llvm/Support/FormatProviders.h:96:27: warning: 'HS' may be used uninitialized [-Wmaybe-uninitialized] 96 | if (isPrefixedHexStyle(Style)) | ~~~~^~~~~ external/llvm-project/llvm/include/llvm/Support/FormatProviders.h: In static member function 'static void llvm::format_provider<T, typename std::enable_if<llvm::detail::use_integral_formatter::value, void>::type>::format(const T&, llvm::raw_ostream&, llvm::StringRef) [with T = int]': external/llvm-project/llvm/include/llvm/Support/FormatProviders.h:133:19: note: 'HS' was declared here 133 | HexPrintStyle HS; | ^~ INFO: From Compiling llvm/lib/Support/ThreadPool.cpp: In file included from external/llvm-project/llvm/include/llvm/Support/FormatVariadic.h:34, from external/llvm-project/llvm/lib/Support/ThreadPool.cpp:18: In static member function 'static size_t llvm::detail::HelperFunctions::consumeNumHexDigits(llvm::StringRef&, llvm::HexPrintStyle, size_t)', inlined from 'static void llvm::format_provider<T, typename std::enable_if<llvm::detail::use_integral_formatter::value, void>::type>::format(const T&, llvm::raw_ostream&, llvm::StringRef) [with T = int]' at external/llvm-project/llvm/include/llvm/Support/FormatProviders.h:136:35: external/llvm-project/llvm/include/llvm/Support/FormatProviders.h:96:27: warning: 'HS' may be used uninitialized [-Wmaybe-uninitialized] 96 | if (isPrefixedHexStyle(Style)) | ~~~~^~~~~ external/llvm-project/llvm/include/llvm/Support/FormatProviders.h: In static member function 'static void llvm::format_provider<T, typename std::enable_if<llvm::detail::use_integral_formatter::value, void>::type>::format(const T&, llvm::raw_ostream&, llvm::StringRef) [with T = int]': external/llvm-project/llvm/include/llvm/Support/FormatProviders.h:133:19: note: 'HS' was declared here 133 | HexPrintStyle HS; | ^~ INFO: From Compiling llvm/lib/Support/YAMLParser.cpp: In member function 'void llvm::yaml::Scanner::setError(const llvm::Twine&, llvm::StringRef::iterator)', inlined from 'bool llvm::yaml::Scanner::findBlockScalarIndent(unsigned int&, unsigned int, unsigned int&, bool&)' at external/llvm-project/llvm/lib/Support/YAMLParser.cpp:1637:17: external/llvm-project/llvm/lib/Support/YAMLParser.cpp:267:5: warning: 'LongestAllSpaceLine' may be used uninitialized [-Wmaybe-uninitialized] 267 | if (Position >= End) | ^~ external/llvm-project/llvm/lib/Support/YAMLParser.cpp: In member function 'bool llvm::yaml::Scanner::findBlockScalarIndent(unsigned int&, unsigned int, unsigned int&, bool&)': external/llvm-project/llvm/lib/Support/YAMLParser.cpp:1624:23: note: 'LongestAllSpaceLine' was declared here 1624 | StringRef::iterator LongestAllSpaceLine; | ^~~~~~~ INFO: From Compiling llvm/lib/Support/APFloat.cpp: external/llvm-project/llvm/lib/Support/APFloat.cpp: In member function 'llvm::Expected llvm::detail::IEEEFloat::convertFromDecimalString(llvm::StringRef, llvm::APFloatBase::roundingMode)': external/llvm-project/llvm/lib/Support/APFloat.cpp:3078:36: warning: 'D.llvm::decimalInfo::lastSigDigit' may be used uninitialized [-Wmaybe-uninitialized] 3078 | } while (p <= D.lastSigDigit && multiplier <= (~ (integerPart) 0 - 9) / 10); | ~~~~^~~~~~~~~~~~~ external/llvm-project/llvm/lib/Support/APFloat.cpp:2979:15: note: 'D.llvm::decimalInfo::lastSigDigit' was declared here 2979 | decimalInfo D; | ^ external/llvm-project/llvm/lib/Support/APFloat.cpp:3011:53: warning: 'D.llvm::decimalInfo::firstSigDigit' may be used uninitialized [-Wmaybe-uninitialized] 3011 | if (D.firstSigDigit == str.end() || decDigitValue(D.firstSigDigit) >= 10U) { | ^~~~ external/llvm-project/llvm/lib/Support/APFloat.cpp:2979:15: note: 'D.llvm::decimalInfo::firstSigDigit' was declared here 2979 | decimalInfo D; | ^ INFO: From Compiling llvm/lib/Support/VirtualFileSystem.cpp: external/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp: In member function 'std::unique_ptr llvm::vfs::RedirectingFileSystemParser::parseEntry(llvm::yaml::Node, llvm::vfs::RedirectingFileSystem, bool)': external/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp:1961:5: warning: 'Kind' may be used uninitialized [-Wmaybe-uninitialized] 1961 | switch (Kind) { | ^~ external/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp:1793:38: note: 'Kind' was declared here 1793 | RedirectingFileSystem::EntryKind Kind; | ^~~~ INFO: From Compiling src/butil/endpoint.cpp: external/com_github_brpc_brpc/src/butil/endpoint.cpp: In function 'int butil::tcp_connect(EndPoint, int)': external/com_github_brpc_brpc/src/butil/endpoint.cpp:394:25: warning: the address of 'int bthread_connect(int, const sockaddr, socklen_t)' will never be NULL [-Waddress] 394 | if (bthread_connect != NULL) { | ^ external/com_github_brpc_brpc/src/butil/endpoint.cpp:46:16: note: 'int bthread_connect(int, const sockaddr, socklen_t)' declared here 46 | int BAIDU_WEAK bthread_connect( | ^~~~~~~ INFO: From Compiling src/brpc/parallel_channel.cpp: In file included from /usr/include/unistd.h:229, from external/com_github_brpc_brpc/src/butil/build_config.h:44, from external/com_github_brpc_brpc/src/butil/compiler_specific.h:8, from external/com_github_brpc_brpc/src/butil/macros.h:16, from external/com_github_brpc_brpc/src/butil/logging.h:31, from external/com_github_brpc_brpc/src/bthread/types.h:27, from external/com_github_brpc_brpc/src/bthread/bthread.h:27, from external/com_github_brpc_brpc/src/brpc/parallel_channel.cpp:19: external/com_github_brpc_brpc/src/brpc/parallel_channel.cpp: In static member function 'static brpc::ParallelChannelDone brpc::ParallelChannelDone::Create(int, int, const brpc::SubCall, int, brpc::Controller, google::protobuf::Closure)': external/com_github_brpc_brpc/src/brpc/parallel_channel.cpp:104:36: warning: 'offsetof' within non-standard-layout type 'brpc::ParallelChannelDone' is conditionally-supported [-Winvalid-offsetof] 104 | size_t req_size = offsetof(ParallelChannelDone, _sub_done) + | ^ INFO: From Compiling src/brpc/socket.cpp: In file included from external/com_github_brpc_brpc/src/butil/logging.h:31, from external/com_github_brpc_brpc/src/bthread/types.h:27, from external/com_github_brpc_brpc/src/bthread/unstable.h:27, from external/com_github_brpc_brpc/src/brpc/socket.cpp:29: external/com_github_brpc_brpc/src/brpc/socket.cpp: In member function 'void brpc::Socket::GetStat(brpc::SocketStat) const': external/com_github_brpc_brpc/src/brpc/socket.cpp:2714:28: warning: 'offsetof' within non-standard-layout type 'brpc::Socket' is conditionally-supported [-Winvalid-offsetof] 2714 | BAIDU_CASSERT(offsetof(Socket, _preferred_index) >= 64, different_cacheline); | ^ INFO: From Compiling src/brpc/policy/http2_rpc_protocol.cpp: In file included from /usr/include/x86_64-linux-gnu/bits/socket.h:27, from /usr/include/x86_64-linux-gnu/sys/socket.h:33, from /usr/include/netinet/in.h:23, from external/com_github_brpc_brpc/src/butil/endpoint.h:25, from external/com_github_brpc_brpc/src/brpc/details/http_message.h:26, from external/com_github_brpc_brpc/src/brpc/policy/http_rpc_protocol.h:22, from external/com_github_brpc_brpc/src/brpc/policy/http2_rpc_protocol.h:22, from external/com_github_brpc_brpc/src/brpc/policy/http2_rpc_protocol.cpp:19: external/com_github_brpc_brpc/src/brpc/policy/http2_rpc_protocol.cpp: In static member function 'static brpc::policy::H2UnsentRequest brpc::policy::H2UnsentRequest::New(brpc::Controller)': external/com_github_brpc_brpc/src/brpc/policy/http2_rpc_protocol.cpp:1394:37: warning: 'offsetof' within non-standard-layout type 'brpc::policy::H2UnsentRequest' is conditionally-supported [-Winvalid-offsetof] 1394 | const size_t memsize = offsetof(H2UnsentRequest, _list) + | ^ external/com_github_brpc_brpc/src/brpc/policy/http2_rpc_protocol.cpp: In static member function 'static brpc::policy::H2UnsentResponse brpc::policy::H2UnsentResponse::New(brpc::Controller, int, bool)': external/com_github_brpc_brpc/src/brpc/policy/http2_rpc_protocol.cpp:1652:37: warning: 'offsetof' within non-standard-layout type 'brpc::policy::H2UnsentResponse' is conditionally-supported [-Winvalid-offsetof] 1652 | const size_t memsize = offsetof(H2UnsentResponse, _list) + | ^ In file included from /usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/shared_ptr_atomic.h:33, from /usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/memory:78, from external/com_google_protobuf/src/google/protobuf/stubs/common.h:41, from external/com_google_protobuf/src/google/protobuf/io/zero_copy_stream.h:113, from external/com_github_brpc_brpc/src/butil/iobuf.h:29, from external/com_github_brpc_brpc/src/brpc/details/http_message.h:24: In member function 'std::atomic_base<_IntTp>::int_type std::__atomic_base<_IntTp>::fetch_add(__int_type, std::memory_order) [with _ITp = int]', inlined from 'int brpc::policy::H2UnsentRequest::AddRefManually()' at external/com_github_brpc_brpc/src/brpc/policy/http2_rpc_protocol.h:142:29, inlined from 'void brpc::policy::PackH2Request(butil::IOBuf, brpc::SocketMessage*, uint64_t, const google::protobuf::MethodDescriptor, brpc::Controller, const butil::IOBuf&, const brpc::Authenticator)' at external/com_github_brpc_brpc/src/brpc/policy/http2_rpc_protocol.cpp:1795:27: /usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/atomic_base.h:618:34: warning: 'unsigned int atomic_fetch_add_4(volatile void, unsigned int, int)' writing 4 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=] 618 | { return atomic_fetch_add(&_M_i, i, int(__m)); } | ~~~~^~~~~~~~ INFO: From Compiling src/brpc/server.cpp: In file included from external/com_github_brpc_brpc/src/butil/logging.h:31, from external/com_github_brpc_brpc/src/bthread/types.h:27, from external/com_github_brpc_brpc/src/bthread/unstable.h:27, from external/com_github_brpc_brpc/src/brpc/server.cpp:27: external/com_github_brpc_brpc/src/brpc/server.cpp: In constructor 'brpc::Server::Server(brpc::ProfilerLinker)': external/com_github_brpc_brpc/src/brpc/server.cpp:405:28: warning: 'offsetof' within non-standard-layout type 'brpc::Server' is conditionally-supported [-Winvalid-offsetof] 405 | BAIDU_CASSERT(offsetof(Server, _concurrency) % 64 == 0, | ^ INFO: From Compiling src/json2pb/json_to_pb.cpp: external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp: In function 'bool json2pb::JsonValueToProtoField(const butil::rapidjson::Value&, const google::protobuf::FieldDescriptor, google::protobuf::Message, const Json2PbOptions&, std::string)': external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:49:69: warning: 'this' pointer is null [-Wnonnull] 49 | butil::string_appendf(perr, " [%s]", (pb)->GetDescriptor()->name().c_str()); \ | ~~~~~~~^~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:40:5: note: in expansion of macro 'J2PERROR_WITH_PB' 40 | J2PERROR_WITH_PB((::google::protobuf::Message*)nullptr, perr, fmt, ##VA_ARGS) | ^~~~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:313:13: note: in expansion of macro 'J2PERROR' 313 | J2PERROR(err, "Missing required field: %s", field->full_name().c_str()); | ^~~~ In file included from external/com_github_brpc_brpc/src/json2pb/json_to_pb.h:24, from external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:30: external/com_google_protobuf/src/google/protobuf/message.h:352:21: note: in a call to non-static member function 'const google::protobuf::Descriptor google::protobuf::Message::GetDescriptor() const' 352 | const Descriptor GetDescriptor() const { return GetMetadata().descriptor; } | ^~~~~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:49:69: warning: 'this' pointer is null [-Wnonnull] 49 | butil::string_appendf(perr, " [%s]", (pb)->GetDescriptor()->name().c_str()); \ | ~~~~~~~^~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:40:5: note: in expansion of macro 'J2PERROR_WITH_PB' 40 | J2PERROR_WITH_PB((::google::protobuf::Message*)nullptr, perr, fmt, ##__VA_ARGS) | ^~~~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:321:13: note: in expansion of macro 'J2PERROR' 321 | J2PERROR(err, "Invalid value for repeated field: %s", | ^~~~ external/com_google_protobuf/src/google/protobuf/message.h:352:21: note: in a call to non-static member function 'const google::protobuf::Descriptor google::protobuf::Message::GetDescriptor() const' 352 | const Descriptor GetDescriptor() const { return GetMetadata().descriptor; } | ^~~~~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp: In function 'bool json2pb::JsonMapToProtoMap(const butil::rapidjson::Value&, const google::protobuf::FieldDescriptor, google::protobuf::Message, const Json2PbOptions&, std::string)': external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:49:69: warning: 'this' pointer is null [-Wnonnull] 49 | butil::string_appendf(perr, " [%s]", (pb)->GetDescriptor()->name().c_str()); \ | ~~~~~~~^~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:40:5: note: in expansion of macro 'J2PERROR_WITH_PB' 40 | J2PERROR_WITH_PB((::google::protobuf::Message)nullptr, perr, fmt, ##VA_ARGS) | ^~~~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:493:9: note: in expansion of macro 'J2PERROR' 493 | J2PERROR(err, "Non-object value for map field: %s", | ^~~~ external/com_google_protobuf/src/google/protobuf/message.h:352:21: note: in a call to non-static member function 'const google::protobuf::Descriptor google::protobuf::Message::GetDescriptor() const' 352 | const Descriptor GetDescriptor() const { return GetMetadata().descriptor; } | ^~~~~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp: In function 'bool json2pb::JsonValueToProtoMessage(const butil::rapidjson::Value&, google::protobuf::Message, const Json2PbOptions&, std::string, bool)': external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:49:69: warning: 'this' pointer is null [-Wnonnull] 49 | butil::string_appendf(perr, " [%s]", (pb)->GetDescriptor()->name().c_str()); \ | ~~~~~~~^~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:40:5: note: in expansion of macro 'J2PERROR_WITH_PB' 40 | J2PERROR_WITH_PB((::google::protobuf::Message*)nullptr, perr, fmt, ##VA_ARGS) | ^~~~ external/com_github_brpc_brpc/src/json2pb/json_to_pb.cpp:573:17: note: in expansion of macro 'J2PERROR' 573 | J2PERROR(err, "Missing required field: %s", field->full_name().c_str()); | ^~~~ external/com_google_protobuf/src/google/protobuf/message.h:352:21: note: in a call to non-static member function 'const google::protobuf::Descriptor google::protobuf::Message::GetDescriptor() const' 352 | const Descriptor GetDescriptor() const { return GetMetadata().descriptor; } | ^~~~~ ERROR: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/external/com_github_emptoolkit_emp_tool/BUILD.bazel:24:20: Foreign Cc - CMake: Building emp-tool failed: (Exit 1): bash failed: error executing command /bin/bash -c bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool_foreign_cc/wrapper_build_script.sh

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging rules_foreign_cc: Build failed! rules_foreign_cc: Keeping temp build directory and dependencies directory for debug. rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag. rules_foreigncc: Printing build logs: ____ BEGIN BUILD LOGS _____

Bazel external C/C++ Rules. Building library emp-tool

Environment:__ LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/local/openmpi/lib/ EXT_BUILD_ROOT=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/632/execroot/spulib INSTALLDIR=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/632/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool PWD=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/632/execroot/spulib BUILD_TMPDIR=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/632/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool.build_tmpdir TMPDIR=/tmp EXT_BUILD_DEPS=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/632/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool.ext_build_deps SHLVL=3 BUILD_LOG=bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool_foreign_cc/CMake.log BUILD_SCRIPT=bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool_foreign_cc/build_script.sh BUILD_WRAPPER_SCRIPT=bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool_foreign_cc/wrapper_build_script.sh PATH=/home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/632/execroot/spulib:/home/haitaiwork/deepl/bin:/home/haitaiwork/deepl/anaconda3/envs/sfhost/bin:/home/haitaiwork/deepl/anaconda3/condabin:/root/ll/bin:/home/haitaiwork/deepl/anaconda3/bin:/home/haoxh/apache-jmeter-5.4/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/jre/bin:/home/haitaiwork/data/projects/fate/common/spark/bin:/home/haitaiwork/data/projects/fate/common/jdk/jdk-8u345/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/haitaiwork/data/projects/fate/common/hadoop/bin:/home/haitaiwork/data/projects/fate/common/hadoop/sbin:/usr/local/openmpi/bin:/usr/local/rabbitmq/rabbitmqserver-3.8.1/sbin:/home/haitaiwork/deepl/download/neo4j-community-4.2.18/bin =/usr/bin/env


-- Build files have been written to: /home/haitaiwork/deepl/.cache/bazel/_bazel_deepl/71ec47afc7f3ce24340b9b547fbea032/sandbox/linux-sandbox/632/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool.build_tmpdir

Target //examples/cpp/pir:generate_pir_data failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 241.738s, Critical Path: 62.05s INFO: 1008 processes: 81 internal, 927 linux-sandbox. FAILED: Build did NOT complete successfully

anakinxc commented 1 year ago

这是这个问题 https://github.com/emp-toolkit/emp-tool/pull/170

你能先用 gcc 11.2 或者 11.3 吗?

dage0127 commented 1 year ago

非常感谢节日期间支持。 修改为GCC11之后,编译成功。 另外有个问题请教:编译之后的输出在什么路径,需要更新到什么路径下,才能使用。

Target //examples/cpp/pir:generate_pir_data up-to-date: bazel-bin/examples/cpp/pir/generate_pir_data INFO: Elapsed time: 346.100s, Critical Path: 294.20s INFO: 1072 processes: 79 internal, 993 linux-sandbox. INFO: Build completed successfully, 1072 total actions

dage0127 commented 1 year ago

多谢。关闭问题