Skip to content

Commit 83d9f04

Browse files
Update GCC required version
Signed-off-by: Naveen Tatikonda <[email protected]>
1 parent 567b233 commit 83d9f04

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: scripts/build.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ fi
112112
# https://github.com/opensearch-project/k-NN/issues/1138
113113
# https://github.com/opensearch-project/opensearch-build/issues/4386
114114
GCC_VERSION=`gcc --version | head -n 1 | cut -d ' ' -f3`
115-
GCC_REQUIRED_VERSION=12.4
115+
if [ "$ARCHITECTURE" = "x64" ]; then
116+
# https://github.com/opensearch-project/opensearch-build/issues/5226
117+
# We need gcc version >=12.4 to build Faiss Sapphire library(avx512_spr)
118+
GCC_REQUIRED_VERSION=12.4
119+
else
120+
GCC_REQUIRED_VERSION=9.0.0
121+
fi
116122
COMPARE_VERSION=`echo $GCC_REQUIRED_VERSION $GCC_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1`
117123
if [ "$COMPARE_VERSION" != "$GCC_REQUIRED_VERSION" ]; then
118124
echo "gcc version on this env is older than $GCC_REQUIRED_VERSION, exit 1"

0 commit comments

Comments
 (0)