Skip to content

Commit

Permalink
Update GCC required version
Browse files Browse the repository at this point in the history
Signed-off-by: Naveen Tatikonda <[email protected]>
  • Loading branch information
naveentatikonda committed Jan 25, 2025
1 parent f5da962 commit 10a6f0a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ fi
# https://github.com/opensearch-project/k-NN/issues/1138
# https://github.com/opensearch-project/opensearch-build/issues/4386
GCC_VERSION=`gcc --version | head -n 1 | cut -d ' ' -f3`
GCC_REQUIRED_VERSION=12.4
if [ "$ARCHITECTURE" = "x64" ]; then
# https://github.com/opensearch-project/opensearch-build/issues/5226
# We need gcc version >=12.4 to build Faiss Sapphire library(avx512_spr)
GCC_REQUIRED_VERSION=12.4
else
GCC_REQUIRED_VERSION=9.0.0
fi
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"
Expand Down

0 comments on commit 10a6f0a

Please sign in to comment.