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

[Bug]: 使用 docker 编译失败 #1061

Open
wanakiki opened this issue Mar 11, 2025 · 3 comments
Open

[Bug]: 使用 docker 编译失败 #1061

wanakiki opened this issue Mar 11, 2025 · 3 comments

Comments

@wanakiki
Copy link

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

0.9.4.dev20250225

OS Platform and Distribution

Linux Ubuntu 22.04

Python Version

3.10

Compiler Version

11.4.0

Current Behavior?

根据文档 https://github.com/secretflow/spu/blob/main/CONTRIBUTING.md 使用 docker 编译 SPU 失败,出现以下信息:

(base) root@1b0933346d9f:/home/admin/dev/spu-workspace/spu# git status
HEAD detached at 0.9.4.dev20250225
nothing to commit, working tree clean
(base) root@1b0933346d9f:/home/admin/dev/spu-workspace/spu# bazel build //:spu_wheel                                  
INFO: Analyzed target //:spu_wheel (0 packages loaded, 0 targets configured).
ERROR: /home/admin/dev/spu-workspace/spu/spu/utils/BUILD.bazel:30:14: Generating Descriptor Set proto_library //spu/utils:distributed_proto failed: (Exit 1): protoc failed: error executing GenProtoDescriptorSet command (from target //spu/utils:distributed_proto) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/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
Could not make proto path relative: spu/utils/distributed.proto: No such file or directory
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/BUILD.bazel:21:14: Generating proto_library @@spulib~//libspu:spu_proto failed: (Exit 1): protoc failed: error executing GenProto command (from target @@spulib~//libspu:spu_proto) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/protobuf~/protoc '--cpp_out=bazel-out/k8-fastbuild/bin/external/spulib~' -Iexternal/spulib~ -I. external/spulib~/libspu/spu.proto

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Could not make proto path relative: external/spulib~/libspu/spu.proto: No such file or directory
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/core/BUILD.bazel:208:15: Compiling libspu/core/parallel_utils.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target @@spulib~//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 '-std=c++14' -MD -MF ... (remaining 55 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cc1plus: fatal error: external/spulib~/libspu/core/parallel_utils.cc: Permission denied
compilation terminated.
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/core/BUILD.bazel:230:15: Compiling libspu/core/bit_utils.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target @@spulib~//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 '-std=c++14' -MD -MF ... (remaining 65 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cc1plus: fatal error: external/spulib~/libspu/core/bit_utils.cc: Permission denied
compilation terminated.
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:92:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/dialect.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:types_inc_gen_filegroup___gen_dialect_defs_-959349281_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-dialect-defs external/spulib~/libspu/dialect/pphlo/IR/[types.td](http://types.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[types.td](http://types.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/transforms/BUILD.bazel:18:18: TdGenerate external/spulib~/libspu/dialect/pphlo/transforms/passes.h.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/transforms:pphlo_pass_inc_gen_filegroup___gen_pass_decls_237361239_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-pass-decls external/spulib~/libspu/dialect/pphlo/transforms/[passes.td](http://passes.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/transforms/[passes.td](http://passes.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:92:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/dialect.h.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:types_inc_gen_filegroup___gen_dialect_decls_324940376_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-dialect-decls external/spulib~/libspu/dialect/pphlo/IR/[types.td](http://types.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[types.td](http://types.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:92:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/types.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:types_inc_gen_filegroup___gen_typedef_defs_-1129510758_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-typedef-defs external/spulib~/libspu/dialect/pphlo/IR/[types.td](http://types.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[types.td](http://types.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/transforms/BUILD.bazel:36:18: TdGenerate external/spulib~/libspu/dialect/pphlo/transforms/decompose_patterns.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/transforms:decompose_patterns_inc_gen_filegroup___gen_rewriters_13896579_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-rewriters external/spulib~/libspu/dialect/pphlo/transforms/[decompose_patterns.td](http://decompose_patterns.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/transforms/[decompose_patterns.td](http://decompose_patterns.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:92:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/types.h.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:types_inc_gen_filegroup___gen_typedef_decls_-655098115_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-typedef-decls external/spulib~/libspu/dialect/pphlo/IR/[types.td](http://types.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[types.td](http://types.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/mpc/semi2k/beaver/beaver_impl/ttp_server/BUILD.bazel:26:14: Generating proto_library @@spulib~//libspu/mpc/semi2k/beaver/beaver_impl/ttp_server:service_proto failed: (Exit 1): protoc failed: error executing GenProto command (from target @@spulib~//libspu/mpc/semi2k/beaver/beaver_impl/ttp_server:service_proto) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/protobuf~/protoc '--cpp_out=bazel-out/k8-fastbuild/bin/external/spulib~' -Iexternal/spulib~ -I. ... (remaining 1 argument skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Could not make proto path relative: external/spulib~/libspu/mpc/semi2k/beaver/beaver_impl/ttp_server/service.proto: No such file or directory
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:75:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/ops.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:ops_inc_gen_filegroup___gen_op_defs_1288686000_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-op-defs external/spulib~/libspu/dialect/pphlo/IR/[ops.td](http://ops.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[ops.td](http://ops.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:75:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/ops.h.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:ops_inc_gen_filegroup___gen_op_decls_1294557351_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-op-decls external/spulib~/libspu/dialect/pphlo/IR/[ops.td](http://ops.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[ops.td](http://ops.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:58:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/interface.cpp.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:interface_filegroup___gen_type_interface_defs_1075127115_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-type-interface-defs external/spulib~/libspu/dialect/pphlo/IR/[interface.td](http://interface.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[interface.td](http://interface.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/mpc/utils/BUILD.bazel:135:15: Compiling libspu/mpc/utils/linalg.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target @@spulib~//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 '-std=c++14' -MD -MF ... (remaining 65 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cc1plus: fatal error: external/spulib~/libspu/mpc/utils/linalg.cc: Permission denied
compilation terminated.
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:58:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/interface.h.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:interface_filegroup___gen_type_interface_decls_-1030800788_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-type-interface-decls external/spulib~/libspu/dialect/pphlo/IR/[interface.td](http://interface.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[interface.td](http://interface.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:117:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/attrs.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:attrs_inc_gen_filegroup___gen_attrdef_defs_-1700418479_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-attrdef-defs external/spulib~/libspu/dialect/pphlo/IR/[ops.td](http://ops.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[ops.td](http://ops.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:134:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/canonicalization_patterns.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:canonicalization_pattern_inc_gen_filegroup___gen_rewriters_13896579_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-rewriters external/spulib~/libspu/dialect/pphlo/IR/[canonicalization_patterns.td](http://canonicalization_patterns.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[canonicalization_patterns.td](http://canonicalization_patterns.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:117:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/attrs.h.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:attrs_inc_gen_filegroup___gen_attrdef_decls_-1173368282_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-attrdef-decls external/spulib~/libspu/dialect/pphlo/IR/[ops.td](http://ops.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[ops.td](http://ops.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:41:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/base_enums.cc.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:base_enums_inc_gen_filegroup___gen_enum_defs_-1432649456_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-enum-defs external/spulib~/libspu/dialect/pphlo/IR/[base_enums.td](http://base_enums.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[base_enums.td](http://base_enums.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/pphlo/IR/BUILD.bazel:41:18: TdGenerate external/spulib~/libspu/dialect/pphlo/IR/base_enums.h.inc failed: (Exit 1): mlir-tblgen failed: error executing TdGenerate command (from target @@spulib~//libspu/dialect/pphlo/IR:base_enums_inc_gen_filegroup___gen_enum_decls_-1462463161_genrule) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen -gen-enum-decls external/spulib~/libspu/dialect/pphlo/IR/[base_enums.td](http://base_enums.td/) -I ... (remaining 13 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-ST-d57f47055a04/bin/external/llvm-raw~~llvm~llvm-project/mlir/mlir-tblgen: Could not open input file 'external/spulib~/libspu/dialect/pphlo/IR/[base_enums.td](http://base_enums.td/)': Permission denied
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/utils/BUILD.bazel:17:15: Compiling libspu/dialect/utils/utils.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target @@spulib~//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 '-std=c++14' -MD -MF ... (remaining 112 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cc1plus: fatal error: external/spulib~/libspu/dialect/utils/utils.cc: Permission denied
compilation terminated.
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/compiler/utils/BUILD.bazel:22:15: Compiling libspu/compiler/utils/utils.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target @@spulib~//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 '-std=c++14' -MD -MF ... (remaining 112 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cc1plus: fatal error: external/spulib~/libspu/compiler/utils/utils.cc: Permission denied
compilation terminated.
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/dialect/utils/BUILD.bazel:17:15: Compiling libspu/dialect/utils/assembly_format.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target @@spulib~//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 '-std=c++14' -MD -MF ... (remaining 112 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cc1plus: fatal error: external/spulib~/libspu/dialect/utils/assembly_format.cc: Permission denied
compilation terminated.
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/device/utils/BUILD.bazel:21:15: Compiling libspu/device/utils/debug_dump_constant.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target @@spulib~//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 '-std=c++14' -MD -MF ... (remaining 47 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cc1plus: fatal error: external/spulib~/libspu/device/utils/debug_dump_constant.cc: Permission denied
compilation terminated.
ERROR: /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/external/spulib~/libspu/compiler/common/BUILD.bazel:19:15: Compiling libspu/compiler/common/ir_printer_config.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target @@spulib~//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 '-std=c++14' -MD -MF ... (remaining 113 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cc1plus: fatal error: external/spulib~/libspu/compiler/common/ir_printer_config.cc: Permission denied
compilation terminated.
ERROR: /home/admin/dev/spu-workspace/spu/spu/BUILD.bazel:55:17: Compiling spu/libpsi.cc failed: (Exit 1): gcc failed: error executing CppCompile 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 '-std=c++14' -MD -MF ... (remaining 950 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.
INFO: Found 1 target...
Target //:spu_wheel failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.969s, Critical Path: 0.74s
INFO: 28 processes: 28 internal.
ERROR: Build did NOT complete successfully
(base) root@1b0933346d9f:/home/admin/dev/spu-workspace/spu# ls
BUILD.bazel      INSTALLATION.md  MODULE.bazel       REPO_LAYOUT.md  bazel-app  bazel-spu       build_wheel_entrypoint.sh  experimental        renovate.json         requirements_dev_darwin_lock.txt  requirements_lock_3_11.txt  src
CHANGELOG.md     LEGAL.md         MODULE.bazel.lock  SECURITY.md     bazel-bin  bazel-testlogs  docs                       pyproject.toml      requirements-dev.txt  requirements_dev_lock.txt         sml                         update_version.py
CONTRIBUTING.md  LICENSE          README.md          bazel           bazel-out  benchmark       examples                   pyrightconfig.json  requirements.txt      requirements_lock_3_10.txt        spu                         version.bzl
(base) root@1b0933346d9f:/home/admin/dev/spu-workspace/spu#
Display all 854 possibilities? (y or n)
(base) root@1b0933346d9f:/home/admin/dev/spu-workspace/spu# ls -l
total 724
-rw-rw-r--  1 1000 1000   4119 Mar  7 07:26 BUILD.bazel
-rw-rw-r--  1 1000 1000   8498 Mar  7 07:26 CHANGELOG.md
-rw-rw-r--  1 1000 1000   4325 Mar  7 07:26 CONTRIBUTING.md
-rw-rw-r--  1 1000 1000   1631 Mar  7 07:26 INSTALLATION.md
-rw-rw-r--  1 1000 1000    575 Mar  7 07:26 LEGAL.md
-rw-rw-r--  1 1000 1000  11357 Mar  7 07:26 LICENSE
-rw-rw-r--  1 1000 1000   3992 Mar  7 08:00 MODULE.bazel
-rw-rw-r--  1 1000 1000 138497 Mar 10 13:46 MODULE.bazel.lock
-rw-rw-r--  1 1000 1000   6080 Mar  7 07:26 README.md
-rw-rw-r--  1 1000 1000   2412 Mar  7 07:26 REPO_LAYOUT.md
-rw-rw-r--  1 1000 1000   1631 Mar  7 07:26 SECURITY.md
drwxrwxr-x  3 1000 1000   4096 Mar  7 07:26 bazel
lrwxrwxrwx  1 root root     78 Mar  7 09:21 bazel-app -> /root/.cache/bazel/_bazel_root/8c069df52082beee3c95ca17836fb8e2/execroot/_main
lrwxrwxrwx  1 root root    105 Mar 11 03:29 bazel-bin -> /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/execroot/_main/bazel-out/k8-fastbuild/bin
lrwxrwxrwx  1 root root     88 Mar 10 13:46 bazel-out -> /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/execroot/_main/bazel-out
lrwxrwxrwx  1 root root     78 Mar 10 13:46 bazel-spu -> /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/execroot/_main
lrwxrwxrwx  1 root root    110 Mar 11 03:29 bazel-testlogs -> /root/.cache/bazel/_bazel_root/8658160d8eb96975c36d23d2de01fcaa/execroot/_main/bazel-out/k8-fastbuild/testlogs
drwxrwxr-x  2 1000 1000   4096 Mar  7 07:26 benchmark
-rwxrwxr-x  1 1000 1000    931 Mar  7 07:26 build_wheel_entrypoint.sh
drwxrwxr-x  9 1000 1000   4096 Mar  7 07:26 docs
drwxrwxr-x  5 1000 1000   4096 Mar  7 07:26 examples
drwxrwxr-x  3 1000 1000   4096 Mar  7 07:26 experimental
-rw-rw-r--  1 1000 1000    510 Mar  7 07:26 pyproject.toml
-rw-rw-r--  1 1000 1000    145 Mar  7 07:26 pyrightconfig.json
-rw-rw-r--  1 1000 1000    244 Mar  7 07:26 renovate.json
-rw-rw-r--  1 1000 1000    771 Mar  7 08:00 requirements-dev.txt
-rw-rw-r--  1 1000 1000    224 Mar  7 07:26 requirements.txt
-rw-rw-r--  1 1000 1000 191886 Mar  7 07:26 requirements_dev_darwin_lock.txt
-rw-rw-r--  1 1000 1000 211726 Mar  7 07:26 requirements_dev_lock.txt
-rw-rw-r--  1 1000 1000  17360 Mar  7 07:26 requirements_lock_3_10.txt
-rw-rw-r--  1 1000 1000  17360 Mar  7 07:26 requirements_lock_3_11.txt
drwxrwxr-x 15 1000 1000   4096 Mar  7 07:26 sml
drwxrwxr-x  7 1000 1000   4096 Mar  7 07:26 spu
drwxrwxr-x  4 1000 1000   4096 Mar  7 08:00 src
-rw-rw-r--  1 1000 1000   2390 Mar  7 07:26 update_version.py
-rw-rw-r--  1 1000 1000    616 Mar  7 08:00 version.bzl
(base) root@1b0933346d9f:/home/admin/dev/spu-workspace/spu# python --version
Python 3.10.14
(base) root@1b0933346d9f:/home/admin/dev/spu-workspace/spu# gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
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.

Standalone code to reproduce the issue

## start container
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 \
         secretflow/ubuntu-base-ci:latest \
         bash

# attach to build container
docker exec -it spu-dev-$(whoami) bash

Relevant log output

@w-gc
Copy link
Collaborator

w-gc commented Mar 11, 2025

用bazelisk试试

Image

@wanakiki
Copy link
Author

我尝试之后还是失败了,报错信息仍旧有一部分是Permission denied,输出有点多,我传了一个文件,

log.txt

@w-gc
Copy link
Collaborator

w-gc commented Mar 12, 2025

看起来是权限的问题呀,你把cache删掉重新编译试试?

cd <YOUR_SPU_PATH>/src && bazelisk clean --expunge
cd <YOUR_SPU_PATH> && bazelisk clean --expunge

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

2 participants