我正在尝试从 tpruvot 编译 ccminer 程序,但是遇到错误。
规格:
- 操作系统:Ubuntu LTS 16.04
- GCC:gcc(Ubuntu 5.4.0-6ubuntu1~16.04.4)5.4.0 20160609
- CUDA(NVCC):Cuda 编译工具,版本 8.0,V8.0.61
安装步骤: https://github.com/tpruvot/ccminer/blob/linux/INSTALL
跑了 ./configure
(无错误)
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gcc option to support OpenMP... -fopenmp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for sys/sysctl.h... yes
checking whether be32dec is declared... no
checking whether le32dec is declared... no
checking whether be32enc is declared... no
checking whether le32enc is declared... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for getopt_long... yes
checking for json_loads in -ljansson... yes
checking for pthread_create in -lpthread... yes
checking for gzopen in -lz... yes
checking for SSL_free in -lssl... yes
checking for EVP_DigestFinal_ex in -lcrypto... yes
checking for gawk... (cached) mawk
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.47.0
checking for libcurl >= version 7.15.2... yes
checking whether libcurl is usable... yes
checking for curl_free... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating compat/Makefile
config.status: creating compat/jansson/Makefile
config.status: creating ccminer-config.h
config.status: ccminer-config.h is unchanged
config.status: executing depfiles commands
跑了 make
(这是错误开始的地方,使用 make 代替./build.sh
)
make all-recursive
make[1]: Entering directory '/home/m1/test-ccminer/ccminer'
Making all in compat
make[2]: Entering directory '/home/m1/test-ccminer/ccminer/compat'
make[3]: Entering directory '/home/m1/test-ccminer/ccminer/compat'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/m1/test-ccminer/ccminer/compat'
make[2]: Leaving directory '/home/m1/test-ccminer/ccminer/compat'
make[2]: Entering directory '/home/m1/test-ccminer/ccminer'
g++ -DHAVE_CONFIG_H -I. -fopenmp -pthread -fno-strict-aliasing -I/usr/local/cuda/include -DUSE_WRAPNVML -O3 -march=native -D_REENTRANT -falign-functions=16 -falign-jumps=16 -falign-labels=16 -MT ccminer-bignum.o -MD -MP -MF .deps/ccminer-bignum.Tpo -c -o ccminer-bignum.o `test -f 'bignum.cpp' || echo './'`bignum.cpp
In file included from bignum.cpp:8:0:
bignum.hpp:63: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:32:0,
from bignum.hpp:20,
from bignum.cpp:8:
/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 bignum.cpp:8:0:
bignum.hpp: In constructor ‘CBigNum::CBigNum()’:
bignum.hpp:68:21: error: ‘BN_init’ was not declared in this scope
BN_init(this);
^
bignum.hpp: In copy constructor ‘CBigNum::CBigNum(const CBigNum&)’:
bignum.hpp:73:21: error: ‘BN_init’ was not declared in this scope
BN_init(this);
^
bignum.hpp:74: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.hpp:76:31: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘void BN_clear_free(BIGNUM*)’
BN_clear_free(this);
^
bignum.hpp: In member function ‘CBigNum& CBigNum::operator=(const CBigNum&)’:
bignum.hpp:83: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.hpp: In destructor ‘CBigNum::~CBigNum()’:
bignum.hpp:90:27: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘void BN_clear_free(BIGNUM*)’
BN_clear_free(this);
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(signed char)’:
bignum.hpp:94:47: 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.hpp: In constructor ‘CBigNum::CBigNum(short int)’:
bignum.hpp:95:47: error: ‘BN_init’ was not declared in this scope
CBigNum(short n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(int)’:
bignum.hpp:96:47: error: ‘BN_init’ was not declared in this scope
CBigNum(int n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(long int)’:
bignum.hpp:97:47: error: ‘BN_init’ was not declared in this scope
CBigNum(long n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(int64)’:
bignum.hpp:98:47: error: ‘BN_init’ was not declared in this scope
CBigNum(int64 n) { BN_init(this); setint64(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(unsigned char)’:
bignum.hpp:99:47: error: ‘BN_init’ was not declared in this scope
CBigNum(unsigned char n) { BN_init(this); setulong(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(short unsigned int)’:
bignum.hpp:100:47: error: ‘BN_init’ was not declared in this scope
CBigNum(unsigned short n) { BN_init(this); setulong(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(unsigned int)’:
bignum.hpp:101:47: error: ‘BN_init’ was not declared in this scope
CBigNum(unsigned int n) { BN_init(this); setulong(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(long unsigned int)’:
bignum.hpp:102:47: error: ‘BN_init’ was not declared in this scope
CBigNum(unsigned long n) { BN_init(this); setulong(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(uint64)’:
bignum.hpp:103:47: error: ‘BN_init’ was not declared in this scope
CBigNum(uint64 n) { BN_init(this); setuint64(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(uint256)’:
bignum.hpp:104:47: error: ‘BN_init’ was not declared in this scope
explicit CBigNum(uint256 n) { BN_init(this); setuint256(n); }
^
bignum.hpp: In constructor ‘CBigNum::CBigNum(const std::vector<unsigned char>&)’:
bignum.hpp:108:21: error: ‘BN_init’ was not declared in this scope
BN_init(this);
^
bignum.hpp: In member function ‘void CBigNum::setulong(long unsigned int)’:
bignum.hpp:114: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.hpp: In member function ‘long unsigned int CBigNum::getulong() const’:
bignum.hpp:120:48: 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 (unsigned long) BN_get_word(this);
^
bignum.hpp: In member function ‘unsigned int CBigNum::getuint() const’:
bignum.hpp:125:47: 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 (unsigned int) BN_get_word(this);
^
bignum.hpp: In member function ‘int CBigNum::getint() const’:
bignum.hpp:130:59: 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 = (unsigned long) BN_get_word(this);
^
bignum.hpp:131: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 bignum.cpp:8:0:
bignum.hpp: In member function ‘void CBigNum::setint64(int64)’:
bignum.hpp:179:45: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘3’ to ‘BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)’
BN_mpi2bn(pch, (int) (p - pch), this);
^
bignum.hpp: In member function ‘void CBigNum::setuint64(uint64)’:
bignum.hpp:206:45: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘3’ to ‘BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)’
BN_mpi2bn(pch, (int) (p - pch), this);
^
bignum.hpp: In member function ‘void CBigNum::setuint256(uint256)’:
bignum.hpp:234:45: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘3’ to ‘BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)’
BN_mpi2bn(pch, (int) (p - pch), this);
^
bignum.hpp: In member function ‘uint256 CBigNum::getuint256() const’:
bignum.hpp:239: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.hpp:243: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.hpp: In member function ‘void CBigNum::setvch(const std::vector<unsigned char>&)’:
bignum.hpp:264:52: 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], (int) vch2.size(), this);
^
bignum.hpp: In member function ‘std::vector<unsigned char> CBigNum::getvch() const’:
bignum.hpp:269: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.hpp:273: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.hpp: In member function ‘CBigNum& CBigNum::SetCompact(unsigned int)’:
bignum.hpp:309: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.hpp:313: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.hpp:314: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.hpp:316: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.hpp:20:0,
from bignum.cpp:8:
bignum.hpp: In member function ‘unsigned int CBigNum::GetCompact() const’:
bignum.hpp:322: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 bignum.cpp:8:0:
bignum.hpp:325:55: 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 = (unsigned int) BN_get_word(this) << 8*(3-nSize);
^
bignum.hpp:329: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.hpp:330:54: error: cannot convert ‘CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘long unsigned int BN_get_word(const BIGNUM*)’
nCompact = (unsigned int) BN_get_word(&bn);
^
bignum.hpp:340: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);
^
In file included from bignum.cpp:8:0:
bignum.hpp: In member function ‘std::__cxx11::string CBigNum::ToString(int) const’:
bignum.hpp:381: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.hpp:384: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.hpp:386: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.hpp:388: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.hpp:394: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.hpp: In member function ‘bool CBigNum::operator!() const’:
bignum.hpp:427: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.hpp: In member function ‘CBigNum& CBigNum::operator+=(const CBigNum&)’:
bignum.hpp:432: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.hpp: In member function ‘CBigNum& CBigNum::operator*=(const CBigNum&)’:
bignum.hpp:446: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.hpp: In member function ‘CBigNum& CBigNum::operator<<=(unsigned int)’:
bignum.hpp:465: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.hpp: In member function ‘CBigNum& CBigNum::operator>>=(unsigned int)’:
bignum.hpp:476: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.hpp:482: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.hpp: In member function ‘CBigNum& CBigNum::operator++()’:
bignum.hpp:491: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.hpp: In member function ‘CBigNum& CBigNum::operator--()’:
bignum.hpp:508: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.hpp: In function ‘const CBigNum operator+(const CBigNum&, const CBigNum&)’:
bignum.hpp:533: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.hpp: In function ‘const CBigNum operator-(const CBigNum&, const CBigNum&)’:
bignum.hpp:541: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.hpp: In function ‘const CBigNum operator-(const CBigNum&)’:
bignum.hpp:549: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.hpp: In function ‘const CBigNum operator*(const CBigNum&, const CBigNum&)’:
bignum.hpp:557: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.hpp: In function ‘const CBigNum operator/(const CBigNum&, const CBigNum&)’:
bignum.hpp:566: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.hpp:20:0,
from bignum.cpp:8:
bignum.hpp: In function ‘const CBigNum operator%(const CBigNum&, const CBigNum&)’:
bignum.hpp:575: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 bignum.cpp:8:0:
bignum.hpp: In function ‘const CBigNum operator<<(const CBigNum&, unsigned int)’:
bignum.hpp:583: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.hpp: In function ‘bool operator==(const CBigNum&, const CBigNum&)’:
bignum.hpp: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); }
^
bignum.hpp: In function ‘bool operator!=(const CBigNum&, const CBigNum&)’:
bignum.hpp:596: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.hpp: In function ‘bool operator<=(const CBigNum&, const CBigNum&)’:
bignum.hpp:597: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.hpp: In function ‘bool operator>=(const CBigNum&, const CBigNum&)’:
bignum.hpp:598: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.hpp: In function ‘bool operator<(const CBigNum&, const CBigNum&)’:
bignum.hpp:599: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.hpp: In function ‘bool operator>(const CBigNum&, const CBigNum&)’:
bignum.hpp:600: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:1832: recipe for target 'ccminer-bignum.o' failed
make[2]: *** [ccminer-bignum.o] Error 1
make[2]: Leaving directory '/home/m1/test-ccminer/ccminer'
Makefile:2202: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/m1/test-ccminer/ccminer'
Makefile:655: recipe for target 'all' failed
make: *** [all] Error 2
我也尝试过此链接上的解决方案:在 Ubuntu 17.04 上构建 CCminer但仍然不起作用。
答案1
通过降级 OpenSSL 版本解决了错误。