TigerStripeRIT / TigerStripe

A Decentralized, Peer-to-Peer Cryptocurrency for RIT
MIT License
0 stars 0 forks source link

Error: cannot build; related to BigNum #2

Open Navigatron opened 5 years ago

Navigatron commented 5 years ago

Hello! I tried to build, but unfortunately it failed. Is this an issue on my end?

  1. Cloned the repo
  2. CD into src/
  3. make -f makefile.unix

Here's the last few screens of output. The only errors I saw related to CBigNum or BIGNUM.

Also, I am interested in this project in relation to the Blockchain Technology Club on campus. I would love to talk to someone about this project. Please contact me at etw9578

In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In member function ‘CBigNum& CBigNum::operator*=(const CBigNum&)’:
bignum.h:434:41: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  434 |         if (!BN_mul(this, this, &b, pctx))
      |                                         ^
      |                                         |
      |                                         CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:232:20: note:   initializing argument 1 of ‘int BN_mul(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
  232 | int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
      |            ~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In member function ‘CBigNum& CBigNum::operator<<=(unsigned int)’:
bignum.h:453:41: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  453 |         if (!BN_lshift(this, this, shift))
      |                                         ^
      |                                         |
      |                                         CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:277:23: note:   initializing argument 1 of ‘int BN_lshift(BIGNUM*, const BIGNUM*, int)’
  277 | int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
      |               ~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In member function ‘CBigNum& CBigNum::operator>>=(unsigned int)’:
bignum.h:464:20: error: cannot convert ‘CBigNum*’ to ‘const BIGNUM*’ {aka ‘const bignum_st*’}
  464 |         if (BN_cmp(&a, this) > 0)
      |                    ^~
      |                    |
      |                    CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:274:26: note:   initializing argument 1 of ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
  274 | int BN_cmp(const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h:470:41: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  470 |         if (!BN_rshift(this, this, shift))
      |                                         ^
      |                                         |
      |                                         CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:302:23: note:   initializing argument 1 of ‘int BN_rshift(BIGNUM*, const BIGNUM*, int)’
  302 | int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
      |               ~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In member function ‘CBigNum& CBigNum::operator++()’:
bignum.h:479:47: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  479 |         if (!BN_add(this, this, BN_value_one()))
      |                                               ^
      |                                               |
      |                                               CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:231:20: note:   initializing argument 1 of ‘int BN_add(BIGNUM*, const BIGNUM*, const BIGNUM*)’
  231 | int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In member function ‘CBigNum& CBigNum::operator--()’:
bignum.h:496:21: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  496 |         if (!BN_sub(&r, this, BN_value_one()))
      |                     ^~
      |                     |
      |                     CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:228:20: note:   initializing argument 1 of ‘int BN_sub(BIGNUM*, const BIGNUM*, const BIGNUM*)’
  228 | int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘const CBigNum operator+(const CBigNum&, const CBigNum&)’:
bignum.h:521:17: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  521 |     if (!BN_add(&r, &a, &b))
      |                 ^~
      |                 |
      |                 CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:231:20: note:   initializing argument 1 of ‘int BN_add(BIGNUM*, const BIGNUM*, const BIGNUM*)’
  231 | int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘const CBigNum operator-(const CBigNum&, const CBigNum&)’:
bignum.h:529:17: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  529 |     if (!BN_sub(&r, &a, &b))
      |                 ^~
      |                 |
      |                 CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:228:20: note:   initializing argument 1 of ‘int BN_sub(BIGNUM*, const BIGNUM*, const BIGNUM*)’
  228 | int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘const CBigNum operator-(const CBigNum&)’:
bignum.h:537:41: error: cannot convert ‘CBigNum*’ to ‘const BIGNUM*’ {aka ‘const bignum_st*’}
  537 |     BN_set_negative(&r, !BN_is_negative(&r));
      |                                         ^~
      |                                         |
      |                                         CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:243:34: note:   initializing argument 1 of ‘int BN_is_negative(const BIGNUM*)’
  243 | int BN_is_negative(const BIGNUM *b);
      |                    ~~~~~~~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘const CBigNum operator*(const CBigNum&, const CBigNum&)’:
bignum.h:545:17: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  545 |     if (!BN_mul(&r, &a, &b, pctx))
      |                 ^~
      |                 |
      |                 CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:232:20: note:   initializing argument 1 of ‘int BN_mul(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
  232 | int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
      |            ~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘const CBigNum operator/(const CBigNum&, const CBigNum&)’:
bignum.h:554:17: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  554 |     if (!BN_div(&r, NULL, &a, &b, pctx))
      |                 ^~
      |                 |
      |                 CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:245:20: note:   initializing argument 1 of ‘int BN_div(BIGNUM*, BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
  245 | int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
      |            ~~~~~~~~^~
bignum.h: In function ‘const CBigNum operator%(const CBigNum&, const CBigNum&)’:
bignum.h:563:17: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  563 |     if (!BN_mod(&r, &a, &b, pctx))
      |                 ^
      |                 |
      |                 CBigNum*
/usr/include/openssl/bn.h:245:32: note:   initializing argument 2 of ‘int BN_div(BIGNUM*, BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
  245 | int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
      |                        ~~~~~~~~^~~
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘const CBigNum operator<<(const CBigNum&, unsigned int)’:
bignum.h:571:20: error: cannot convert ‘CBigNum*’ to ‘BIGNUM*’ {aka ‘bignum_st*’}
  571 |     if (!BN_lshift(&r, &a, shift))
      |                    ^~
      |                    |
      |                    CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:277:23: note:   initializing argument 1 of ‘int BN_lshift(BIGNUM*, const BIGNUM*, int)’
  277 | int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
      |               ~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘bool operator==(const CBigNum&, const CBigNum&)’:
bignum.h:583:77: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM*’ {aka ‘const bignum_st*’}
  583 | inline bool operator==(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) == 0); }
      |                                                                             ^~
      |                                                                             |
      |                                                                             const CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:274:26: note:   initializing argument 1 of ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
  274 | int BN_cmp(const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘bool operator!=(const CBigNum&, const CBigNum&)’:
bignum.h:584:77: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM*’ {aka ‘const bignum_st*’}
  584 | inline bool operator!=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) != 0); }
      |                                                                             ^~
      |                                                                             |
      |                                                                             const CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:274:26: note:   initializing argument 1 of ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
  274 | int BN_cmp(const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘bool operator<=(const CBigNum&, const CBigNum&)’:
bignum.h:585:77: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM*’ {aka ‘const bignum_st*’}
  585 | inline bool operator<=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) <= 0); }
      |                                                                             ^~
      |                                                                             |
      |                                                                             const CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:274:26: note:   initializing argument 1 of ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
  274 | int BN_cmp(const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘bool operator>=(const CBigNum&, const CBigNum&)’:
bignum.h:586:77: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM*’ {aka ‘const bignum_st*’}
  586 | inline bool operator>=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) >= 0); }
      |                                                                             ^~
      |                                                                             |
      |                                                                             const CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:274:26: note:   initializing argument 1 of ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
  274 | int BN_cmp(const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘bool operator<(const CBigNum&, const CBigNum&)’:
bignum.h:587:77: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM*’ {aka ‘const bignum_st*’}
  587 | inline bool operator<(const CBigNum& a, const CBigNum& b)  { return (BN_cmp(&a, &b) < 0); }
      |                                                                             ^~
      |                                                                             |
      |                                                                             const CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:274:26: note:   initializing argument 1 of ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
  274 | int BN_cmp(const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~~~~~~~^
In file included from main.h:8,
                 from checkpoints.cpp:10:
bignum.h: In function ‘bool operator>(const CBigNum&, const CBigNum&)’:
bignum.h:588:77: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM*’ {aka ‘const bignum_st*’}
  588 | inline bool operator>(const CBigNum& a, const CBigNum& b)  { return (BN_cmp(&a, &b) > 0); }
      |                                                                             ^~
      |                                                                             |
      |                                                                             const CBigNum*
In file included from bignum.h:10,
                 from main.h:8,
                 from checkpoints.cpp:10:
/usr/include/openssl/bn.h:274:26: note:   initializing argument 1 of ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
  274 | int BN_cmp(const BIGNUM *a, const BIGNUM *b);
      |            ~~~~~~~~~~~~~~^
In file included from script.h:14,
                 from main.h:11,
                 from checkpoints.cpp:10:
keystore.h: In member function ‘virtual bool CBasicKeyStore::GetKey(const CKeyID&, CKey&) const’:
keystore.h:80:30: warning: implicitly-declared ‘constexpr CKey& CKey::operator=(const CKey&)’ is deprecated [-Wdeprecated-copy]
   80 |                 keyOut = mi->second;
      |                              ^~~~~~
In file included from crypter.h:8,
                 from keystore.h:8,
                 from script.h:14,
                 from main.h:11,
                 from checkpoints.cpp:10:
key.h:194:5: note: because ‘CKey’ has user-provided ‘CKey::CKey(const CKey&)’
  194 |     CKey(const CKey &secret) : fValid(secret.fValid), fCompressed(secret.fCompressed) {
      |     ^~~~
In file included from checkpoints.cpp:10:
main.h: In constructor ‘CTxIn::CTxIn(COutPoint, CScript, unsigned int)’:
main.h:335:21: warning: implicitly-declared ‘CScript& CScript::operator=(const CScript&)’ is deprecated [-Wdeprecated-copy]
  335 |         scriptSig = scriptSigIn;
      |                     ^~~~~~~~~~~
In file included from main.h:11,
                 from checkpoints.cpp:10:
script.h:277:5: note: because ‘CScript’ has user-provided ‘CScript::CScript(const CScript&)’
  277 |     CScript(const CScript& b) : std::vector<unsigned char>(b.begin(), b.end()) { }
      |     ^~~~~~~
In file included from checkpoints.cpp:10:
main.h: In constructor ‘CTxIn::CTxIn(uint256, unsigned int, CScript, unsigned int)’:
main.h:342:21: warning: implicitly-declared ‘CScript& CScript::operator=(const CScript&)’ is deprecated [-Wdeprecated-copy]
  342 |         scriptSig = scriptSigIn;
      |                     ^~~~~~~~~~~
In file included from main.h:11,
                 from checkpoints.cpp:10:
script.h:277:5: note: because ‘CScript’ has user-provided ‘CScript::CScript(const CScript&)’
  277 |     CScript(const CScript& b) : std::vector<unsigned char>(b.begin(), b.end()) { }
      |     ^~~~~~~
In file included from checkpoints.cpp:10:
main.h: In constructor ‘CTxOut::CTxOut(int64, CScript)’:
main.h:411:24: warning: implicitly-declared ‘CScript& CScript::operator=(const CScript&)’ is deprecated [-Wdeprecated-copy]
  411 |         scriptPubKey = scriptPubKeyIn;
      |                        ^~~~~~~~~~~~~~
In file included from main.h:11,
                 from checkpoints.cpp:10:
script.h:277:5: note: because ‘CScript’ has user-provided ‘CScript::CScript(const CScript&)’
  277 |     CScript(const CScript& b) : std::vector<unsigned char>(b.begin(), b.end()) { }
      |     ^~~~~~~
In file included from checkpoints.cpp:10:
main.h: In member function ‘CTxOut& CTxOut::operator=(CTxOut&&)’:
main.h:397:7: warning: implicitly-declared ‘CScript& CScript::operator=(const CScript&)’ is deprecated [-Wdeprecated-copy]
  397 | class CTxOut
      |       ^~~~~~
In file included from main.h:11,
                 from checkpoints.cpp:10:
script.h:277:5: note: because ‘CScript’ has user-provided ‘CScript::CScript(const CScript&)’
  277 |     CScript(const CScript& b) : std::vector<unsigned char>(b.begin(), b.end()) { }
      |     ^~~~~~~
In file included from checkpoints.cpp:10:
main.h: In member function ‘CTxInUndo& CTxInUndo::operator=(CTxInUndo&&)’:
main.h:726:7: note: synthesized method ‘CTxOut& CTxOut::operator=(CTxOut&&)’ first required here
  726 | class CTxInUndo
      |       ^~~~~~~~~
main.h: In member function ‘bool CCoins::Spend(const COutPoint&, CTxInUndo&)’:
main.h:1061:37: note: synthesized method ‘CTxInUndo& CTxInUndo::operator=(CTxInUndo&&)’ first required here
 1061 |         undo = CTxInUndo(vout[out.n]);
      |                                     ^
make: *** [makefile.unix:186: obj/checkpoints.o] Error 1
AkiAfroo commented 5 years ago

im not part of the team but what OS are you using? in ubuntu try: sudo apt install libssl1.0-dev