我正在尝试在GitHub上编译VERGE,这是一个加密货币守护进程。我使用的是Ubuntu 16.04,gcc 5.4,libboost 1.58和OpenSSL 1.1.0f
./autogen.sh
...
...
./configure.sh
...
...
make
Making all in src
make[1]: Entering directory '/home/pooladm/verge/src'
CXXLD VERGEd
libbitcoin_server.a(libbitcoin_server_a-init.o): In function `CBigNum::CBigNum(uint256)':
/home/pooladm/verge/src/bignum.h:92: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:92: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:92: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:92: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:92: undefined reference to `BN_init'
libbitcoin_server.a(libbitcoin_server_a-init.o): In function `AppInit2()':
/home/pooladm/verge/src/init.cpp:489: undefined reference to `SSLeay_version'
libbitcoin_server.a(libbitcoin_server_a-init.o): In function `CBigNum::CBigNum(std::vector<unsigned char, std::allocator<unsigned char> > const&)':
/home/pooladm/verge/src/bignum.h:96: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:96: undefined reference to `BN_init'
libbitcoin_server.a(libbitcoin_server_a-bitcoinrpc.o): In function `boost::asio::ssl::context::context(boost::asio::ssl::context_base::method)':
/usr/include/boost/asio/ssl/impl/context.ipp:120: undefined reference to `SSLv23_method'
/usr/include/boost/asio/ssl/impl/context.ipp:120: undefined reference to `SSLv23_method'
libbitcoin_server.a(libbitcoin_server_a-bitcoinrpc.o): In function `CBigNum::CBigNum(int)':
/home/pooladm/verge/src/bignum.h:84: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:84: undefined reference to `BN_init'
libbitcoin_server.a(libbitcoin_server_a-bitcoinrpc.o): In function `CBigNum::CBigNum()':
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
libbitcoin_server.a(libbitcoin_server_a-bitcoinrpc.o): In function `boost::asio::ssl::detail::openssl_init_base::do_init::~do_init()':
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:64: undefined reference to `CRYPTO_set_id_callback'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:65: undefined reference to `CRYPTO_set_locking_callback'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:66: undefined reference to `ERR_free_strings'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:72: undefined reference to `EVP_cleanup'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:73: undefined reference to `CRYPTO_cleanup_all_ex_data'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:76: undefined reference to `ENGINE_cleanup'
libbitcoin_server.a(libbitcoin_server_a-bitcoinrpc.o): In function `boost::asio::ssl::detail::openssl_init_base::do_init::~do_init()':
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:64: undefined reference to `CRYPTO_set_id_callback'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:65: undefined reference to `CRYPTO_set_locking_callback'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:66: undefined reference to `ERR_free_strings'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:72: undefined reference to `EVP_cleanup'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:73: undefined reference to `CRYPTO_cleanup_all_ex_data'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:76: undefined reference to `ENGINE_cleanup'
libbitcoin_server.a(libbitcoin_server_a-bitcoinrpc.o): In function `boost::asio::ssl::detail::openssl_init_base::do_init::do_init()':
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:39: undefined reference to `SSL_library_init'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:40: undefined reference to `SSL_load_error_strings'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:41: undefined reference to `OPENSSL_add_all_algorithms_noconf'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:43: undefined reference to `CRYPTO_num_locks'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:46: undefined reference to `CRYPTO_set_locking_callback'
/usr/include/boost/asio/ssl/detail/impl/openssl_init.ipp:47: undefined reference to `CRYPTO_set_id_callback'
libbitcoin_server.a(libbitcoin_server_a-main.o): In function `CBigNum::CBigNum()':
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
libbitcoin_server.a(libbitcoin_server_a-main.o): In function `CBigNum::CBigNum(long long)':
/home/pooladm/verge/src/bignum.h:86: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:86: undefined reference to `BN_init'
libbitcoin_server.a(libbitcoin_server_a-main.o): In function `CBigNum::CBigNum()':
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
libbitcoin_server.a(libbitcoin_server_a-main.o):/home/pooladm/verge/src/bignum.h:86: more undefined references to `BN_init' follow
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `CInit::~CInit()':
/home/pooladm/verge/src/util.cpp:133: undefined reference to `CRYPTO_set_locking_callback'
/home/pooladm/verge/src/util.cpp:134: undefined reference to `CRYPTO_num_locks'
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `CInit::CInit()':
/home/pooladm/verge/src/util.cpp:117: undefined reference to `CRYPTO_num_locks'
/home/pooladm/verge/src/util.cpp:118: undefined reference to `CRYPTO_num_locks'
/home/pooladm/verge/src/util.cpp:120: undefined reference to `CRYPTO_set_locking_callback'
libbitcoin_wallet.a(libbitcoin_wallet_a-db.o): In function `CBigNum::CBigNum()':
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
libbitcoin_wallet.a(libbitcoin_wallet_a-db.o): In function `CBigNum::CBigNum(int)':
/home/pooladm/verge/src/bignum.h:84: undefined reference to `BN_init'
libbitcoin_wallet.a(libbitcoin_wallet_a-db.o): In function `CBigNum::CBigNum()':
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
libbitcoin_wallet.a(libbitcoin_wallet_a-db.o): In function `CBigNum::CBigNum(int)':
/home/pooladm/verge/src/bignum.h:84: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:84: undefined reference to `BN_init'
libbitcoin_wallet.a(libbitcoin_wallet_a-crypter.o): In function `CCrypter::Encrypt(std::vector<unsigned char, secure_allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> >&)':
/home/pooladm/verge/src/crypter.cpp:63: undefined reference to `EVP_CIPHER_CTX_init'
/home/pooladm/verge/src/crypter.cpp:67: undefined reference to `EVP_CIPHER_CTX_cleanup'
/home/pooladm/verge/src/crypter.cpp:67: undefined reference to `EVP_CIPHER_CTX_cleanup'
libbitcoin_wallet.a(libbitcoin_wallet_a-crypter.o): In function `CCrypter::Decrypt(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, secure_allocator<unsigned char> >&)':
/home/pooladm/verge/src/crypter.cpp:90: undefined reference to `EVP_CIPHER_CTX_init'
/home/pooladm/verge/src/crypter.cpp:94: undefined reference to `EVP_CIPHER_CTX_cleanup'
/home/pooladm/verge/src/crypter.cpp:94: undefined reference to `EVP_CIPHER_CTX_cleanup'
libbitcoin_wallet.a(libbitcoin_wallet_a-rpcwallet.o): In function `CBigNum::CBigNum(int)':
/home/pooladm/verge/src/bignum.h:84: undefined reference to `BN_init'
/home/pooladm/verge/src/bignum.h:84: undefined reference to `BN_init'
libbitcoin_wallet.a(libbitcoin_wallet_a-rpcwallet.o): In function `CBigNum::CBigNum()':
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): In function `CBigNum::CBigNum()':
/home/pooladm/verge/src/bignum.h:56: undefined reference to `BN_init'
collect2: error: ld returned 1 exit status
Makefile:1621: recipe for target 'VERGEd' failed
make[1]: *** [VERGEd] Error 1
make[1]: Leaving directory '/home/pooladm/verge/src'
Makefile:524: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
我尝试更改libboost版本(1.48.0 - 1.61.0),openssl版本(1.0.1x,1.0.2x,1.1.0x),gcc ver(4.9,5.4)并出现相同的错误。为什么呢?
UPD。 #1
make -sn
fail=; \
if (target_option=k; case ${target_option-} in ?) ;; *) echo "am__make_running_with_option: internal error: invalid" "t exit 1;; esac; has_opt=no; sane_makeflags=$MAKEFLAGS; if { if test -z '0'; then false; elif test -n 'x86_64-pc-linux-ghome/pooladm/verge'; then true; else false; fi; }; then sane_makeflags=$MFLAGS; else case $MAKEFLAGS in *\\[\ \ ]*) bs= sed "s/$bs$bs[$bs $bs ]*//g"`;; esac; fi; skip_next=no; strip_trailopt () { flg=`printf '%s\n' "$flg" | sed "s/$1.*$/p_next = yes && { skip_next=no; continue; }; case $flg in *=*|--*) continue;; -*I) strip_trailopt 'I'; skip_next=yes;; 'O'; skip_next=yes;; -*O?*) strip_trailopt 'O';; -*l) strip_trailopt 'l'; skip_next=yes;; -*l?*) strip_trailopt 'l';; -sac; case $flg in *$target_option*) has_opt=yes; break;; esac; done; test $has_opt = yes); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
case "all-recursive" in \
distclean-* | maintainer-clean-*) list='src' ;; \
*) list='src' ;; \
esac; \
for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
make "$target-am" || exit 1; \
fi; test -z "$fail"
Making all in src
/bin/mkdir -p ./obj
../share/genbuild.sh /home/pooladm/verge/src/obj/build.h \
/home/pooladm/verge
echo " CXX " libbitcoin_util_a-version.o;/usr/bin/ccache g++ -DHAVE_CONFIG_H -I. -I../src/config -pthread -I. -Ie -I./leveldb/helpers/memenv -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -U_FORTIFY_SOURCE -D_-Wformat-security -Wno-unused-parameter -Wstack-protector -fstack-protector-all -fPIE -fPIC -MT libbitcoin_util_a-versn.Tpo -c -o libbitcoin_util_a-version.o `test -f 'version.cpp' || echo './'`version.cpp
mv -f .deps/libbitcoin_util_a-version.Tpo .deps/libbitcoin_util_a-version.Po
rm -f libbitcoin_util.a
echo " AR " libbitcoin_util.a;/usr/bin/ar cru libbitcoin_util.a libbitcoin_util_a-util.o libbitcoin_util_a-versioat/libbitcoin_util_a-glibcxx_sanity.o
/usr/bin/ranlib libbitcoin_util.a
rm -f VERGEd
echo " CXXLD " VERGEd;/usr/bin/ccache g++ -g -O2 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -WC -pthread -Wl,-z,relro -Wl,-z,now -pie -o VERGEd VERGEd-daemon.o libbitcoin_server.a libbitcoin_common.a libbitcoin_uta libbitcoin_sse2.a libbitcoin_wallet.a -L/usr/lib/x86_64-linux-gnu -lboost_system -lboost_filesystem -lboost_program_o.8 -lminiupnpc -lminiupnpc -lminiupnpc -lminiupnpc -lssl -lcrypto
echo " CXX " qt/qt_VERGE_qt-bitcoin.o;/usr/bin/ccache g++ -DHAVE_CONFIG_H -I. -I../src/config -pthread -I. -I./oI./leveldb/helpers/memenv -I./qt -I./qt -I./qt/forms -I./qt/forms -I/usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets de/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebKit -I/u86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/inclinux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5 -pthread -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_CE=2 -g -O2 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -fstack-protector-all -fMF qt/.deps/qt_VERGE_qt-bitcoin.Tpo -c -o qt/qt_VERGE_qt-bitcoin.o `test -f 'qt/bitcoin.cpp' || echo './'`qt/bitcoin.cp
mv -f qt/.deps/qt_VERGE_qt-bitcoin.Tpo qt/.deps/qt_VERGE_qt-bitcoin.Po
rm -f qt/VERGE-qt
echo " OBJCXXLD" qt/VERGE-qt;g++ -g -O2 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-proteelro -Wl,-z,now -pie -o qt/VERGE-qt qt/qt_VERGE_qt-bitcoin.o qt/libbitcoinqt.a libbitcoin_server.a libbitcoin_wallet.oin_sse2.a ./leveldb/libleveldb.a ./leveldb/libmemenv.a -L/usr/lib/x86_64-linux-gnu -lboost_system -lboost_filesystem -rono -lQt5WebKitWidgets -lQt5Widgets -lQt5WebKit -lQt5Gui -lQt5Network -lQt5Core -lQt5DBus -lQt5Core -lqrencode -lprotupnpc -lminiupnpc -lminiupnpc -lminiupnpc -lssl -lcrypto
UPD。 #2
从1.1.0x切换了openssl版本
openssl version
OpenSSL 1.0.2k 26 Jan 2017
并有相同的错误
UPD。 #3
除去
UPD。 #4
T尝试应用这些recomendations,购买我的ssl/s2_meth.c
已包含这些行
UPD。 #5
我正在尝试使用
编译openssl./config --prefix=/usr no-ssl2 no-ssl3 no-comp
并有相同的错误
UPD。 #6
通过重新安装操作系统解决..