Skip to content

Commit

Permalink
[build][arm64] disable p4rt compile on arm64 for bazel not work (soni…
Browse files Browse the repository at this point in the history
…c-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$
  • Loading branch information
LuiSzee authored Dec 4, 2022
1 parent cd12486 commit 5281f6c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@ endif
override INCLUDE_P4RT = n
endif

# Pre-built Bazel is not available for arm64, so exclude P4RT
# TODO(PINS): Remove when Bazel binaries are available for arm64
ifeq ($(CONFIGURED_ARCH),arm64)
ifeq ($(INCLUDE_P4RT),y)
$(Q)echo "Disabling P4RT due to incompatible CPU architecture: $(CONFIGURED_ARCH)"
endif
override INCLUDE_P4RT = n
endif

ifeq ($(SONIC_INCLUDE_MACSEC),y)
INCLUDE_MACSEC = y
endif
Expand Down

0 comments on commit 5281f6c

Please sign in to comment.