From 4a97d8ec1ad30c30084226fc2fb9a8d4fdd8c0b9 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 19 Apr 2024 22:23:56 -0400 Subject: [PATCH] Update gcc restrictions to version 12.0.0 (#1634) Signed-off-by: Peter Zhu (cherry picked from commit 11342beb11f3fc78c4be681a799695c2e3cfc5a1) --- scripts/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index a5ab477f3..43a36443d 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -103,12 +103,13 @@ if [ "$JAVA_HOME" = "" ]; then echo "SET JAVA_HOME=$JAVA_HOME" fi -# Ensure gcc version is above 4.9.0 and at least 9.0.0 for faiss 1.7.4+ / SIMD Neon support on ARM64 compilation +# Ensure gcc version is at least 12.0.0 for faiss 1.7.4+ / SIMD Neon support on ARM64 compilation # https://github.com/opensearch-project/k-NN/issues/975 # https://github.com/opensearch-project/k-NN/issues/1138 # https://github.com/opensearch-project/opensearch-build/issues/4386 +# https://github.com/opensearch-project/opensearch-build/issues/4379#issuecomment-2067191682 GCC_VERSION=`gcc --version | head -n 1 | cut -d ' ' -f3` -GCC_REQUIRED_VERSION=9.0.0 +GCC_REQUIRED_VERSION=12.0.0 COMPARE_VERSION=`echo $GCC_REQUIRED_VERSION $GCC_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1` if [ "$COMPARE_VERSION" != "$GCC_REQUIRED_VERSION" ]; then echo "gcc version on this env is older than $GCC_REQUIRED_VERSION, exit 1"