Skip to content

[BUG] api-test does not apply portable BLST flags on Apple Silicon #1537

Open @Parikalp-Bhardwaj opened 2026-08-03 14:53 UTC 0 comments Updated 2026-08-03 14:53 UTC
bug

Description

On Apple Silicon, scripts/blst-portable.mk sets:

BLST_PORTABLE=1

but the api-test target does not apply BLST_PORTABLE_CGO_CFLAGS.

As a result, BLST-dependent packages fail with:

Caught SIGILL in blst_cgo_init

Environment

Host: arm64
Go: darwin/amd64
CGO_ENABLED: 1

Reproduction

make api-test

Proposed fix

Apply the existing portable BLST flags when BLST_PORTABLE=1:

CGO_CFLAGS="$(go env CGO_CFLAGS) -O2 $(BLST_PORTABLE_CGO_CFLAGS)"

Verification

After the change:

Passed: 1097 tests
Failed: 0 tests

I have a minimal Makefile patch ready.


🔄 Auto-synced from Issue #1537 every hour.