From 64fba9bbc4c2056040b4ea5f3cccb278b39fa443 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 30 Apr 2024 17:51:31 -0400 Subject: [PATCH] Revert #1634 #1664 to switch back to CentOS7 (#1674) * Revert "Ensure gcc is newer >= 11.2.1 < 12.0.0 when building knn lib (#1664)" This reverts commit da4cd1c6bdaa0c0c6ca3a622f15fe821d6ace281. Signed-off-by: Peter Zhu * Revert "Update gcc restrictions to version 12.0.0 (#1634)" This reverts commit 11342beb11f3fc78c4be681a799695c2e3cfc5a1. Signed-off-by: Peter Zhu --------- Signed-off-by: Peter Zhu (cherry picked from commit f432b0e6681ed978a266f9f5e836cd35a46c481e) --- scripts/build.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 0b1419a93..38998d66a 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -103,26 +103,17 @@ if [ "$JAVA_HOME" = "" ]; then echo "SET JAVA_HOME=$JAVA_HOME" fi -# Ensure gcc version is > 11.2.1 and < 12.0.0 for faiss 1.7.4+ / SIMD Neon support on ARM64 compilation +# 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 # 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 -# https://github.com/opensearch-project/opensearch-build/issues/4379#issuecomment-2083623882 -# https://github.com/opensearch-project/opensearch-build/issues/4379#issuecomment-2084133839 GCC_VERSION=`gcc --version | head -n 1 | cut -d ' ' -f3` -GCC_REQUIRED_VERSION=11.2.1 +GCC_REQUIRED_VERSION=9.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" exit 1 fi -GCC_REQUIRED_VERSION_CEILING=12.0.0 -COMPARE_VERSION_CEILING=`echo $GCC_REQUIRED_VERSION_CEILING $GCC_VERSION | tr ' ' '\n' | sort -V | uniq | tail -n 1` -if [ "$COMPARE_VERSION_CEILING" != "$GCC_REQUIRED_VERSION_CEILING" ] && (echo "$OSTYPE" | grep -i linux); then - echo "gcc version on this env is newer than $GCC_REQUIRED_VERSION_CEILING, exit 1" - exit 1 -fi # Build k-NN lib and plugin through gradle tasks cd $work_dir