Skip to content

Commit 5281f6c

Browse files
authored
[build][arm64] disable p4rt compile on arm64 for bazel not work (#12798)
pre-compiled bazel is not work in arm64 docker container shil@2f910d8d37b2:/sonic/src/sonic-p4rt/sonic-pins$ uname -a Linux 2f910d8d37b2 5.4.0-132-generic Azure#148-Ubuntu SMP Mon Oct 17 16:02:06 UTC 2022 aarch64 GNU/Linux shil@2f910d8d37b2:/sonic/src/sonic-p4rt/sonic-pins$ bazel Opening zip "/proc/self/exe": lseek(): Bad file descriptor FATAL: Failed to open '/proc/self/exe' as a zip file: (error: 9): Bad file descriptor shil@2f910d8d37b2:/sonic/src/sonic-p4rt/sonic-pins$
1 parent cd12486 commit 5281f6c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

slave.mk

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@ endif
187187
override INCLUDE_P4RT = n
188188
endif
189189

190+
# Pre-built Bazel is not available for arm64, so exclude P4RT
191+
# TODO(PINS): Remove when Bazel binaries are available for arm64
192+
ifeq ($(CONFIGURED_ARCH),arm64)
193+
ifeq ($(INCLUDE_P4RT),y)
194+
$(Q)echo "Disabling P4RT due to incompatible CPU architecture: $(CONFIGURED_ARCH)"
195+
endif
196+
override INCLUDE_P4RT = n
197+
endif
198+
190199
ifeq ($(SONIC_INCLUDE_MACSEC),y)
191200
INCLUDE_MACSEC = y
192201
endif

0 commit comments

Comments
 (0)