exthereum / libsecp256k1

Erlang NIF bindings for libsecp256k1 ECDSA library
MIT License
8 stars 23 forks source link

gmp not found on M1 macOS Monterey #25

Open ppraisethesun opened 2 years ago

ppraisethesun commented 2 years ago

OS: 12.1 elixir: 1.13.2 erlang: 24.0.6

Getting this error when running mix deps.compile

c_src/secp256k1/src/num_gmp.h:10:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
         ^~~~~~~
1 error generated.
make: *** [priv/libsecp256k1_nif.so] Error 1
==> libsecp256k1
warning: Mix compiler :make_bindings was supposed to return {:ok | :noop | :error, [diagnostic]} but it returned :error

gmp is already installed according to brew:

Warning: gmp 6.2.1_1 is already installed and up-to-date.
To reinstall 6.2.1_1, run:
  brew reinstall gmp

I'm not sure how to approach this problem. Did anyone manage to compile this library on m1 macs?

mc10sw commented 2 years ago

same issue on M1 mac

mc10sw commented 2 years ago

@ppraisethesun i solved the issue. use this package instead.

https://hex.pm/packages/libsecp256k1_diode_fork