From 314ce7a999f3af90387e617ba5edd8e578f0d2ef Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 31 Jul 2024 22:35:49 +0800 Subject: [PATCH] feat: report error on unspported platform --- agents/scripts/install_deps_and_build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/agents/scripts/install_deps_and_build.sh b/agents/scripts/install_deps_and_build.sh index 9965ac88..43e3a6b4 100755 --- a/agents/scripts/install_deps_and_build.sh +++ b/agents/scripts/install_deps_and_build.sh @@ -91,6 +91,14 @@ main() { OS=$1 CPU=$2 + echo -e "#include \n#include \nint main() { __m256d a = _mm256_set_pd(1.0, 2.0, 3.0, 4.0); return 0; }" > /tmp/test.c + if gcc -mavx2 /tmp/test.c -o /tmp/test && ! /tmp/test; then + echo "FATAL: unsupported platform." + echo " Please UNCHECK the 'Use Rosetta for x86_64/amd64 emulation on Apple Silicon' Docker Desktop setting if you're running on mac." + + exit 1 + fi + if [[ ! -f $APP_HOME/manifest.json ]]; then echo "FATAL: manifest.json is required." exit 1