Skip to content

Commit 5ebc52c

Browse files
LuiSzeemssonicbld
authored andcommitted
[build][arm64] disable p4rt compile on arm64 for bazel not work (sonic-net#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 sonic-net#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 1d6e0b9 commit 5ebc52c

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
@@ -186,6 +186,15 @@ endif
186186
override INCLUDE_P4RT = n
187187
endif
188188

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

0 commit comments

Comments
 (0)