Open
Description
On 64-bit Linux, uint64_t
is unsigned long
, but on 64-bit Apple ARM, uint64_t
is unsigned long long
. Regardless of platform, GMP's mp_limb_t
is always defined as unsigned long
. As a result, it is possible to freely assign between *uint64_t
and *mp_limb_t
when building for Linux, but not when building for Mac OS.
Building a circom-generated witness generator on MacOS will therefore produce a spew of errors when compiling fr.cpp
, because it frequently attempts to pass in *uint64_t
where GMP expects *mp_limb_t
.
This can be resolved by changing the declared types in fr.hpp
and fr.cpp
from uint64_t
to mp_limb_t
, as shown in the attached files. The modified files will compile successfully on aarch64.
Metadata
Metadata
Assignees
Labels
No labels