0

Hi I am compiling an ALTCOIN forked from another coin, I'm using Ubuntu Server 16.04 LTS via SSH from a remotely hosted server. I believe I installed all dependencies because I have already compiled about 4 coin source codes.

But with this particular source I am getting build errors, I will copy and paste the errors from the command line.

So I typed in

make -f makefile.unix USE_QRCODE=1  


the here is the results.
  -MMD -MF obj/key.d -o obj/key.o key.cpp

key.cpp:30:5: error: ‘secp256k1_context_t’ does not name a type
     secp256k1_context_t* ctx;
     ^
key.cpp: In constructor ‘{anonymous}::CSecp256k1Init::CSecp256k1Init()’:

key.cpp:32:9: error: ‘ctx’ was not declared in this scope
         ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
         ^
key.cpp: In destructor ‘{anonymous}::CSecp256k1Init::~CSecp256k1Init()’:

key.cpp:35:35: error: ‘ctx’ was not declared in this scope
         secp256k1_context_destroy(ctx);
                                   ^
key.cpp: In member function ‘bool CKey::SetPrivKey(const CPrivKey&, bool)’:

key.cpp:472:61: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’
     if (!secp256k1_ec_privkey_import(instance_of_csecp256k1.ctx, (unsigned char*)begin(), &privkey[0], privkey.size()))
                                                             ^
key.cpp:472:118: error: ‘secp256k1_ec_privkey_import’ was not declared in this scope
     if (!secp256k1_ec_privkey_import(instance_of_csecp256k1.ctx, (unsigned char*)begin(), &privkey[0], privkey.size()))
                                                                                                                      ^
key.cpp: In member function ‘CPrivKey CKey::GetPrivKey() const’:

key.cpp:491:66: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’
     int ret = secp256k1_ec_privkey_export(instance_of_csecp256k1.ctx, begin(), (unsigned char*)&privkey[0], &privkeylen, fCompressed);
                                                                  ^
key.cpp:491:133: error: ‘secp256k1_ec_privkey_export’ was not declared in this scope
     int ret = secp256k1_ec_privkey_export(instance_of_csecp256k1.ctx, begin(), (unsigned char*)&privkey[0], &privkeylen, fCompressed);
                                                                                                                                     ^
key.cpp: In member function ‘CPubKey CKey::GetPubKey() const’:

key.cpp:507:65: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’
     int ret = secp256k1_ec_pubkey_create(instance_of_csecp256k1.ctx, (unsigned char*)pubkey.begin(), &clen, begin(), fCompressed);
                                                                 ^
key.cpp: In member function ‘bool CKey::Sign(const uint256&, std::vector<unsigned char>&) const’:

key.cpp:529:57: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’
         if (secp256k1_ecdsa_sign(instance_of_csecp256k1.ctx, hash.begin(), (unsigned char*)&vchSig[0], &nSigLen, begin(),  secp256k1_nonce_function_rfc6979, NULL))
                                                         ^
key.cpp: In member function ‘bool CKey::SignCompact(const uint256&, std::vector<unsigned char>&) const’:

key.cpp:553:75: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’
         if (int ret = secp256k1_ecdsa_sign_compact(instance_of_csecp256k1.ctx, hash.begin(), &vchSig[1], begin(), secp256k1_nonce_function_rfc6979, NULL, &rec))
                                                                           ^
key.cpp:553:159: error: ‘secp256k1_ecdsa_sign_compact’ was not declared in this scope
         if (int ret = secp256k1_ecdsa_sign_compact(instance_of_csecp256k1.ctx, hash.begin(), &vchSig[1], begin(), secp256k1_nonce_function_rfc6979, NULL, &rec))
                                                                                                                                                               ^

key.cpp:553:17: warning: unused variable ‘ret’ [-Wunused-variable]
         if (int ret = secp256k1_ecdsa_sign_compact(instance_of_csecp256k1.ctx, hash.begin(), &vchSig[1], begin(), secp256k1_nonce_function_rfc6979, NULL, &rec))
                 ^

key.cpp: In member function ‘bool CKey::Load(CPrivKey&, CPubKey&, bool)’:

key.cpp:569:61: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’
     if (!secp256k1_ec_privkey_import(instance_of_csecp256k1.ctx, (unsigned char*)begin(), &privkey[0], privkey.size()))
                                                             ^

key.cpp:569:118: error: ‘secp256k1_ec_privkey_import’ was not declared in this scope
     if (!secp256k1_ec_privkey_import(instance_of_csecp256k1.ctx, (unsigned char*)begin(), &privkey[0], privkey.size()))
                                                                                                                      ^
key.cpp: In member function ‘bool CPubKey::VerifyCompact(const uint256&, const std::vector<unsigned char>&) const’:

key.cpp:633:10: warning: unused variable ‘fComp’ [-Wunused-variable]
     bool fComp = IsCompressed();
          ^

key.cpp: In member function ‘bool CPubKey::IsFullyValid() const’:

key.cpp:655:60: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’
     if (!secp256k1_ec_pubkey_verify(instance_of_csecp256k1.ctx, begin(), size()))
                                                            ^

key.cpp:655:80: error: ‘secp256k1_ec_pubkey_verify’ was not declared in this scope
     if (!secp256k1_ec_pubkey_verify(instance_of_csecp256k1.ctx, begin(), size()))
                                                                                ^

key.cpp: In member function ‘bool CPubKey::Decompress()’:

key.cpp:670:69: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’

int ret = secp256k1_ec_pubkey_decompress(instance_of_csecp256k1.ctx, (unsigned char*)begin(), &clen);
                                                                     ^
key.cpp:670:104: error: ‘secp256k1_ec_pubkey_decompress’ was not declared in this scope

int ret = secp256k1_ec_pubkey_decompress(instance_of_csecp256k1.ctx, (unsigned char*)begin(), &clen);
                                                                                                        ^
key.cpp: In member function ‘bool CKey::Derive(CKey&, unsigned char*, unsigned int, const unsigned char*) const’:

key.cpp:712:70: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’

bool ret = secp256k1_ec_privkey_tweak_add(instance_of_csecp256k1.ctx, (unsigned char*)keyChild.begin(), out);
                                                                      ^
key.cpp: In member function ‘bool CPubKey::Derive(CPubKey&, unsigned char*, unsigned int, const unsigned char*) const’:

key.cpp:731:69: error: ‘class {anonymous}::CSecp256k1Init’ has no member named ‘ctx’
     bool ret = secp256k1_ec_pubkey_tweak_add(instance_of_csecp256k1.ctx, (unsigned char*)pubkeyChild.begin(), pubkeyChild.size(), out);
                                                                     ^

makefile.unix:206: recipe for target 'obj/key.o' failed

make: *** [obj/key.o] Error 1

I have been trying to debug but I cant seem to get anywhere, can someone please help me out?

Thanks.

Nick ODell
  • 29,184
  • 11
  • 69
  • 129
user54097
  • 1
  • 1

1 Answers1

-1

1) Make new folders called obj and obj-test inside the src folder

2) Try to recompile

meshcollider
  • 11,695
  • 4
  • 24
  • 52