vertcoin / vertcoin-old

Vertcoin source tree
http://www.vertcoin.org
MIT License
76 stars 41 forks source link

Wallet does not compile with latest secp256k1 #54

Closed metalicjames closed 7 years ago

gotchay commented 9 years ago

I am having this issue on Ubuntu 14.04 with no luck. Any ideas?

s0l1dsn4k3 commented 9 years ago

I am also having this problem on Ubuntu 14.04.

heres a trace of what I'm getting:

obj/wallet.o: In function init_singleton::~init_singleton()': /home/ste/vertcoin/src/stealth.h:150: undefined reference tosecp256k1_context_destroy' obj/stealth.o: In function init_singleton::init()': /home/ste/vertcoin/src/stealth.h:156: undefined reference tosecp256k1_context_create' obj/stealth.o: In function ec_multiply(std::vector<unsigned char, std::allocator<unsigned char> >&, std::array<unsigned char, 32ul> const&)': /home/ste/vertcoin/src/stealth.cpp:126: undefined reference tosecp256k1_ec_pubkey_tweak_mul' obj/stealth.o: In function init_singleton::init()': /home/ste/vertcoin/src/stealth.h:156: undefined reference tosecp256k1_context_create' obj/stealth.o: In function ec_tweak_add(std::vector<unsigned char, std::allocator<unsigned char> >&, std::array<unsigned char, 32ul> const&)': /home/ste/vertcoin/src/stealth.cpp:149: undefined reference tosecp256k1_ec_pubkey_tweak_add' obj/stealth.o: In function secret_to_public_key(std::array<unsigned char, 32ul> const&, bool)': /home/ste/vertcoin/src/stealth.cpp:163: undefined reference tosecp256k1_ec_pubkey_create' obj/stealth.o: In function init_singleton::init()': /home/ste/vertcoin/src/stealth.h:156: undefined reference tosecp256k1_context_create' /home/ste/vertcoin/src/stealth.h:156: undefined reference to secp256k1_context_create' obj/stealth.o: In functionec_add(std::array<unsigned char, 32ul>&, std::array<unsigned char, 32ul> const&)': /home/ste/vertcoin/src/stealth.cpp:280: undefined reference to `secp256k1_ec_privkey_tweak_add' collect2: error: ld returned 1 exit status make: *\ [vertcoind] Error 1

I've installed secp256k as described:

sudo apt-get install libgmp-dev git clone https://github.com/bitcoin/secp256k1.git cd secp256k1 git checkout 4c63780710351ffcc52341497e3ca0e518fbad79 ./autogen.sh ./configure make make install

no luck. any help is greatly apreciated

poiuty commented 9 years ago
# git clone https://github.com/bitcoin/secp256k1.git
# cd secp256k1
# git checkout 4c63780710351ffcc52341497e3ca0e518fbad79
# ./autogen.sh
# ./configure --prefix=/usr
# make
# make install

# cd vertcoin/src/
# export LD_RUN_PATH=/usr/local/lib
# make -f makefile.unix
brunophilipe commented 8 years ago

@poiuty That did the trick for me. Thanks!

ghost commented 8 years ago

Hi, any help to resolve this issue?

In file included from main.h:13:0, from wallet.h:13, from wallet.cpp:6: stealth.h:159:5: error: 'secp256k1_context_t' does not name a type secp256k1_context_t* getContext() ^ stealth.h:166:5: error: 'secp256k1_context_t' does not name a type secp256k1_context_t* ctx; ^ stealth.h: In destructor 'init_singleton::~init_singleton()': stealth.h:150:39: error: 'ctx' was not declared in this scope secp256k1_context_destroy(ctx); ^ stealth.h: In member function 'void init_singleton::init()': stealth.h:156:9: error: 'ctx' was not declared in this scope ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); ^ make: *\ [obj/wallet.o] Error 1

goarchit commented 7 years ago

Any progress on this? Just tried building from a fresh clone and seeing this error...

metalicjames commented 7 years ago

We'll soon be updating to the latest Bitcoin Core which will alleviate this problem.

goarchit commented 7 years ago

Any specific release combination that will allow me to compile a functional coin now?

metalicjames commented 7 years ago

There is a working version of libsecp256k1 in this repo. Check the src/secp256k1 directory.

On Mon, Jan 30, 2017 at 2:57 PM, Cassey notifications@github.com wrote:

Any specific release combination that will allow me to compile a functional coin now?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vertcoin/vertcoin/issues/54#issuecomment-276172333, or mute the thread https://github.com/notifications/unsubscribe-auth/AD9hdV7n9nDqJQrskvxVlb57VH1Mj9Xeks5rXkCXgaJpZM4FpfBS .

metalicjames commented 7 years ago

The version required is included with this repo