From e87d71cd84c45cab508de8f2319216953c6f03f5 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Sun, 3 Dec 2023 22:00:46 -0300 Subject: [PATCH] ask for c compiler when building --- scripts/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/build.sh b/scripts/build.sh index eaca9528..6b1c0a85 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -15,6 +15,12 @@ else OUTPUT=$1 fi +# Check for CGO_ENABLED +if [[ $(go env CGO_ENABLED) = 0 ]]; then + echo "must have installed gcc (linux), clang (macos), or have set CC to an appropriate C compiler" + exit 1 +fi + # Set the CGO flags to use the portable version of BLST # # We use "export" here instead of just setting a bash variable because we need