error make
Closed this issue · 2 comments
rm -f chainstate chainstate.o hex.o varint.o pubkey.o
g++ -Wall -I. -Ilibbase58 -Isecp256k1/include -Ibech32/ref/c -c -o chainstate.o chainstate.cc
g++ -Wall -I. -Ilibbase58 -Isecp256k1/include -Ibech32/ref/c -c -o hex.o hex.cc
g++ -Wall -I. -Ilibbase58 -Isecp256k1/include -Ibech32/ref/c -c -o varint.o varint.cc
g++ -Wall -I. -Ilibbase58 -Isecp256k1/include -Ibech32/ref/c -c -o pubkey.o pubkey.cc
g++ -o chainstate chainstate.o hex.o varint.o pubkey.o -Lsecp256k1/.libs -lsecp256k1 -lcrypto -lleveldb -Llibbase58/.libs -lbase58 -Lbech32/ref/c -lbech32
secp256k1/.libs/libsecp256k1.a(libsecp256k1_la-secp256k1.o): In function secp256k1_num_set_bin': /home/roman/chainstate/secp256k1/src/num_gmp_impl.h:49: undefined reference to
__gmpn_set_str'
/home/roman/chainstate/secp256k1/src/num_gmp_impl.h:49: undefined reference to __gmpn_set_str' secp256k1/.libs/libsecp256k1.a(libsecp256k1_la-secp256k1.o): In function
secp256k1_num_mod_inverse':
/home/roman/chainstate/secp256k1/src/num_gmp_impl.h:128: undefined reference to __gmpn_gcdext' secp256k1/.libs/libsecp256k1.a(libsecp256k1_la-secp256k1.o): In function
secp256k1_num_get_bin':
/home/roman/chainstate/secp256k1/src/num_gmp_impl.h:34: undefined reference to __gmpn_get_str' secp256k1/.libs/libsecp256k1.a(libsecp256k1_la-secp256k1.o): In function
__gmpn_sub':
/usr/include/x86_64-linux-gnu/gmp.h:2190: undefined reference to `__gmpn_sub_n'
collect2: error: ld returned 1 exit status
You have gmp headers installed, and it is used by secp256k1 library. You'll need to edit Makefile and add -lgmp
to LDFLAGS
before I find an elegant way to fix this.
thanks It works! _))