Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile StratisX on raspbian stretch lite #33

Closed
JKGHPO opened this issue Aug 25, 2017 · 5 comments
Closed

Can't compile StratisX on raspbian stretch lite #33

JKGHPO opened this issue Aug 25, 2017 · 5 comments

Comments

@JKGHPO
Copy link

JKGHPO commented Aug 25, 2017

Hi All,

We are following the guide very kindly created here:

https://olcko.gitbooks.io/staking-stratis-on-a-raspberry-pi/content/

But with the newest versio of Raspbian Stretch, we can't compile stratisX

Error message as below:

"Next, we build the wallet This is literally a one step operation by running the following command:
cd src && make -f makefile.unix"

cd src && make -f makefile.unix
g++ -c -O2  -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/home/pi/stratisX/src -I/home/pi/stratisX/src/obj -DUSE_UPNP=0 -DENABLE_WALLET -I/home/pi/stratisX/src/leveldb/include -I/home/pi/stratisX/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/alert.d -o obj/alert.o alert.cpp
In file included from chainparams.h:9:0,
                from alert.cpp:7:
bignum.h:57: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:12,
                from serialize.h:22,
                from alert.h:9,
                from alert.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 alert.cpp:7:
bignum.h: In constructor ‘CBigNum::CBigNum()’:
bignum.h:62:21: error: ‘BN_init’ was not declared in this scope
        BN_init(this);
                    ^
bignum.h: In copy constructor ‘CBigNum::CBigNum(const CBigNum&)’:
bignum.h:67:21: error: ‘BN_init’ was not declared in this scope
        BN_init(this);
                    ^
bignum.h:68: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:70: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:77: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:84: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:88: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:89: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:90: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:91: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:92: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:93: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:94: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:95: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:96: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:97: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:98: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:102:21: error: ‘BN_init’ was not declared in this scope
        BN_init(this);
                    ^
bignum.h: In static member function ‘static CBigNum CBigNum::randBignum(const CBigNum&)’:
bignum.h:113:39: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_rand_range(BIGNUM*, const BIGNUM*)’
        if(!BN_rand_range(&ret, &range)){
                                      ^
bignum.h: In static member function ‘static CBigNum CBigNum::RandKBitBigum(uint32_t)’:
bignum.h:125:35: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_rand(BIGNUM*, int, int, int)’
        if(!BN_rand(&ret, k, -1, 0)){
                                  ^
bignum.h: In member function ‘int CBigNum::bitSize() const’:
bignum.h:136:33: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_num_bits(const BIGNUM*)’
        return  BN_num_bits(this);
                                ^
bignum.h: In member function ‘void CBigNum::setulong(long unsigned int)’:
bignum.h:142:33: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_set_word(BIGNUM*, unsigned int)’
        if (!BN_set_word(this, n))
                                ^
bignum.h: In member function ‘long unsigned int CBigNum::getulong() const’:
bignum.h:148:32: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘unsigned int BN_get_word(const BIGNUM*)’
        return BN_get_word(this);
                               ^
bignum.h: In member function ‘unsigned int CBigNum::getuint() const’:
bignum.h:153:32: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘unsigned int BN_get_word(const BIGNUM*)’
        return BN_get_word(this);
                               ^
bignum.h: In member function ‘int CBigNum::getint() const’:
bignum.h:158:43: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘unsigned int BN_get_word(const BIGNUM*)’
        unsigned long n = BN_get_word(this);
                                          ^
bignum.h:159: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 alert.cpp:7:
bignum.h: In member function ‘void CBigNum::setint64(int64_t)’:
bignum.h:205: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 ‘uint64_t CBigNum::getuint64()’:
bignum.h:210:50: error: cannot convert ‘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:214:32: error: cannot convert ‘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::setuint64(uint64_t)’:
bignum.h:247: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:275: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:280: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:284: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:306: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:311: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:315: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:329:44: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘3’ to ‘BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)’
        BN_mpi2bn(&vch[0], vch.size(), this);
                                           ^
bignum.h: In member function ‘unsigned int CBigNum::GetCompact() const’:
bignum.h:335: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:338: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 ‘std::__cxx11::string CBigNum::ToString(int) const’:
bignum.h:383: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:386: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:388: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:390: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:396: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 ‘CBigNum CBigNum::pow(const CBigNum&) const’:
bignum.h:443:41: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_exp(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
        if (!BN_exp(&ret, this, &e, pctx))
                                        ^
bignum.h: In member function ‘CBigNum CBigNum::mul_mod(const CBigNum&, const CBigNum&) const’:
bignum.h:456:49: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_mod_mul(BIGNUM*, const BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
        if (!BN_mod_mul(&ret, this, &b, &m, pctx))
                                                ^
bignum.h: In member function ‘CBigNum CBigNum::pow_mod(const CBigNum&, const CBigNum&) const’:
bignum.h:474:56: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_mod_exp(BIGNUM*, const BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
            if (!BN_mod_exp(&ret, &inv, &posE, &m, pctx))
                                                       ^
bignum.h:477:53: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_mod_exp(BIGNUM*, const BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
            if (!BN_mod_exp(&ret, this, &e, &m, pctx))
                                                    ^
bignum.h: In member function ‘CBigNum CBigNum::inverse(const CBigNum&) const’:
bignum.h:492:49: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘BIGNUM* BN_mod_inverse(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
        if (!BN_mod_inverse(&ret, this, &m, pctx))
                                                ^
bignum.h: In static member function ‘static CBigNum CBigNum::generatePrime(unsigned int, bool)’:
bignum.h:505:81: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_generate_prime_ex(BIGNUM*, int, int, const BIGNUM*, const BIGNUM*, BN_GENCB*)’
        if(!BN_generate_prime_ex(&ret, numBits, (safe == true), NULL, NULL, NULL))
                                                                                ^
bignum.h: In member function ‘CBigNum CBigNum::gcd(const CBigNum&) const’:
bignum.h:518:41: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_gcd(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
        if (!BN_gcd(&ret, this, &b, pctx))
                                        ^
bignum.h: In member function ‘bool CBigNum::isPrime(int) const’:
bignum.h:531:19: warning: ‘int BN_is_prime(const BIGNUM*, int, void (*)(int, int, void*), BN_CTX*, void*)’ is deprecated [-Wdeprecated-declarations]
        int ret = BN_is_prime(this, checks, NULL, pctx, NULL);
                  ^~~~~~~~~~~
In file included from /usr/include/openssl/bn.h:31:0,
                from bignum.h:13,
                from chainparams.h:9,
                from alert.cpp:7:
/usr/include/openssl/bn.h:291:1: note: declared here
DEPRECATEDIN_0_9_8(int
^
In file included from chainparams.h:9:0,
                from alert.cpp:7:
bignum.h:531:61: warning: ‘int BN_is_prime(const BIGNUM*, int, void (*)(int, int, void*), BN_CTX*, void*)’ is deprecated [-Wdeprecated-declarations]
        int ret = BN_is_prime(this, checks, NULL, pctx, NULL);
                                                            ^
In file included from /usr/include/openssl/bn.h:31:0,
                from bignum.h:13,
                from chainparams.h:9,
                from alert.cpp:7:
/usr/include/openssl/bn.h:291:1: note: declared here
DEPRECATEDIN_0_9_8(int
^
In file included from chainparams.h:9:0,
                from alert.cpp:7:
bignum.h:531:61: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_is_prime(const BIGNUM*, int, void (*)(int, int, void*), BN_CTX*, void*)’
        int ret = BN_is_prime(this, checks, NULL, pctx, NULL);
                                                            ^
bignum.h: In member function ‘bool CBigNum::isOne() const’:
bignum.h:539:30: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_is_one(const BIGNUM*)’
        return BN_is_one(this);
                             ^
bignum.h: In member function ‘bool CBigNum::operator!() const’:
bignum.h:545: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:550: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:564: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:583: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:594: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:600: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:609: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:626: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:653: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:661: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:669: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:677: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:686: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))
                                      ^
bignum.h: In function ‘const CBigNum operator%(const CBigNum&, const CBigNum&)’:
bignum.h:695:35: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_nnmod(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
    if (!BN_nnmod(&r, &a, &b, pctx))
                                  ^
bignum.h: In function ‘const CBigNum operator<<(const CBigNum&, unsigned int)’:
bignum.h:703: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:715: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:716: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:717: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:718: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:719: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:720: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); }
                                                                                  ^
makefile.unix:193: recipe for target 'obj/alert.o' failed
make: *** [obj/alert.o] Error 1

@dev0tion
Copy link
Collaborator

Hi,

Thanks for raising this issue. The guide uses Raspbian Jessie instead of Raspbian Stretch.
It will work on that. Stretch is currently not supported.

@DemonRx
Copy link

DemonRx commented Aug 25, 2017

Try downgrading the libssl-dev package:

https://packages.debian.org/jessie/libssl-dev

@JKGHPO
Copy link
Author

JKGHPO commented Aug 25, 2017

Can confirm this solution appears to have helped.

To clarify:

  1. Remove the current version of libssl-dev ( 1.1.0f-3 )
    sudo apt-get remove libssl-dev

  2. Set your repository list to point to "jessie" instead of "stretch", save and exit.
    sudo nano /etc/apt/sources.list

  3. Then do sudo apt-get update to download the packages for jessie

  4. Then do sudo apt-get install libssl-dev package, it should be version 1.0.1t-1

  5. Follow the instructions with cd src && make -f makefile.unix

  6. When complete, type sudo apt-mark hold libssl-dev to make the package to not upgrade in the future

  7. Switch back your sources, by changing 'jessie' back to 'stretch' in number 2

  8. Do a sudo apt-get update and sudo apt-get upgrade and make sure it doesn't try and install libssl-dev (it will say it has been kept back)

  9. Continue with guide!

Credit to @demon and @dev0tion for all their help and guidance!

@dev0tion
Copy link
Collaborator

Thank you, we will ask olcko to add it to the guide.
Closing the issue.

@spainbox
Copy link

same problem here:
I followed all steps but have same problem:

$ sudo apt-get remove libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libssl-doc
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
libssl-dev
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 5,135 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 151438 files and directories currently installed.)
Removing libssl-dev:armhf (1.1.0f-3+deb9u1) ...
pi@rasperryminer:/stratis/src $ sudo vi /etc/apt/sources.list
sources.list sources.list.d/
pi@rasperryminer:
/stratis/src $ sudo vi /etc/apt/sources.list
pi@rasperryminer:/stratis/src $ sudo vi /etc/apt/sources.list
pi@rasperryminer:
/stratis/src $ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi

Uncomment line below then 'apt-get update' to enable 'apt-get source'

#deb-src http://archive.raspbian.org/raspbian/ stretch main contrib non-free rpi
pi@rasperryminer:/stratis/src $
pi@rasperryminer:
/stratis/src $ sudo apt-get update
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.3 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian jessie InRelease [14.9 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian jessie-backports InRelease [166 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian jessie/main armhf Packages [9,536 kB]
Get:5 http://archive.raspberrypi.org/debian stretch/main armhf Packages [127 kB]
Get:6 http://archive.raspberrypi.org/debian stretch/main armhf Contents (deb) [546 kB]
Ign:3 http://cdn-fastly.deb.debian.org/debian jessie-backports InRelease
Get:7 http://cdn-fastly.deb.debian.org/debian jessie-backports/non-free Sources [9,332 B]
Get:8 http://mirrordirector.raspbian.org/raspbian jessie/main armhf Contents (deb) [30.7 MB]
Get:9 http://cdn-fastly.deb.debian.org/debian jessie-backports/main Sources [822 kB]
Get:10 http://cdn-fastly.deb.debian.org/debian jessie-backports/contrib Sources [6,980 B]
Get:11 http://mirrordirector.raspbian.org/raspbian jessie/contrib armhf Packages [43.3 kB]
Get:12 http://mirrordirector.raspbian.org/raspbian jessie/contrib armhf Contents (deb) [70.4 kB]
Get:13 http://mirrordirector.raspbian.org/raspbian jessie/non-free armhf Packages [84.2 kB]
Get:14 http://mirrordirector.raspbian.org/raspbian jessie/non-free armhf Contents (deb) [702 kB]
Get:15 http://mirrordirector.raspbian.org/raspbian jessie/rpi armhf Packages [1,356 B]
Get:16 http://mirrordirector.raspbian.org/raspbian jessie/rpi armhf Contents (deb) [327 B]
Fetched 42.9 MB in 35s (1,196 kB/s)
Reading package lists... Done
W: GPG error: http://cdn-fastly.deb.debian.org/debian jessie-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
W: The repository 'http://httpredir.debian.org/debian jessie-backports InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
pi@rasperryminer:/stratis/src $
pi@rasperryminer:
/stratis/src $
pi@rasperryminer:/stratis/src $ ^M
bash: $'\r': command not found
pi@rasperryminer:
/stratis/src $ sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libssl1.0.0
The following NEW packages will be installed:
libssl-dev libssl1.0.0
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 1,948 kB of archives.
After this operation, 7,303 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.cica.es/mirrors/Linux/raspbian/raspbian jessie/main armhf libssl1.0.0 armhf 1.0.1t-1+deb8u7 [853 kB]
Get:2 http://ftp.cica.es/mirrors/Linux/raspbian/raspbian jessie/main armhf libssl-dev armhf 1.0.1t-1+deb8u7 [1,095 kB]
Fetched 1,948 kB in 0s (2,193 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libssl1.0.0:armhf.
(Reading database ... 151352 files and directories currently installed.)
Preparing to unpack .../libssl1.0.0_1.0.1t-1+deb8u7_armhf.deb ...
Unpacking libssl1.0.0:armhf (1.0.1t-1+deb8u7) ...
Selecting previously unselected package libssl-dev:armhf.
Preparing to unpack .../libssl-dev_1.0.1t-1+deb8u7_armhf.deb ...
Unpacking libssl-dev:armhf (1.0.1t-1+deb8u7) ...
Setting up libssl1.0.0:armhf (1.0.1t-1+deb8u7) ...
Setting up libssl-dev:armhf (1.0.1t-1+deb8u7) ...
pi@rasperryminer:~/stratis/src $ make -f makefile.unix
g++ -c -O2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wunused-function -Wunused-variable -fpermissive -Wconversion-null -g -DBOOST_SPIRIT_THREADSAFE -I/home/pi/stratis/src -I/home/pi/stratis/src/obj -DUSE_UPNP=0 -DENABLE_WALLET -I/home/pi/stratis/src/secp256k1/include -I/home/pi/stratis/src/leveldb/include -I/home/pi/stratis/src/leveldb/helpers -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/alert.d -o obj/alert.o alert.cpp
In file included from chainparams.h:9:0,
from alert.cpp:7:
bignum.h:57:24: error: invalid use of incomplete type ‘BIGNUM {aka struct bignum_st}’
class CBigNum : public BIGNUM
^~~~~~
In file included from /usr/local/include/openssl/bn.h:19:0,
from bignum.h:13,
from chainparams.h:9,
from alert.cpp:7:
/usr/local/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 alert.cpp:7:
bignum.h: In constructor ‘CBigNum::CBigNum()’:
bignum.h:62:21: error: ‘BN_init’ was not declared in this scope
BN_init(this);
^
bignum.h: In copy constructor ‘CBigNum::CBigNum(const CBigNum&)’:
bignum.h:67:21: error: ‘BN_init’ was not declared in this scope
BN_init(this);
^
bignum.h:68: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:70: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:77: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:84: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:88: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:89: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:90: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:91: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:92: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:93: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:94: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:95: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:96: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:97: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:98: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&)’:
bignum.h:102:21: error: ‘BN_init’ was not declared in this scope
BN_init(this);
^
bignum.h: In static member function ‘static CBigNum CBigNum::randBignum(const CBigNum&)’:
bignum.h:113:39: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_rand_range(BIGNUM*, const BIGNUM*)’
if(!BN_rand_range(&ret, &range)){
^
bignum.h: In static member function ‘static CBigNum CBigNum::RandKBitBigum(uint32_t)’:
bignum.h:125:35: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_rand(BIGNUM*, int, int, int)’
if(!BN_rand(&ret, k, -1, 0)){
^
bignum.h: In member function ‘int CBigNum::bitSize() const’:
bignum.h:136:33: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_num_bits(const BIGNUM*)’
return BN_num_bits(this);
^
bignum.h: In member function ‘void CBigNum::setulong(long unsigned int)’:
bignum.h:142:33: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_set_word(BIGNUM*, unsigned int)’
if (!BN_set_word(this, n))
^
bignum.h: In member function ‘long unsigned int CBigNum::getulong() const’:
bignum.h:148:32: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘unsigned int BN_get_word(const BIGNUM*)’
return BN_get_word(this);
^
bignum.h: In member function ‘unsigned int CBigNum::getuint() const’:
bignum.h:153:32: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘unsigned int BN_get_word(const BIGNUM*)’
return BN_get_word(this);
^
bignum.h: In member function ‘int CBigNum::getint() const’:
bignum.h:158:43: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘unsigned int BN_get_word(const BIGNUM*)’
unsigned long n = BN_get_word(this);
^
bignum.h:159: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 alert.cpp:7:
bignum.h: In member function ‘void CBigNum::setint64(int64_t)’:
bignum.h:205: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 ‘uint64_t CBigNum::getuint64()’:
bignum.h:210:50: error: cannot convert ‘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:214:32: error: cannot convert ‘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::setuint64(uint64_t)’:
bignum.h:247: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:275: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:280: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:284: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&)’:
bignum.h:306: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 CBigNum::getvch() const’:
bignum.h:311: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:315: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:329:44: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘3’ to ‘BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)’
BN_mpi2bn(&vch[0], vch.size(), this);
^
bignum.h: In member function ‘unsigned int CBigNum::GetCompact() const’:
bignum.h:335: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:338: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 ‘std::__cxx11::string CBigNum::ToString(int) const’:
bignum.h:383: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:386: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:388: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:390: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:396: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 ‘CBigNum CBigNum::pow(const CBigNum&) const’:
bignum.h:443:41: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_exp(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
if (!BN_exp(&ret, this, &e, pctx))
^
bignum.h: In member function ‘CBigNum CBigNum::mul_mod(const CBigNum&, const CBigNum&) const’:
bignum.h:456:49: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_mod_mul(BIGNUM*, const BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
if (!BN_mod_mul(&ret, this, &b, &m, pctx))
^
bignum.h: In member function ‘CBigNum CBigNum::pow_mod(const CBigNum&, const CBigNum&) const’:
bignum.h:474:56: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_mod_exp(BIGNUM*, const BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
if (!BN_mod_exp(&ret, &inv, &posE, &m, pctx))
^
bignum.h:477:53: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_mod_exp(BIGNUM*, const BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
if (!BN_mod_exp(&ret, this, &e, &m, pctx))
^
bignum.h: In member function ‘CBigNum CBigNum::inverse(const CBigNum&) const’:
bignum.h:492:49: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘BIGNUM* BN_mod_inverse(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
if (!BN_mod_inverse(&ret, this, &m, pctx))
^
bignum.h: In static member function ‘static CBigNum CBigNum::generatePrime(unsigned int, bool)’:
bignum.h:505:81: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_generate_prime_ex(BIGNUM*, int, int, const BIGNUM*, const BIGNUM*, BN_GENCB*)’
if(!BN_generate_prime_ex(&ret, numBits, (safe == true), NULL, NULL, NULL))
^
bignum.h: In member function ‘CBigNum CBigNum::gcd(const CBigNum&) const’:
bignum.h:518:41: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_gcd(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
if (!BN_gcd(&ret, this, &b, pctx))
^
bignum.h: In member function ‘bool CBigNum::isPrime(int) const’:
bignum.h:531:19: warning: ‘int BN_is_prime(const BIGNUM*, int, void ()(int, int, void), BN_CTX*, void*)’ is deprecated [-Wdeprecated-declarations]
int ret = BN_is_prime(this, checks, NULL, pctx, NULL);
^~~~~~~~~~~
In file included from /usr/local/include/openssl/crypto.h:26:0,
from /usr/local/include/openssl/bn.h:20,
from bignum.h:13,
from chainparams.h:9,
from alert.cpp:7:
/usr/local/include/openssl/bn.h:281:1: note: declared here
DEPRECATEDIN_0_9_8(int
^
In file included from chainparams.h:9:0,
from alert.cpp:7:
bignum.h:531:61: warning: ‘int BN_is_prime(const BIGNUM*, int, void ()(int, int, void), BN_CTX*, void*)’ is deprecated [-Wdeprecated-declarations]
int ret = BN_is_prime(this, checks, NULL, pctx, NULL);
^
In file included from /usr/local/include/openssl/crypto.h:26:0,
from /usr/local/include/openssl/bn.h:20,
from bignum.h:13,
from chainparams.h:9,
from alert.cpp:7:
/usr/local/include/openssl/bn.h:281:1: note: declared here
DEPRECATEDIN_0_9_8(int
^
In file included from chainparams.h:9:0,
from alert.cpp:7:
bignum.h:531:61: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_is_prime(const BIGNUM*, int, void ()(int, int, void), BN_CTX*, void*)’
int ret = BN_is_prime(this, checks, NULL, pctx, NULL);
^
bignum.h: In member function ‘bool CBigNum::isOne() const’:
bignum.h:539:30: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_is_one(const BIGNUM*)’
return BN_is_one(this);
^
bignum.h: In member function ‘bool CBigNum::operator!() const’:
bignum.h:545: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:550: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:564: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:583: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:594: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:600: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:609: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:626: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:653: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:661: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:669: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:677: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:686: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))
^
bignum.h: In function ‘const CBigNum operator%(const CBigNum&, const CBigNum&)’:
bignum.h:695:35: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_nnmod(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
if (!BN_nnmod(&r, &a, &b, pctx))
^
bignum.h: In function ‘const CBigNum operator<<(const CBigNum&, unsigned int)’:
bignum.h:703: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:715:83: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
rator==(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) == 0); }
^
bignum.h: In function ‘bool operator!=(const CBigNum&, const CBigNum&)’:
bignum.h:716:83: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
rator!=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) != 0); }
^
bignum.h: In function ‘bool operator<=(const CBigNum&, const CBigNum&)’:
bignum.h:717:83: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
rator<=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) <= 0); }
^
bignum.h: In function ‘bool operator>=(const CBigNum&, const CBigNum&)’:
bignum.h:718:83: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
rator>=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) >= 0); }
^
bignum.h: In function ‘bool operator<(const CBigNum&, const CBigNum&)’:
bignum.h:719:83: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
erator<(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) < 0); }
^
bignum.h: In function ‘bool operator>(const CBigNum&, const CBigNum&)’:
bignum.h:720:83: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
erator>(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) > 0); }
^
makefile.unix:212: recipe for target 'obj/alert.o' failed
make: *** [obj/alert.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants