Skip to content

[Bug]: 在arm设备上进行编译时遇到问题 #214

@sMiaoPaSi

Description

@sMiaoPaSi

Describe the bug

在arm架构的嵌入式设备里,编译psi
bazel build //psi:main -c opt
指令遇到问题
在构建过程中,psi/proto/kuscia.pb.cc 文件中引用了一些标准的头文件(如 stddef.h、stdarg.h 等),但是这些头文件在构建过程中没有正确声明其依赖关系,导致编译失败。

Steps To Reproduce

设备环境如下
系统信息:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
硬件配置:
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 3
Vendor ID: ARM
Model: 0
Model name: Cortex-A55
Stepping: r2p0
CPU max MHz: 2304.0000
CPU min MHz: 408.0000
BogoMIPS: 48.00
L1d cache: 256 KiB
L1i cache: 256 KiB
L2 cache: 1 MiB
L3 cache: 3 MiB
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled v
ia prctl
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atom
ics fphp asimdhp cpuid asimdrdm lrcpc dcpop asi
mddp
内存信息:
total used free shared buff/cache available
Mem: 15Gi 1.3Gi 7.5Gi 30Mi 6.4Gi 13Gi
Swap: 0B 0B 0B

在运行指令:
bazel build //psi:main -c opt 时,遇到如下问题:

root@jh3588:/secretFlow/psi# bazel build //psi:main -c opt
INFO: Analyzed target //psi:main (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /root/secretFlow/psi/psi/proto/BUILD.bazel:68:14: Compiling psi/proto/kuscia.pb.cc failed: undeclared inclusion(s) in rule '//psi/proto:kuscia_proto':
this rule is missing dependency declarations for the following files included by 'psi/proto/kuscia.pb.cc':
'/usr/lib/gcc/aarch64-linux-gnu/10/include/stddef.h'
'/usr/lib/gcc/aarch64-linux-gnu/10/include/stdarg.h'
'/usr/lib/gcc/aarch64-linux-gnu/10/include/stdint.h'
'/usr/lib/gcc/aarch64-linux-gnu/10/include/limits.h'
'/usr/lib/gcc/aarch64-linux-gnu/10/include/syslimits.h'
ERROR: /root/.cache/bazel/_bazel_root/e507dab6215eb9c2343c9703f01cea92/external/com_google_double_conversion/BUILD.bazel:24:6: Error while validating output TreeArtifact File:[[<execution_root>]bazel-out/aarch64-opt/bin]external/com_google_double_conversion/copy_double-conversion/double-conversion : java.lang.InterruptedException
Target //psi:main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 22.317s, Critical Path: 20.60s
INFO: 10 processes: 8 internal, 2 linux-sandbox.
FAILED: Build did NOT complete successfully
root@jh3588:
/secretFlow/psi#

Expected behavior

希望能和在x86系统一样,将我们psi库成功编译部署运行

Version

暂不清楚

Operating system

Ubuntu 20.04.6 LTS

Hardware Resources

8c16g

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions