FeatherCoin / Feathercoin

https://feathercoin.com
MIT License
128 stars 124 forks source link

bignum-related build errors in 0.9.6.1 after OpenSSL upgrade #177

Closed allesklaar closed 6 years ago

allesklaar commented 7 years ago

This is Arch Linux. The OpenSSL version here currently is 1.1.0.e. With this version Feathercoin 0.9.6.1 branch fails to build as follows:

./autogen.sh
./configure --with-qrcode=no --with-incompatible-bdb
make
make[3]: Entering directory '/home/dane/software/gnu_linux/feathercoin/Feathercoin/src'
  CXX      addrman.o
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h:58:24: error: invalid use of incomplete type 'BIGNUM {aka struct bignum_st}'
 class CBigNum : public BIGNUM
                        ^~~~~~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from allocators.h:15,
                 from serialize.h:9,
                 from netbase.h:13,
                 from addrman.h:8,
                 from addrman.cpp:5:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'BIGNUM {aka struct bignum_st}'
 typedef struct bignum_st BIGNUM;
                ^~~~~~~~~
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In constructor 'CBigNum::CBigNum()':
bignum.h:63:21: error: 'BN_init' was not declared in this scope
         BN_init(this);
                     ^
bignum.h: In copy constructor 'CBigNum::CBigNum(const CBigNum&)':
bignum.h:68:21: error: 'BN_init' was not declared in this scope
         BN_init(this);
                     ^
bignum.h:69:30: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'BIGNUM* BN_copy(BIGNUM*, const BIGNUM*)'
         if (!BN_copy(this, &b))
                              ^
bignum.h:71:31: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'void BN_clear_free(BIGNUM*)'
             BN_clear_free(this);
                               ^
bignum.h: In member function 'CBigNum& CBigNum::operator=(const CBigNum&)':
bignum.h:78:30: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'BIGNUM* BN_copy(BIGNUM*, const BIGNUM*)'
         if (!BN_copy(this, &b))
                              ^
bignum.h: In destructor 'CBigNum::~CBigNum()':
bignum.h:85:27: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'void BN_clear_free(BIGNUM*)'
         BN_clear_free(this);
                           ^
bignum.h: In constructor 'CBigNum::CBigNum(signed char)':
bignum.h:89:49: error: 'BN_init' was not declared in this scope
     CBigNum(signed char n)        { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(short int)':
bignum.h:90:49: error: 'BN_init' was not declared in this scope
     CBigNum(short n)              { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(int)':
bignum.h:91:49: error: 'BN_init' was not declared in this scope
     CBigNum(int n)                { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(long int)':
bignum.h:92:49: error: 'BN_init' was not declared in this scope
     CBigNum(long n)               { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(long long int)':
bignum.h:93:49: error: 'BN_init' was not declared in this scope
     CBigNum(long long n)          { BN_init(this); setint64(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(unsigned char)':
bignum.h:94:49: error: 'BN_init' was not declared in this scope
     CBigNum(unsigned char n)      { BN_init(this); setulong(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(short unsigned int)':
bignum.h:95:49: error: 'BN_init' was not declared in this scope
     CBigNum(unsigned short n)     { BN_init(this); setulong(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(unsigned int)':
bignum.h:96:49: error: 'BN_init' was not declared in this scope
     CBigNum(unsigned int n)       { BN_init(this); setulong(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(long unsigned int)':
bignum.h:97:49: error: 'BN_init' was not declared in this scope
     CBigNum(unsigned long n)      { BN_init(this); setulong(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(long long unsigned int)':
bignum.h:98:49: error: 'BN_init' was not declared in this scope
     CBigNum(unsigned long long n) { BN_init(this); setuint64(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(uint256)':
bignum.h:99:49: error: 'BN_init' was not declared in this scope
     explicit CBigNum(uint256 n)   { BN_init(this); setuint256(n); }
                                                 ^
bignum.h: In constructor 'CBigNum::CBigNum(const std::vector<unsigned char>&)':
bignum.h:103:21: error: 'BN_init' was not declared in this scope
         BN_init(this);
                     ^
bignum.h: In member function 'void CBigNum::setulong(long unsigned int)':
bignum.h:109:33: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_set_word(BIGNUM*, long unsigned int)'
         if (!BN_set_word(this, n))
                                 ^
bignum.h: In member function 'long unsigned int CBigNum::getulong() const':
bignum.h:115:32: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'long unsigned int BN_get_word(const BIGNUM*)'
         return BN_get_word(this);
                                ^
bignum.h: In member function 'unsigned int CBigNum::getuint() const':
bignum.h:120:32: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'long unsigned int BN_get_word(const BIGNUM*)'
         return BN_get_word(this);
                                ^
bignum.h: In member function 'int CBigNum::getint() const':
bignum.h:125:43: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'long unsigned int BN_get_word(const BIGNUM*)'
         unsigned long n = BN_get_word(this);
                                           ^
bignum.h:126:33: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_is_negative(const BIGNUM*)'
         if (!BN_is_negative(this))
                                 ^
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In member function 'void CBigNum::setint64(int64_t)':
bignum.h:174:37: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '3' to 'BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)'
         BN_mpi2bn(pch, p - pch, this);
                                     ^
bignum.h: In member function 'void CBigNum::setuint64(uint64_t)':
bignum.h:201:37: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '3' to 'BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)'
         BN_mpi2bn(pch, p - pch, this);
                                     ^
bignum.h: In member function 'void CBigNum::setuint256(uint256)':
bignum.h:229:37: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '3' to 'BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)'
         BN_mpi2bn(pch, p - pch, this);
                                     ^
bignum.h: In member function 'uint256 CBigNum::getuint256() const':
bignum.h:234:50: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_bn2mpi(const BIGNUM*, unsigned char*)'
         unsigned int nSize = BN_bn2mpi(this, NULL);
                                                  ^
bignum.h:238:32: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_bn2mpi(const BIGNUM*, unsigned char*)'
         BN_bn2mpi(this, &vch[0]);
                                ^
bignum.h: In member function 'void CBigNum::setvch(const std::vector<unsigned char>&)':
bignum.h:259:46: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '3' to 'BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)'
         BN_mpi2bn(&vch2[0], vch2.size(), this);
                                              ^
bignum.h: In member function 'std::vector<unsigned char> CBigNum::getvch() const':
bignum.h:264:50: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_bn2mpi(const BIGNUM*, unsigned char*)'
         unsigned int nSize = BN_bn2mpi(this, NULL);
                                                  ^
bignum.h:268:32: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_bn2mpi(const BIGNUM*, unsigned char*)'
         BN_bn2mpi(this, &vch[0]);
                                ^
bignum.h: In member function 'CBigNum& CBigNum::SetCompact(unsigned int)':
bignum.h:304:36: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_set_word(BIGNUM*, long unsigned int)'
             BN_set_word(this, nWord);
                                    ^
bignum.h:308:36: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_set_word(BIGNUM*, long unsigned int)'
             BN_set_word(this, nWord);
                                    ^
bignum.h:309:46: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_lshift(BIGNUM*, const BIGNUM*, int)'
             BN_lshift(this, this, 8*(nSize-3));
                                              ^
bignum.h:311:40: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'void BN_set_negative(BIGNUM*, int)'
         BN_set_negative(this, fNegative);
                                        ^
In file included from bignum.h:17:0,
                 from chainparams.h:9,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In member function 'unsigned int CBigNum::GetCompact() const':
bignum.h:317:30: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_num_bits(const BIGNUM*)'
         unsigned int nSize = BN_num_bytes(this);
                              ^
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h:320:40: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'long unsigned int BN_get_word(const BIGNUM*)'
             nCompact = BN_get_word(this) << 8*(3-nSize);
                                        ^
bignum.h:324:45: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_rshift(BIGNUM*, const BIGNUM*, int)'
             BN_rshift(&bn, this, 8*(nSize-3));
                                             ^
bignum.h:325:39: error: cannot convert 'CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'long unsigned int BN_get_word(const BIGNUM*)'
             nCompact = BN_get_word(&bn);
                                       ^
bignum.h:335:41: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_is_negative(const BIGNUM*)'
         nCompact |= (BN_is_negative(this) ? 0x00800000 : 0);
                                         ^
bignum.h: In member function 'std::__cxx11::string CBigNum::ToString(int) const':
bignum.h:376:35: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'void BN_set_negative(BIGNUM*, int)'
         BN_set_negative(&bn, false);
                                   ^
bignum.h:379:29: error: cannot convert 'CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_cmp(const BIGNUM*, const BIGNUM*)'
         if (BN_cmp(&bn, &bn0) == 0)
                             ^
bignum.h:381:32: error: cannot convert 'CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_cmp(const BIGNUM*, const BIGNUM*)'
         while (BN_cmp(&bn, &bn0) > 0)
                                ^
bignum.h:383:54: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_div(BIGNUM*, BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)'
             if (!BN_div(&dv, &rem, &bn, &bnBase, pctx))
                                                      ^
bignum.h:389:32: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_is_negative(const BIGNUM*)'
         if (BN_is_negative(this))
                                ^
bignum.h: In member function 'bool CBigNum::operator!() const':
bignum.h:422:31: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_is_zero(const BIGNUM*)'
         return BN_is_zero(this);
                               ^
bignum.h: In member function 'CBigNum& CBigNum::operator+=(const CBigNum&)':
bignum.h:427:35: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_add(BIGNUM*, const BIGNUM*, const BIGNUM*)'
         if (!BN_add(this, this, &b))
                                   ^
bignum.h: In member function 'CBigNum& CBigNum::operator*=(const CBigNum&)':
bignum.h:441:41: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_mul(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)'
         if (!BN_mul(this, this, &b, pctx))
                                         ^
bignum.h: In member function 'CBigNum& CBigNum::operator<<=(unsigned int)':
bignum.h:460:41: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_lshift(BIGNUM*, const BIGNUM*, int)'
         if (!BN_lshift(this, this, shift))
                                         ^
bignum.h: In member function 'CBigNum& CBigNum::operator>>=(unsigned int)':
bignum.h:471:28: error: cannot convert 'CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_cmp(const BIGNUM*, const BIGNUM*)'
         if (BN_cmp(&a, this) > 0)
                            ^
bignum.h:477:41: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_rshift(BIGNUM*, const BIGNUM*, int)'
         if (!BN_rshift(this, this, shift))
                                         ^
bignum.h: In member function 'CBigNum& CBigNum::operator++()':
bignum.h:486:47: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_add(BIGNUM*, const BIGNUM*, const BIGNUM*)'
         if (!BN_add(this, this, BN_value_one()))
                                               ^
bignum.h: In member function 'CBigNum& CBigNum::operator--()':
bignum.h:503:45: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_sub(BIGNUM*, const BIGNUM*, const BIGNUM*)'
         if (!BN_sub(&r, this, BN_value_one()))
                                             ^
bignum.h: In function 'const CBigNum operator+(const CBigNum&, const CBigNum&)':
bignum.h:528:27: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_add(BIGNUM*, const BIGNUM*, const BIGNUM*)'
     if (!BN_add(&r, &a, &b))
                           ^
bignum.h: In function 'const CBigNum operator-(const CBigNum&, const CBigNum&)':
bignum.h:536:27: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_sub(BIGNUM*, const BIGNUM*, const BIGNUM*)'
     if (!BN_sub(&r, &a, &b))
                           ^
bignum.h: In function 'const CBigNum operator-(const CBigNum&)':
bignum.h:544:43: error: cannot convert 'CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_is_negative(const BIGNUM*)'
     BN_set_negative(&r, !BN_is_negative(&r));
                                           ^
bignum.h: In function 'const CBigNum operator*(const CBigNum&, const CBigNum&)':
bignum.h:552:33: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_mul(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)'
     if (!BN_mul(&r, &a, &b, pctx))
                                 ^
bignum.h: In function 'const CBigNum operator/(const CBigNum&, const CBigNum&)':
bignum.h:561:39: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_div(BIGNUM*, BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)'
     if (!BN_div(&r, NULL, &a, &b, pctx))
                                       ^
In file included from bignum.h:17:0,
                 from chainparams.h:9,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In function 'const CBigNum operator%(const CBigNum&, const CBigNum&)':
bignum.h:570:10: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '2' to 'int BN_div(BIGNUM*, BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)'
     if (!BN_mod(&r, &a, &b, pctx))
          ^
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In function 'const CBigNum operator<<(const CBigNum&, unsigned int)':
bignum.h:578:33: error: cannot convert 'CBigNum*' to 'BIGNUM* {aka bignum_st*}' for argument '1' to 'int BN_lshift(BIGNUM*, const BIGNUM*, int)'
     if (!BN_lshift(&r, &a, shift))
                                 ^
bignum.h: In function 'bool operator==(const CBigNum&, const CBigNum&)':
bignum.h:590:83: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_cmp(const BIGNUM*, const BIGNUM*)'
 inline bool operator==(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) == 0); }
                                                                                   ^
bignum.h: In function 'bool operator!=(const CBigNum&, const CBigNum&)':
bignum.h:591:83: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_cmp(const BIGNUM*, const BIGNUM*)'
 inline bool operator!=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) != 0); }
                                                                                   ^
bignum.h: In function 'bool operator<=(const CBigNum&, const CBigNum&)':
bignum.h:592:83: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_cmp(const BIGNUM*, const BIGNUM*)'
 inline bool operator<=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) <= 0); }
                                                                                   ^
bignum.h: In function 'bool operator>=(const CBigNum&, const CBigNum&)':
bignum.h:593:83: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_cmp(const BIGNUM*, const BIGNUM*)'
 inline bool operator>=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) >= 0); }
                                                                                   ^
bignum.h: In function 'bool operator<(const CBigNum&, const CBigNum&)':
bignum.h:594:83: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_cmp(const BIGNUM*, const BIGNUM*)'
 inline bool operator<(const CBigNum& a, const CBigNum& b)  { return (BN_cmp(&a, &b) < 0); }
                                                                                   ^
bignum.h: In function 'bool operator>(const CBigNum&, const CBigNum&)':
bignum.h:595:83: error: cannot convert 'const CBigNum*' to 'const BIGNUM* {aka const bignum_st*}' for argument '1' to 'int BN_cmp(const BIGNUM*, const BIGNUM*)'
 inline bool operator>(const CBigNum& a, const CBigNum& b)  { return (BN_cmp(&a, &b) > 0); }
                                                                                   ^
make[3]: *** [Makefile:900: addrman.o] Error 1
make[3]: Leaving directory '/home/dane/software/gnu_linux/feathercoin/Feathercoin/src'
make[2]: *** [Makefile:922: all-recursive] Error 1
make[2]: Leaving directory '/home/dane/software/gnu_linux/feathercoin/Feathercoin/src'
make[1]: *** [Makefile:676: all] Error 2
make[1]: Leaving directory '/home/dane/software/gnu_linux/feathercoin/Feathercoin/src'
make: *** [Makefile:511: all-recursive] Error 1
wrapperband commented 7 years ago

Just a note on research so far. This (BIGNUM) issue seems related to compatibility with SLL and the move to 0.13 in other (coin) cases. https://github.com/bitcoin/bitcoin/issues/7086

Seems weird to appear on 0.9.6.1 (at this stage) - ToDo : Is there a problem with the ssl on Arch?

wrapperband commented 7 years ago

Looks like we need to remove this (particular) test for openssl (as it is unnecessary, openssl not used in this code any more).

https://github.com/laanwj/bitcoin/commit/4ec3561eb3473638230ef780b41343bc6284b460

ToDo

  1. Confim FTC 0.9.6.1 builds with (recommended version ) of ssl
  2. Confirm removing test (for ssl compatibility) has no adverse consequences
  3. Push test removal
aciddude commented 7 years ago

The error @allesklaar has posted it doesn't mention the tests.

I think It's building this file: https://github.com/FeatherCoin/Feathercoin/blob/0.9.6.1/src/bignum.h

in Bitcoin version 0.10 they removed the need for bignum.h

That change involved 753 changed files with 92,498 additions and 145,765 deletions. https://github.com/bitcoin/bitcoin/compare/0.9...0.10

I believe this might only be fixed when we move to 0.11+ @wellenreiter01 or @cqtenq might be able to confirm.

wellenreiter01 commented 7 years ago

Issue exists for all 0.9.x versions. OS known with problems:

allesklaar commented 7 years ago

Any chances this will ever be fixed? For months now it's been impossible to build FeatherCoin, be it 0.9.6.1, 0.9.6.2 or 0.11.2 on Arch.

wrapperband commented 7 years ago

Try this? - Create file build.sh with:

export PKG_CONFIG_PATH="/usr/lib/openssl-1.0/pkgconfig" //CHANGE TO OWN OPENSSL PATH export CXXFLAGS+=" -I/usr/include/openssl-1.0" //CHANGE TO OWN OPENSSL PATH export LDFLAGS+=" -L/usr/lib/openssl-1.0 -lssl" //CHANGE TO OWN OPENSSL PATH

./autogen.sh ./configure make -j4

and run: ./build.sh

mestaritonttu commented 6 years ago

I managed to get past the errors by adapting changes from other projects:

bignum.h, two commits: https://github.com/zcoinofficial/zcoin/pull/111

Note that the content of the block starting with "//CBigNum(char n) is not portable" differs, so change only existing instances of BN_init(this) to init().

Also ignore other blocks that do no exist in Feathercoin's version.

crypter.cpp and key.cpp (ecwrapper.cpp): https://github.com/thegreatoldone/skidoo/pull/7

I found the skidoo pull request after I had already modified my bignum.h according to the zcoin changes and don't have any idea, if the bignum.h version of the skidoo PR would be more appropriate.

I hope an actual dev can review these and integrate.

mestaritonttu commented 6 years ago

I got another error in qt/paymentrequestplus.cpp and got past it by imitating the change in crypter.cpp, changing the EVP_MD_CTX block like so:

        EVP_MD_CTX *ctx = EVP_MD_CTX_new();
        EVP_PKEY *pubkey = X509_get_pubkey(signing_cert);
        EVP_MD_CTX_init(ctx);
        if (!EVP_VerifyInit_ex(ctx, digestAlgorithm, NULL) ||
            !EVP_VerifyUpdate(ctx, data_to_verify.data(), data_to_verify.size()) ||
            !EVP_VerifyFinal(ctx, (const unsigned char*)paymentRequest.signature().data(), paymentRequest.signature().size(), pubkey)) {

Edit: this is also something to check: https://github.com/terracoin/terracoin/commit/af1177dd54623ed562a8f8d4f8fba89efc88db1a

aciddude commented 6 years ago

https://github.com/peercoin/peercoin/commit/5b09830e5de0f5105534e69dbf4acffb3255869b

should fix it.

sassman commented 6 years ago

under debian it was possible to install an older libssl-dev lib

sudo apt-get install libssl1.0-dev

wellenreiter01 commented 6 years ago

There is a work around in 0.13:

NaomiRiv commented 6 years ago

I have the same problem on arch @allesklaar

Bushstar commented 6 years ago

Compile using the depends folder which provides all required dependencies.

Compiling 64bit Linux daemon

cd depends/
make HOST=x86_64-pc-linux-gnu
cd ..
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu --enable-static --disable-shared
make
mradkov commented 6 years ago

My issue was fixed using @sassman 's suggestion of using older version of libssl-dev.

thirstygerry commented 6 years ago

@sassman 's suggestion of using the older version of libssl-dev resolved the issue for me as well

SoraKohaku commented 6 years ago

fixed nice!

daxxog commented 5 years ago

@sassman 's suggestion helped me compile the CLAM client on raspberry pi!

dooglus commented 5 years ago

I have made a few commits on the 2.1.0 branch which should allow you to build against the current version of OpenSSL.

Please try it and let me know how it goes.

SoraKohaku commented 5 years ago

you need update bignum issue

bn = BN_new(); then on variable if (!BN_copy(bn, b.bn))

this example~

https://github.com/Nur1Labs/smol/blob/master/src/bignum.h

note don't copy all files just important variable