From 43178199bf9e9e1e6131917e9da30118d4bbc8ab Mon Sep 17 00:00:00 2001 From: just-mitch <68168980+just-mitch@users.noreply.github.com> Date: Tue, 26 Mar 2024 11:50:12 -0400 Subject: [PATCH] fix: serial bb builds for mac (#5462) /proc/meminfo does not exist on mac. --- barretenberg/cpp/bootstrap.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/barretenberg/cpp/bootstrap.sh b/barretenberg/cpp/bootstrap.sh index 02ccdb53779..2eaafa29571 100755 --- a/barretenberg/cpp/bootstrap.sh +++ b/barretenberg/cpp/bootstrap.sh @@ -77,8 +77,17 @@ b="\033[34m" # Blue p="\033[35m" # Purple r="\033[0m" # Reset - -AVAILABLE_MEMORY=$(awk '/MemFree/ { printf $2 }' /proc/meminfo) +AVAILABLE_MEMORY=0 + +case "$(uname)" in + Linux*) + # Check available memory on Linux + AVAILABLE_MEMORY=$(awk '/MemFree/ { printf $2 }' /proc/meminfo) + ;; + *) + echo "Parallel builds not supported on this operating system" + ;; +esac # This value may be too low. # If builds fail with an amount of free memory greater than this value then it should be increased. MIN_PARALLEL_BUILD_MEMORY=32000000