The default cmake config selects the x86_64 nasm field-arithmetic asm, which
produced x86_64 objects inside the arm64 archive (mixed-arch, unlinkable).
Pass TARGET_PLATFORM=aarch64 so the AArch64 .s sources are used, and add an
architecture guard that fails the build on a mismatch.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Building rapidsnark from source in build.rs required cmake/nasm/gmp on every
runner, which the self-hosted CI hosts lack. Instead, host pre-built -fPIC
static archives as a fork GitHub release and download them like before.
- build.rs: reverted to the download-based approach (the PIC archives are built
on glibc 2.35 so they carry no __isoc23 references; no compat shim needed).
- download_rapidsnark.sh: Linux x86_64/arm64 now download the -fPIC rebuilds
from this fork's `rapidsnark-pic-*` release; macOS/iOS/Android keep using the
upstream iden3 archives (which work fine).
- Add .github/workflows/build-pic-archives.yml: builds the -fPIC archives
(rapidsnark + GMP) inside a glibc-2.35 container and publishes/updates the
release. Trigger by pushing a `rapidsnark-pic-*` tag or via workflow_dispatch.
Verified locally (glibc-2.35 container): the produced archives link into a
-shared cdylib with rust-lld.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>