From 2f34ce3abc012c355c2c9fa5ea7b70be46b4fc37 Mon Sep 17 00:00:00 2001 From: Roberto Bayardo Date: Sat, 5 Nov 2022 13:32:02 -0700 Subject: [PATCH] add BLST_PORTABLE to CGO_CFLAGS to fix SIGILL issue with blst --- .github/workflows/ci.yml | 4 ++++ geth/Dockerfile.geth | 1 + prysm/Dockerfile.prysm | 1 + 3 files changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f879c2f..caa8f13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,9 @@ name: CI +# The flag below may be needed if blst throws SIGILL, which happens with certain (older) CPUs +env: + CGO_CFLAGS: "-O -D__BLST_PORTABLE__" + on: push: branches: [ "master", "devnet-v3" ] diff --git a/geth/Dockerfile.geth b/geth/Dockerfile.geth index 117e8f3..ecd01f7 100644 --- a/geth/Dockerfile.geth +++ b/geth/Dockerfile.geth @@ -14,6 +14,7 @@ WORKDIR /app/go-ethereum # The flag below may be needed if blst throws SIGILL, which happens with certain (older) CPUs # ENV CGO_CFLAGS="-O -D__BLST_PORTABLE__" +ENV CGO_CFLAGS=$CGO_CFLAGS # Build directly as make geth doesn't work because it expects a normal git repository rather than a submodule. We set -buildvcs directly here to avoid this RUN go build \ diff --git a/prysm/Dockerfile.prysm b/prysm/Dockerfile.prysm index e7f4183..de7ea74 100644 --- a/prysm/Dockerfile.prysm +++ b/prysm/Dockerfile.prysm @@ -12,6 +12,7 @@ WORKDIR /app/prysm # The flag below may be needed if blst throws SIGILL, which happens with certain (older) CPUs # ENV CGO_CFLAGS="-O -D__BLST_PORTABLE__" +ENV CGO_CFLAGS=$CGO_CFLAGS RUN go build -o /build/beacon-node -buildvcs=false ./cmd/beacon-chain RUN go build -o /build/validator -buildvcs=false ./cmd/validator