Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centos 3.10.0 gcc 11.2 bazel build //examples/cpp/pir:generate_pir_data -c opt 编译失败 #187

Closed
dage0127 opened this issue May 2, 2023 · 8 comments

Comments

@dage0127
Copy link

dage0127 commented May 2, 2023

Issue Type

Build/Install

Modules Involved

SPU compiler, PIR

Have you reproduced the bug with SPU HEAD?

Yes

Installation Kind

source

SPU Version

SPU 0.3.3b0

OS Platform and Distribution

centos 3.10.0

Python Version

3.8

Compiler Version

GCC 11.2.1

Current Behavior?

A bug happened!

Standalone code to reproduce the issue

print("A bug")

Relevant log output

在centos操作系统,编译失败:

(sfhost) [sfl@vm-0-1-centos spu-main]$ uname -a
Linux vm-0-1-centos 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

(sfhost) [sfl@vm-0-1-centos spu-main]$ gcc --version
gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(sfhost) [sfl@vm-0-1-centos spu-main]$ go version
go version go1.17.6 linux/amd64

(sfhost) [sfl@vm-0-1-centos spu-main]$ ninja --version
1.10.2

(sfhost) [sfl@vm-0-1-centos spu-main]$ bazel clean --expunge
Starting local Bazel server and connecting to it...
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.


(sfhost) [sfl@vm-0-1-centos 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 = "1682254325 +0800"
DEBUG: Repository yacl instantiated at:
  /home/sfl/spu-main/WORKSPACE:19:9: in <toplevel>
  /home/sfl/spu-main/bazel/repositories.bzl:45:10: in spu_deps
  /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
Repository rule git_repository defined at:
  /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/xla/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'tf_runtime' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/xla/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'llvm-raw' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'pybind11_bazel' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'com_github_grpc_grpc' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'zlib' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'rules_python' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/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/sfl/spu-main/WORKSPACE:28:10: in <toplevel>
  /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/yacl/bazel/repositories.bzl:59:10: in yacl_deps
  /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
Repository rule git_repository defined at:
  /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
INFO: Analyzed target //examples/cpp/pir:generate_pir_data (113 packages loaded, 10145 targets configured).
INFO: Found 1 target...
INFO: From Compiling src/google/protobuf/message_lite.cc:
In file included from /usr/include/string.h:638,
                 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/bits/string3.h:51: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=]
   51 |   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:638,
                 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/bits/string3.h:51: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=]
   51 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/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_foreign_cc: Printing build logs:
_____ BEGIN BUILD LOGS _____

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

Environment:______________
TMPDIR=/tmp
LD_LIBRARY_PATH=/opt/rh/devtoolset-11/root/usr/lib64:/opt/rh/devtoolset-11/root/usr/lib:/opt/rh/devtoolset-11/root/usr/lib64/dyninst:/opt/rh/devtoolset-11/root/usr/lib/dyninst
BUILD_WRAPPER_SCRIPT=bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool_foreign_cc/wrapper_build_script.sh
EXT_BUILD_ROOT=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib
INSTALLDIR=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool
PATH=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib:/opt/rh/devtoolset-11/root/usr/bin:/home/sfl/anaconda3/envs/sfhost/bin:/home/sfl/anaconda3/condabin:/data/projects/fate/common/spark/bin:/data/projects/fate/common/jdk/jdk-8u345/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/data/projects/fate/common/hadoop/bin:/data/projects/fate/common/hadoop/sbin:/home/sfl/.local/bin:/home/sfl/bin:/usr/local/go/bin:.:/opt/rh/devtoolset-11/root/usr/bin
BUILD_TMPDIR=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool.build_tmpdir
PWD=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib
EXT_BUILD_DEPS=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/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
_=/usr/bin/env
__________________________
+ cmake -DOPENSSL_ROOT_DIR=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool.ext_build_deps/openssl -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool.build_tmpdir/crosstool_bazel.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool -DCMAKE_PREFIX_PATH=/home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool.ext_build_deps -DCMAKE_RANLIB= -DCMAKE_MAKE_PROGRAM=ninja -G Ninja /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/external/com_github_emptoolkit_emp_tool
-- The C compiler identification is GNU 11.2.1
-- The CXX compiler identification is GNU 11.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/rh/devtoolset-11/root/usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/rh/devtoolset-11/root/usr/bin/gcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Platform: x86_64
-- Build type: Release
-- CXX Flags: -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 -fdata-sections -std=c++0x -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -fdiagnostics-color=always -Wl,-z,noexecstack -fopenmp -fPIC -fstack-protector-strong -std=c++17 -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 -fdata-sections -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -fdiagnostics-color=always -Wl,-z,noexecstack -fopenmp -fPIC -fstack-protector-strong -pthread -Wall -funroll-loops -Wno-ignored-attributes -Wno-unused-result -march=native -maes -mrdseed -std=c++11 -O3
-- Performing Test RDSEED_RUN_RESULT
-- Performing Test RDSEED_RUN_RESULT - Success
-- Source of Randomness: rdseed
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found OpenSSL: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool.ext_build_deps/openssl/lib/libcrypto.a (found version "1.1.1q")  
-- Configuring done (1.1s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING


-- Build files have been written to: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool.build_tmpdir
+ cmake --build . --config Release
[1/21] Compiling aes_128 circuit file to binary
FAILED: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/external/com_github_emptoolkit_emp_tool/emp-tool/circuits/files/bristol_fashion/aes_128.txt.cpp 
cd /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/external/com_github_emptoolkit_emp_tool && xxd -i emp-tool/circuits/files/bristol_fashion/aes_128.txt emp-tool/circuits/files/bristol_fashion/aes_128.txt.hex && echo \#include\ \"emp-tool/circuits/aes_128_ctr.h\" > emp-tool/circuits/files/bristol_fashion/aes_128.txt.cpp && cat emp-tool/circuits/files/bristol_fashion/aes_128.txt.hex >> emp-tool/circuits/files/bristol_fashion/aes_128.txt.cpp
/bin/sh: xxd: command not found
[2/21] Compiling Keccak circuit file to binary
FAILED: /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/external/com_github_emptoolkit_emp_tool/emp-tool/circuits/files/bristol_fashion/Keccak_f.txt.cpp 
cd /home/sfl/.cache/bazel/_bazel_sfl/ef88d5999a1a612038ebe4cbe8a1dd15/sandbox/processwrapper-sandbox/221/execroot/spulib/external/com_github_emptoolkit_emp_tool && xxd -i emp-tool/circuits/files/bristol_fashion/Keccak_f.txt emp-tool/circuits/files/bristol_fashion/Keccak_f.txt.hex && echo \#include\ \"emp-tool/circuits/sha3_256.h\" > emp-tool/circuits/files/bristol_fashion/Keccak_f.txt.cpp && cat emp-tool/circuits/files/bristol_fashion/Keccak_f.txt.hex >> emp-tool/circuits/files/bristol_fashion/Keccak_f.txt.cpp
/bin/sh: xxd: command not found
ninja: build stopped: subcommand failed.
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/k8-opt/bin/external/com_github_emptoolkit_emp_tool/emp-tool_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.
INFO: Elapsed time: 124.975s, Critical Path: 80.12s
INFO: 286 processes: 60 internal, 226 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
@6fj
Copy link
Member

6fj commented May 2, 2023

Hi @dage0127

According to https://stackoverflow.com/a/36179795, you should install vim-common first.

@dage0127
Copy link
Author

dage0127 commented May 4, 2023

感谢支持,安装之后编译成功。 yum install vim-common
另外有个问题请教:编译之后的输出在什么路径,需要更新到什么路径下,从secret flow 或者spu才能使用最新的修改编译版本。

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

@anakinxc
Copy link
Collaborator

anakinxc commented May 4, 2023

编译后的二进制文件在 bazel-bin/examples/cpp/pir/generate_pir_data

@dage0127
Copy link
Author

dage0127 commented May 4, 2023

在如下路径找到了。
编译之后,需要人工将generate_pir_data更新到什么路径下,从secret flow 或者spu才能使用

(sfhost) [sfl@vm-0-1-centos spu-main]$ ll bazel-bin/examples/cpp/pir
总用量 1736
-r-xr-xr-x 1 sfl sfl 1700336 5月 4 10:16 generate_pir_data
-r-xr-xr-x 1 sfl sfl 68208 5月 4 10:03 generate_pir_data-2.params
drwxrwxr-x 3 sfl sfl 48 5月 4 10:03 generate_pir_data.runfiles
-r-xr-xr-x 1 sfl sfl 181 5月 4 10:03 generate_pir_data.runfiles_manifest
drwxrwxr-x 3 sfl sfl 39 5月 4 10:16 _objs

@zhanglei486
Copy link
Contributor

在如下路径找到了。 编译之后,需要人工将generate_pir_data更新到什么路径下,从secret flow 或者spu才能使用

(sfhost) [sfl@vm-0-1-centos spu-main]$ ll bazel-bin/examples/cpp/pir 总用量 1736 -r-xr-xr-x 1 sfl sfl 1700336 5月 4 10:16 generate_pir_data -r-xr-xr-x 1 sfl sfl 68208 5月 4 10:03 generate_pir_data-2.params drwxrwxr-x 3 sfl sfl 48 5月 4 10:03 generate_pir_data.runfiles -r-xr-xr-x 1 sfl sfl 181 5月 4 10:03 generate_pir_data.runfiles_manifest drwxrwxr-x 3 sfl sfl 39 5月 4 10:16 _objs

generate_pir_data 不需要将拷贝到特定路径,只需要命令行指定其所在目录执行就可以
例如上面提到在 (sfhost) [sfl@vm-0-1-centos spu-main]$ ll bazel-bin/examples/cpp/pir

(sfhost) [sfl@vm-0-1-centos spu-main]$ ./bazel-bin/examples/cpp/pir/generate_pir_data -data_count 10000 -label_len 12 -server_out_path ./server_data.csv -client_out_path ./client_data.csv

@dage0127
Copy link
Author

dage0127 commented May 6, 2023

这个理解了。
如果是SPU库文件编译之后,如何发布部署更新呢?
比如修改,编译如下文件:
spu-main\libspu\pir\pir.cc

@anakinxc
Copy link
Collaborator

anakinxc commented May 6, 2023

这个理解了。 如果是SPU库文件编译之后,如何发布部署更新呢? 比如修改,编译如下文件: spu-main\libspu\pir\pir.cc

可以用过 python setup.py bdist_wheel 打包生成一个新的 whl 包
然后 pip install --force-reinstall dist/*.whl 安装新的 spu

@dage0127
Copy link
Author

dage0127 commented May 8, 2023

非常感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants