编译比特币时使用Make发行

问题描述 投票:0回答:1

我在此问题上困扰了近两天,在执行命令后不久我的make崩溃了。我遵循了比特币github自述文件中OSx的设置,并仅执行了./autogen.sh和./configure。我尝试安装gcc,卸载并重新安装openssl,以及几乎发生的所有事情。请注意,make命令在master分支上运行正常,而在最新分支(在我的情况下为V0.9.5)上则失败。这可能不是一个简单的解决方法,但是我真的很困惑,不胜感激。这是执行make命令后不久出现的错误:

Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in .
  CXX      bitcoind.o
In file included from bitcoind.cpp:9:
In file included from ./main.h:13:
./bignum.h:56:24: error: base class has incomplete type
class CBigNum : public BIGNUM
                ~~~~~~~^~~~~~
/usr/local/Cellar/[email protected]/1.1.1d/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'bignum_st'
typedef struct bignum_st BIGNUM;
               ^
In file included from bitcoind.cpp:9:
In file included from ./main.h:13:
./bignum.h:61:9: error: use of undeclared identifier 'BN_init'
        BN_init(this);
        ^
./bignum.h:66:9: error: use of undeclared identifier 'BN_init'
        BN_init(this);
        ^
./bignum.h:67:14: error: no matching function for call to 'BN_copy'
        if (!BN_copy(this, &b))
             ^~~~~~~
/usr/local/Cellar/[email protected]/1.1.1d/include/openssl/bn.h:219:9: note: candidate function not viable: no known conversion
      from 'CBigNum *' to 'BIGNUM *' (aka 'bignum_st *') for 1st argument
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
        ^
In file included from bitcoind.cpp:9:
In file included from ./main.h:13:
./bignum.h:69:13: error: no matching function for call to 'BN_clear_free'
            BN_clear_free(this);
            ^~~~~~~~~~~~~
/usr/local/Cellar/[email protected]/1.1.1d/include/openssl/bn.h:218:6: note: candidate function not viable: no known conversion
      from 'CBigNum *' to 'BIGNUM *' (aka 'bignum_st *') for 1st argument
void BN_clear_free(BIGNUM *a);
     ^
In file included from bitcoind.cpp:9:
In file included from ./main.h:13:
./bignum.h:76:14: error: no matching function for call to 'BN_copy'
        if (!BN_copy(this, &b))
             ^~~~~~~
/usr/local/Cellar/[email protected]/1.1.1d/include/openssl/bn.h:219:9: note: candidate function not viable: no known conversion
      from 'CBigNum *' to 'BIGNUM *' (aka 'bignum_st *') for 1st argument
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
        ^
In file included from bitcoind.cpp:9:
In file included from ./main.h:13:
./bignum.h:83:9: error: no matching function for call to 'BN_clear_free'
        BN_clear_free(this);
        ^~~~~~~~~~~~~
/usr/local/Cellar/[email protected]/1.1.1d/include/openssl/bn.h:218:6: note: candidate function not viable: no known conversion
      from 'CBigNum *' to 'BIGNUM *' (aka 'bignum_st *') for 1st argument
void BN_clear_free(BIGNUM *a);
     ^
In file included from bitcoind.cpp:9:
In file included from ./main.h:13:
./bignum.h:87:37: error: use of undeclared identifier 'BN_init'
    CBigNum(signed char n)        { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                    ^
./bignum.h:88:37: error: use of undeclared identifier 'BN_init'
    CBigNum(short n)              { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                    ^
./bignum.h:89:37: error: use of undeclared identifier 'BN_init'
    CBigNum(int n)                { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                    ^
./bignum.h:90:37: error: use of undeclared identifier 'BN_init'
    CBigNum(long n)               { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                    ^
./bignum.h:91:37: error: use of undeclared identifier 'BN_init'
    CBigNum(long long n)          { BN_init(this); setint64(n); }
                                    ^
./bignum.h:92:37: error: use of undeclared identifier 'BN_init'
    CBigNum(unsigned char n)      { BN_init(this); setulong(n); }
                                    ^
./bignum.h:93:37: error: use of undeclared identifier 'BN_init'
    CBigNum(unsigned short n)     { BN_init(this); setulong(n); }
                                    ^
./bignum.h:94:37: error: use of undeclared identifier 'BN_init'
    CBigNum(unsigned int n)       { BN_init(this); setulong(n); }
                                    ^
./bignum.h:95:37: error: use of undeclared identifier 'BN_init'
    CBigNum(unsigned long n)      { BN_init(this); setulong(n); }
                                    ^
./bignum.h:96:37: error: use of undeclared identifier 'BN_init'
    CBigNum(unsigned long long n) { BN_init(this); setuint64(n); }
                                    ^
./bignum.h:97:37: error: use of undeclared identifier 'BN_init'
    explicit CBigNum(uint256 n)   { BN_init(this); setuint256(n); }
                                    ^
./bignum.h:101:9: error: use of undeclared identifier 'BN_init'
        BN_init(this);
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [bitcoind.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
makefile bitcoin bitcoind
1个回答
0
投票

刚遇到这个问题。

重新检查,并确保已设置以下依赖项:

$ brew install automake berkeley-db4 libtool boost miniupnpc pkg-config python qt libevent qrencode

$ brew install librsvg

之后工作。

© www.soinside.com 2019 - 2024. All rights reserved.