Sumokoin Fails to build on Ubuntu 18.04
Closed this issue · 3 comments
When using gcc-8 on Ubuntu 18.04, I get the below errors. Ever since the upgrade from Ubuntu 17.10 to Ubuntu 18.04, I get the below error. However, this will build on Ubuntu 17.10.
`[ 47%] Building C object external/unbound/CMakeFiles/unbound.dir/validator/val_nsec3.c.o
[ 48%] Building C object external/unbound/CMakeFiles/unbound.dir/validator/val_nsec.c.o
[ 48%] Building C object external/unbound/CMakeFiles/unbound.dir/validator/val_secalgo.c.o
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c: In function ‘setup_dsa_sig’:
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c:256:8: error: dereferencing pointer to incomplete type ‘DSA_SIG’ {aka ‘struct DSA_SIG_st’}
dsasig->r = R;
^~
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c: In function ‘setup_ecdsa_sig’:
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c:291:11: error: dereferencing pointer to incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
ecdsa_sig->r = BN_bin2bn(*sig, bnsize, ecdsa_sig->r);
^~
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c: In function ‘setup_key_digest’:
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c:348:19: warning: implicit declaration of function ‘EVP_dss1’; did you mean ‘EVP_sha1’? [-Wimplicit-function-declaration]
*digest_type = EVP_dss1();
^~~~~~~~
EVP_sha1
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c:348:17: warning: assignment to ‘const EVP_MD *’ {aka ‘const struct evp_md_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
*digest_type = EVP_dss1();
^
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c: In function ‘verify_canonrrset’:
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c:509:13: error: storage size of ‘ctx’ isn’t known
EVP_MD_CTX ctx;
^~~
/home/collier/.sumokoin/sumokoin-master/external/unbound/validator/val_secalgo.c:560:5: warning: implicit declaration of function ‘EVP_MD_CTX_cleanup’; did you mean ‘EVP_MD_CTX_create’? [-Wimplicit-function-declaration]
if(EVP_MD_CTX_cleanup(&ctx) == 0) {
^~~~~~~~~~~~~~~~~~
EVP_MD_CTX_create
external/unbound/CMakeFiles/unbound.dir/build.make:1334: recipe for target 'external/unbound/CMakeFiles/unbound.dir/validator/val_secalgo.c.o' failed
make[2]: *** [external/unbound/CMakeFiles/unbound.dir/validator/val_secalgo.c.o] Error 1
CMakeFiles/Makefile2:201: recipe for target 'external/unbound/CMakeFiles/unbound.dir/all' failed
make[1]: *** [external/unbound/CMakeFiles/unbound.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 48%] Building CXX object src/ringct/CMakeFiles/obj_ringct.dir/rctTypes.cpp.o
[ 49%] Building C object src/ringct/CMakeFiles/obj_ringct.dir/rctCryptoOps.c.o
[ 49%] Building CXX object src/common/CMakeFiles/obj_common.dir/util.cpp.o
[ 50%] Building CXX object src/common/CMakeFiles/obj_common.dir/i18n.cpp.o
[ 50%] Built target obj_ringct
[ 50%] Building CXX object src/common/CMakeFiles/obj_common.dir/password.cpp.o
[ 51%] Building CXX object src/common/CMakeFiles/obj_common.dir/perf_timer.cpp.o
[ 51%] Building CXX object src/common/CMakeFiles/obj_common.dir/task_region.cpp.o
[ 52%] Building CXX object src/common/CMakeFiles/obj_common.dir/thread_group.cpp.o
[ 52%] Building CXX object src/common/CMakeFiles/obj_common.dir/threadpool.cpp.o
[ 52%] Built target obj_common
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2`
also having similar problems on ubuntu 18.04, most probably linked to OpenSSL
errors comprise of
../../external/unbound/libunbound.a(val_secalgo.c.o):val_secalgo.c:function verify_canonrrset: error: undefined reference to 'EVP_dss1' ../../external/unbound/libunbound.a(val_secalgo.c.o):val_secalgo.c:function verify_canonrrset: error: undefined reference to 'EVP_MD_CTX_init' ../../external/unbound/libunbound.a(val_secalgo.c.o):val_secalgo.c:function verify_canonrrset: error: undefined reference to 'EVP_MD_CTX_cleanup' ../../external/unbound/libunbound.a(val_secalgo.c.o):val_secalgo.c:function verify_canonrrset: error: undefined reference to 'EVP_MD_CTX_init' ../../external/unbound/libunbound.a(val_secalgo.c.o):val_secalgo.c:function verify_canonrrset: error: undefined reference to 'EVP_MD_CTX_cleanup' ../../external/unbound/libunbound.a(keyraw.c.o):keyraw.c:function sldns_digest_evp: error: undefined reference to 'EVP_MD_CTX_create' ../../external/unbound/libunbound.a(keyraw.c.o):keyraw.c:function sldns_digest_evp: error: undefined reference to 'EVP_MD_CTX_destroy' ../../external/unbound/libunbound.a(keyraw.c.o):keyraw.c:function sldns_digest_evp: error: undefined reference to 'EVP_MD_CTX_destroy' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'SSL_library_init' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'SSL_load_error_strings' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'OPENSSL_add_all_algorithms_noconf' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'CRYPTO_num_locks' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'CRYPTO_set_locking_callback' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'CRYPTO_set_locking_callback' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'ERR_free_strings' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'EVP_cleanup' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'CRYPTO_cleanup_all_ex_data' /tmp/cceNho5d.ltrans0.ltrans.o:<artificial>:function boost::asio::ssl::detail::openssl_init_base::instance(): error: undefined reference to 'ENGINE_cleanup' /tmp/cceNho5d.ltrans3.ltrans.o:<artificial>:function boost::asio::ssl::detail::verify_callback<epee::net_utils::verbose_verification<boost::asio::ssl::rfc2818_verification> >::call(bool, boost::asio::ssl::verify_context&): error: undefined reference to 'sk_num' /tmp/cceNho5d.ltrans3.ltrans.o:<artificial>:function boost::asio::ssl::detail::verify_callback<epee::net_utils::verbose_verification<boost::asio::ssl::rfc2818_verification> >::call(bool, boost::asio::ssl::verify_context&): error: undefined reference to 'sk_value' /tmp/cceNho5d.ltrans7.ltrans.o:<artificial>:function epee::net_utils::verbose_verification<boost::asio::ssl::rfc2818_verification>::operator()(bool, boost::asio::ssl::verify_context&): error: undefined reference to 'sk_num' /tmp/cceNho5d.ltrans7.ltrans.o:<artificial>:function epee::net_utils::verbose_verification<boost::asio::ssl::rfc2818_verification>::operator()(bool, boost::asio::ssl::verify_context&): error: undefined reference to 'sk_value' /tmp/cceNho5d.ltrans11.ltrans.o:<artificial>:function tools::wallet2::wallet2(bool, bool): error: undefined reference to 'SSLv23_method' /tmp/cceNho5d.ltrans13.ltrans.o:<artificial>:function std::_Sp_counted_ptr<boost::asio::ssl::detail::openssl_init_base::do_init*, (__gnu_cxx::_Lock_policy)2>::_M_dispose(): error: undefined reference to 'CRYPTO_set_locking_callback' /tmp/cceNho5d.ltrans13.ltrans.o:<artificial>:function std::_Sp_counted_ptr<boost::asio::ssl::detail::openssl_init_base::do_init*, (__gnu_cxx::_Lock_policy)2>::_M_dispose(): error: undefined reference to 'ERR_free_strings' /tmp/cceNho5d.ltrans13.ltrans.o:<artificial>:function std::_Sp_counted_ptr<boost::asio::ssl::detail::openssl_init_base::do_init*, (__gnu_cxx::_Lock_policy)2>::_M_dispose(): error: undefined reference to 'EVP_cleanup' /tmp/cceNho5d.ltrans13.ltrans.o:<artificial>:function std::_Sp_counted_ptr<boost::asio::ssl::detail::openssl_init_base::do_init*, (__gnu_cxx::_Lock_policy)2>::_M_dispose(): error: undefined reference to 'CRYPTO_cleanup_all_ex_data' /tmp/cceNho5d.ltrans13.ltrans.o:<artificial>:function std::_Sp_counted_ptr<boost::asio::ssl::detail::openssl_init_base::do_init*, (__gnu_cxx::_Lock_policy)2>::_M_dispose(): error: undefined reference to 'ENGINE_cleanup'
Here is the solution, type this before make
sudo apt-get install libssl1.0-dev
credits to: openlink/virtuoso-opensource#663
Resolved