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
242 stars 104 forks source link

[Bug]:运行secretflow/spu/sml/decomposition/emulations/pca_emul.py发生报错(已经按照secretflow/spu/sml的README文件安装Docker) #919

Open BingLiu0 opened 2 days ago

BingLiu0 commented 2 days ago

Issue Type

Build/Install

Modules Involved

SPU compiler

Have you reproduced the bug with SPU HEAD?

Yes

Have you searched existing issues?

Yes

SPU Version

spu 0.9.2b0

OS Platform and Distribution

Linux Ubuntu 22.04

Python Version

3.10.14

Compiler Version

GCC 12.2.0

Current Behavior?

(base) root@50994049c24e:/home/admin/dev/spu# bazel run -c opt //sml/decomposition/emulations:nmf_emul

Starting local Bazel server and connecting to it... DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'llvm-raw' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'eigen_archive' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_grpc_grpc' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'zlib' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'nvtx_archive' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/tsl/third_party/repo.bzl:132:14: Warning: skipping import of repository 'upb' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'jsoncpp_git' because it already exists. DEBUG: /root/.cache/bazel/_bazel_root/c7c2256833a99c4ceaf0534f480b1c44/external/xla/third_party/repo.bzl:132:14: Warning: skipping import of repository 'cutlass_archive' because it already exists. WARNING: /home/admin/dev/spu/libspu/compiler/front_end/BUILD.bazel:18:15: in cc_library rule //libspu/compiler/front_end:hlo_importer: Target '//libspu/compiler/front_end:hlo_importer' violates visibility of target '@xla//xla/service/gpu/transforms:dot_dimension_sorter'. Continuing because --nocheck_visibility is active INFO: Analyzed target //sml/decomposition/emulations:nmf_emul (347 packages loaded, 35578 targets configured). INFO: Found 1 target... ERROR: /home/admin/dev/spu/libspu/core/BUILD.bazel:228:15: Compiling libspu/core/bit_utils.cc failed: (Exit 1): gcc failed: error executing command (from target //libspu/core:bit_utils) /usr/bin/gcc -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 ... (remaining 50 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging cc1plus: fatal error: libspu/core/bit_utils.cc: Permission denied compilation terminated. ERROR: /home/admin/dev/spu/libspu/core/BUILD.bazel:206:15: Compiling libspu/core/parallel_utils.cc failed: (Exit 1): gcc failed: error executing command (from target //libspu/core:parallel_utils) /usr/bin/gcc -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 ... (remaining 48 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging cc1plus: fatal error: libspu/core/parallel_utils.cc: Permission denied compilation terminated. ERROR: /home/admin/dev/spu/libspu/compiler/utils/BUILD.bazel:22:15: Compiling libspu/compiler/utils/utils.cc failed: (Exit 1): gcc failed: error executing command (from target //libspu/compiler/utils:utils) /usr/bin/gcc -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 ... (remaining 104 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging cc1plus: fatal error: libspu/compiler/utils/utils.cc: Permission denied compilation terminated. ERROR: /home/admin/dev/spu/libspu/mpc/utils/BUILD.bazel:133:15: Compiling libspu/mpc/utils/linalg.cc failed: (Exit 1): gcc failed: error executing command (from target //libspu/mpc/utils:linalg) /usr/bin/gcc -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 ... (remaining 58 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging cc1plus: fatal error: libspu/mpc/utils/linalg.cc: Permission denied compilation terminated. ERROR: /home/admin/dev/spu/libspu/mpc/semi2k/beaver/beaver_impl/ttp_server/BUILD.bazel:26:14: Generating proto_library //libspu/mpc/semi2k/beaver/beaver_impl/ttp_server:service_proto failed: (Exit 1): protoc failed: error executing command (from target //libspu/mpc/semi2k/beaver/beaver_impl/ttp_server:service_proto) bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/protoc '--cpp_out=bazel-out/k8-opt/bin' ... (remaining 2 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging libspu/mpc/semi2k/beaver/beaver_impl/ttp_server/service.proto: warning: directory does not exist. Could not make proto path relative: libspu/mpc/semi2k/beaver/beaver_impl/ttp_server/service.proto: No such file or directory ERROR: /home/admin/dev/spu/libspu/BUILD.bazel:22:14: Generating Descriptor Set proto_library //libspu:spu_proto failed: (Exit 1): protoc failed: error executing command (from target //libspu:spu_proto) bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/protoc --direct_dependencies libspu/spu.proto ... (remaining 4 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging libspu/spu.proto: warning: directory does not exist. Could not make proto path relative: libspu/spu.proto: No such file or directory ERROR: /home/admin/dev/spu/libspu/BUILD.bazel:22:14: Generating proto_library //libspu:spu_proto failed: (Exit 1): protoc failed: error executing command (from target //libspu:spu_proto) bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/protoc '--cpp_out=bazel-out/k8-opt/bin' '-Ilibspu/spu.proto=libspu/spu.proto' libspu/spu.proto

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging libspu/spu.proto: warning: directory does not exist. Could not make proto path relative: libspu/spu.proto: No such file or directory ERROR: /home/admin/dev/spu/spu/utils/BUILD.bazel:30:14: Generating Descriptor Set proto_library //spu/utils:distributed_proto failed: (Exit 1): protoc failed: error executing command (from target //spu/utils:distributed_proto) bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/protoc --direct_dependencies spu/utils/distributed.proto ... (remaining 4 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging spu/utils/distributed.proto: warning: directory does not exist. Could not make proto path relative: spu/utils/distributed.proto: No such file or directory ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/transforms/BUILD.bazel:36:18: TdGenerate libspu/dialect/pphlo/transforms/decompose_patterns.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/transforms:decompose_patterns_inc_gen_filegroup___gen_rewriters_13896579_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-rewriters libspu/dialect/pphlo/transforms/decompose_patterns.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/transforms/decompose_patterns.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/transforms/BUILD.bazel:18:18: TdGenerate libspu/dialect/pphlo/transforms/passes.h.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/transforms:pphlo_pass_inc_gen_filegroup___gen_pass_decls_237361239_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-pass-decls libspu/dialect/pphlo/transforms/passes.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/transforms/passes.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:92:18: TdGenerate libspu/dialect/pphlo/IR/types.h.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:types_inc_gen_filegroup___gen_typedefdecls-655098115_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-typedef-decls libspu/dialect/pphlo/IR/types.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/types.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:92:18: TdGenerate libspu/dialect/pphlo/IR/types.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:types_inc_gen_filegroup___gen_typedefdefs-1129510758_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-typedef-defs libspu/dialect/pphlo/IR/types.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/types.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:92:18: TdGenerate libspu/dialect/pphlo/IR/dialect.h.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:types_inc_gen_filegroup___gen_dialect_decls_324940376_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-dialect-decls libspu/dialect/pphlo/IR/types.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/types.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:92:18: TdGenerate libspu/dialect/pphlo/IR/dialect.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:types_inc_gen_filegroup___gen_dialectdefs-959349281_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-dialect-defs libspu/dialect/pphlo/IR/types.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/types.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:75:18: TdGenerate libspu/dialect/pphlo/IR/ops.h.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:ops_inc_gen_filegroup___gen_op_decls_1294557351_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-op-decls libspu/dialect/pphlo/IR/ops.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/ops.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:75:18: TdGenerate libspu/dialect/pphlo/IR/ops.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:ops_inc_gen_filegroup___gen_op_defs_1288686000_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-op-defs libspu/dialect/pphlo/IR/ops.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/ops.td': Permission denied ERROR: /home/admin/dev/spu/libspu/device/utils/BUILD.bazel:21:15: Compiling libspu/device/utils/debug_dump_constant.cc failed: (Exit 1): gcc failed: error executing command (from target //libspu/device/utils:debug_dump_constant) /usr/bin/gcc -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 ... (remaining 40 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging cc1plus: fatal error: libspu/device/utils/debug_dump_constant.cc: Permission denied compilation terminated. ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:58:18: TdGenerate libspu/dialect/pphlo/IR/interface.h.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:interface_filegroup___gen_type_interfacedecls-1030800788_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-type-interface-decls libspu/dialect/pphlo/IR/interface.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/interface.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:58:18: TdGenerate libspu/dialect/pphlo/IR/interface.cpp.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:interface_filegroup___gen_type_interface_defs_1075127115_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-type-interface-defs libspu/dialect/pphlo/IR/interface.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/interface.td': Permission denied ERROR: /home/admin/dev/spu/libspu/compiler/common/BUILD.bazel:19:15: Compiling libspu/compiler/common/ir_printer_config.cc failed: (Exit 1): gcc failed: error executing command (from target //libspu/compiler/common:ir_printer_config) /usr/bin/gcc -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 ... (remaining 105 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging cc1plus: fatal error: libspu/compiler/common/ir_printer_config.cc: Permission denied compilation terminated. ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:134:18: TdGenerate libspu/dialect/pphlo/IR/canonicalization_patterns.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:canonicalization_pattern_inc_gen_filegroup___gen_rewriters_13896579_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-rewriters libspu/dialect/pphlo/IR/canonicalization_patterns.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/canonicalization_patterns.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:41:18: TdGenerate libspu/dialect/pphlo/IR/base_enums.h.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:base_enums_inc_gen_filegroup___gen_enumdecls-1462463161_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-enum-decls libspu/dialect/pphlo/IR/base_enums.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/base_enums.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:117:18: TdGenerate libspu/dialect/pphlo/IR/attrs.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:attrs_inc_gen_filegroup___gen_attrdefdefs-1700418479_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-attrdef-defs libspu/dialect/pphlo/IR/ops.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/ops.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:41:18: TdGenerate libspu/dialect/pphlo/IR/base_enums.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:base_enums_inc_gen_filegroup___gen_enumdefs-1432649456_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-enum-defs libspu/dialect/pphlo/IR/base_enums.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/base_enums.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/pphlo/IR/BUILD.bazel:117:18: TdGenerate libspu/dialect/pphlo/IR/attrs.h.inc failed: (Exit 1): mlir-tblgen failed: error executing command (from target //libspu/dialect/pphlo/IR:attrs_inc_gen_filegroup___gen_attrdefdecls-1173368282_genrule) bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen -gen-attrdef-decls libspu/dialect/pphlo/IR/ops.td -I external/llvm-project/mlir/include -I ... (remaining 11 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging bazel-out/k8-opt-exec-50AE0418/bin/external/llvm-project/mlir/mlir-tblgen: Could not open input file 'libspu/dialect/pphlo/IR/ops.td': Permission denied ERROR: /home/admin/dev/spu/libspu/dialect/utils/BUILD.bazel:17:15: Compiling libspu/dialect/utils/utils.cc failed: (Exit 1): gcc failed: error executing command (from target //libspu/dialect/utils:utils) /usr/bin/gcc -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 ... (remaining 104 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging cc1plus: fatal error: libspu/dialect/utils/utils.cc: Permission denied compilation terminated. ERROR: /home/admin/dev/spu/libspu/dialect/utils/BUILD.bazel:17:15: Compiling libspu/dialect/utils/assembly_format.cc failed: (Exit 1): gcc failed: error executing command (from target //libspu/dialect/utils:utils) /usr/bin/gcc -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 ... (remaining 104 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging cc1plus: fatal error: libspu/dialect/utils/assembly_format.cc: Permission denied compilation terminated. ERROR: /home/admin/dev/spu/spu/BUILD.bazel:55:17: Compiling spu/libpsi.cc failed: (Exit 1): gcc failed: error executing command (from target //spu:libpsi.so) /usr/bin/gcc -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 ... (remaining 818 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging cc1plus: fatal error: spu/libpsi.cc: Permission denied compilation terminated. Target //sml/decomposition/emulations:nmf_emul failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 5.049s, Critical Path: 0.57s INFO: 29 processes: 29 internal. FAILED: Build did NOT complete successfully ERROR: Build failed. Not running target

Standalone code to reproduce the issue

首先按照secretflow/spu/sml/README.md中Installation的指示,
第一步:git clone https://github.com/secretflow/spu.git;
其次,按照Prerequisite的指示安装Docker环境,
第二步:docker run -d -it --name spu-dev-$(whoami) \
         --mount type=bind,source="$(pwd)",target=/home/admin/dev/ \
         -w /home/admin/dev \
         --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
         --cap-add=NET_ADMIN \
         --privileged=true \
         --entrypoint="bash" \
         secretflow/ubuntu-base-ci:latest
第三步:docker exec -it spu-dev-$(whoami) bash
以上已安装好Docker环境;
最后,按照secretflow/spu/sml/README.md中Installation的指示,运行目标文件,
第四步:bazel run -c opt //sml/decomposition/emulations:pca_emul。
发生了以上文件不存在和无权限访问的报错。

Relevant log output

No response

deadlywing commented 9 hours ago

hello,应该是docker权限的问题,有两种方式可以尝试一下:

  1. 把你自己的用户加入 docker group 或者 干脆服务器上就直接用root去跑
  2. 直接在docker容器里去git clone spu代码

PS:为了避免之前bazel缓存造成的影响,建议重新start一个新的container哈~