moneroexamples / onion-monero-blockchain-explorer

Onion Monero Blockchain Explorer
https://xmrchain.net
BSD 3-Clause "New" or "Revised" License
362 stars 269 forks source link

Building with Boost 1.73 ubuntu 16.04 #210

Closed 420coupe closed 2 years ago

420coupe commented 4 years ago

Having issues trying to build from source on Ubuntu 16.04 with Boost 1.73

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- AEON_DIR: ~/aeon
-- FindMonero Xmr_COMMON_LIBRARIES /root/aeon/build1/src/common/libcommon.a
-- FindMonero Xmr_BLOCKS_LIBRARIES /root/aeon/build1/src/blocks/libblocks.a
-- FindMonero Xmr_CRYPTONOTE_BASIC_LIBRARIES /root/aeon/build1/src/cryptonote_basic/libcryptonote_basic.a
-- FindMonero Xmr_CRYPTONOTE_CORE_LIBRARIES /root/aeon/build1/src/cryptonote_core/libcryptonote_core.a
-- FindMonero Xmr_MULTISIG_LIBRARIES /root/aeon/build1/src/multisig/libmultisig.a
-- FindMonero Xmr_CRYPTONOTE_PROTOCOL_LIBRARIES /root/aeon/build1/src/cryptonote_protocol/libcryptonote_protocol.a
-- FindMonero Xmr_DAEMONIZER_LIBRARIES /root/aeon/build1/src/daemonizer/libdaemonizer.a
-- FindMonero Xmr_MNEMONICS_LIBRARIES /root/aeon/build1/src/mnemonics/libmnemonics.a
-- FindMonero Xmr_EPEE_LIBRARIES /root/aeon/build1/contrib/epee/src/libepee.a
-- FindMonero Xmr_LMDB_LIBRARIES /root/aeon/build1/external/db_drivers/liblmdb/liblmdb.a
-- FindMonero Xmr_DEVICE_LIBRARIES /root/aeon/build1/src/device/libdevice.a
-- FindMonero Xmr_BLOCKCHAIN_DB_LIBRARIES /root/aeon/build1/src/blockchain_db/libblockchain_db.a
-- FindMonero Xmr_RINGCT_LIBRARIES /root/aeon/build1/src/ringct/libringct.a
-- FindMonero Xmr_WALLET_LIBRARIES /root/aeon/build1/lib/libwallet.a
-- FindMonero Xmr_CNCRYPTO_LIBRARIES /root/aeon/build1/src/crypto/libcncrypto.a
-- FindMonero Xmr_EASYLOGGING_LIBRARIES /root/aeon/build1/external/easylogging++/libeasylogging.a
-- FindMonero Xmr_VERSION_LIBRARIES /root/aeon/build1/src/libversion.a
-- FindMonero Xmr_CHECKPOINTS_LIBRARIES /root/aeon/build1/src/checkpoints/libcheckpoints.a
-- FindMonero found libringct_basic.a
-- /root/aeon/build
-- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found version "1.73.0") found components: system filesystem thread date_time chrono regex serialization program_options date_time 
-- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable version "1.73.0", minimum required is "1.54")  
/root/aeon/onion-exp/ext/mstch
-- Configuring directory /root/aeon/onion-exp/build/templates
-- Configuring file address.html
-- Configuring file altblocks.html
-- Configuring file block.html
-- Configuring file checkrawkeyimgs.html
-- Configuring file checkrawoutputkeys.html
-- Configuring file checkrawtx.html
-- Configuring file footer.html
-- Configuring file header.html
-- Configuring file index.html
-- Configuring file index2.html
-- Configuring file mempool.html
-- Configuring file mempool_error.html
-- Configuring file my_outputs.html
-- Configuring file pushrawtx.html
-- Configuring file rawkeyimgs.html
-- Configuring file rawoutputkeys.html
-- Configuring file rawtx.html
-- Configuring file search_results.html
-- Configuring file tx.html
-- Configuring directory /root/aeon/onion-exp/build/templates/css
-- Configuring file style.css
-- Configuring directory /root/aeon/onion-exp/build/templates/partials
-- Configuring file tx_details.html
-- Configuring file tx_table_header.html
-- Configuring file tx_table_row.html
-- Configuring directory /root/aeon/onion-exp/build/templates/js
-- Configuring file base58.js
-- Configuring file biginteger.js
-- Configuring file cn_util.js
-- Configuring file config.js
-- Configuring file crc32.js
-- Configuring file crypto.js
-- Configuring file jquery.min.js
-- Configuring file nacl-fast-cn.js
-- Configuring file sha3.js
-- Configuring done
-- Generating done
-- Build files have been written to: /root/aeon/onion-exp/build
root@Ubuntu-1604-xenial-64-minimal ~/aeon/onion-exp/build # make -j 4
Scanning dependencies of target myxrm
Scanning dependencies of target myext
Scanning dependencies of target mstch
[  5%] Building CXX object ext/CMakeFiles/myext.dir/fmt/format.cc.o
[ 10%] Building CXX object ext/CMakeFiles/myext.dir/fmt/ostream.cc.o
[ 15%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/state/in_section.cpp.o
[ 20%] Building CXX object src/CMakeFiles/myxrm.dir/MicroCore.cpp.o
[ 25%] Building CXX object src/CMakeFiles/myxrm.dir/tools.cpp.o
[ 30%] Linking CXX static library libmyext.a
[ 30%] Built target myext
[ 35%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/state/outside_section.cpp.o
[ 40%] Building CXX object src/CMakeFiles/myxrm.dir/CmdLineOptions.cpp.o
[ 45%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/mstch.cpp.o
[ 50%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/render_context.cpp.o
[ 55%] Building CXX object src/CMakeFiles/myxrm.dir/rpccalls.cpp.o
[ 60%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/template_type.cpp.o
[ 65%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/token.cpp.o
[ 70%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/utils.cpp.o
[ 75%] Linking CXX static library libmstch.a
[ 75%] Built target mstch
[ 80%] Building CXX object src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o
[ 85%] Building CXX object src/CMakeFiles/myxrm.dir/MempoolStatus.cpp.o
[ 90%] Linking CXX static library libmyxrm.a
[ 90%] Built target myxrm
Scanning dependencies of target aeonblocks
[ 95%] Building CXX object CMakeFiles/aeonblocks.dir/main.cpp.o
[100%] Linking CXX executable aeonblocks
/root/aeon/build1/src/common/libcommon.a(util.cpp.o): In function `tools::on_startup()':
util.cpp:(.text+0x2537): undefined reference to `OPENSSL_init_ssl'
CMakeFiles/aeonblocks.dir/main.cpp.o: In function `boost::asio::ssl::context::context(boost::asio::ssl::context_base::method)':
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x90): undefined reference to `TLS_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0xf5): undefined reference to `TLS_client_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x15a): undefined reference to `TLS_server_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x1bf): undefined reference to `TLS_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x224): undefined reference to `TLS_client_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x289): undefined reference to `TLS_server_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x2ee): undefined reference to `TLS_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x353): undefined reference to `TLS_client_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x3b8): undefined reference to `TLS_server_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x41d): undefined reference to `TLS_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x482): undefined reference to `TLS_client_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x4e7): undefined reference to `TLS_server_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x54c): undefined reference to `TLS_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x5b1): undefined reference to `TLS_client_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x616): undefined reference to `TLS_server_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x67b): undefined reference to `TLS_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x694): undefined reference to `TLS_client_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x6ad): undefined reference to `TLS_server_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x6c6): undefined reference to `TLS_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x70d): undefined reference to `TLS_client_method'
main.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x754): undefined reference to `TLS_server_method'
CMakeFiles/aeonblocks.dir/main.cpp.o: In function `boost::asio::ssl::context::~context()':
main.cpp:(.text._ZN5boost4asio3ssl7contextD2Ev[_ZN5boost4asio3ssl7contextD5Ev]+0x27): undefined reference to `SSL_CTX_get_default_passwd_cb_userdata'
CMakeFiles/aeonblocks.dir/main.cpp.o: In function `boost::asio::ssl::context::set_options(long, boost::system::error_code&)':
main.cpp:(.text._ZN5boost4asio3ssl7context11set_optionsElRNS_6system10error_codeE[_ZN5boost4asio3ssl7context11set_optionsElRNS_6system10error_codeE]+0x35): undefined reference to `SSL_CTX_set_options'
collect2: error: ld returned 1 exit status
CMakeFiles/aeonblocks.dir/build.make:133: recipe for target 'aeonblocks' failed
make[2]: *** [aeonblocks] Error 1
CMakeFiles/Makefile2:176: recipe for target 'CMakeFiles/aeonblocks.dir/all' failed
make[1]: *** [CMakeFiles/aeonblocks.dir/all] Error 2
Makefile:103: recipe for target 'all' failed
make: *** [all] Error 2
moneroexamples commented 4 years ago

Do you have libssl-dev installed?

420coupe commented 4 years ago

yes, this version.

libssl-dev is already the newest version (1.0.2g-1ubuntu4.16).

moneroexamples commented 4 years ago

Ok I will inspect on ubuntu 16.04 and report back.

moneroexamples commented 4 years ago

I tested on Ubuntu 16.04 with boost 1.70 (could not find ppa for 1.73). Haven't had any problems compiling, thus not sure what can be causing the issue for you. I used master branch of the explorer and master branch of monero. Did you use other branches?

420coupe commented 4 years ago

Building from aeon branch and aeon master.

https://www.boost.org/users/download/

Downloaded and installed boost from there

moneroexamples commented 4 years ago

I see, I don't really look after that branch but I will check it nevertheless.

italocoin-project commented 4 years ago

Any updates on this? I am getting the same issue, thanks i have boost_1_64 and OpenSSL 1.1.2-dev

moneroexamples commented 4 years ago

@italocoin-project

Also aeon branch?

italocoin-project commented 4 years ago

@moneroexamples

@italocoin-project

Also aeon branch?

On monero release-v0.16 and master of explorer

the error

[100%] Linking CXX executable xmrblocks /root/monero/build/release/src/common/libcommon.a(util.cpp.o): In functiontools::on_startup()': util.cpp:(.text+0x26d6): undefined reference to OPENSSL_init_ssl' /root/monero/build/release/contrib/epee/src/libepee.a(net_ssl.cpp.o): In functionepee::net_utils::create_rsa_ssl_certificate(evp_pkey_st&, x509_st&)': net_ssl.cpp:(.text+0x628): undefined reference to X509_getm_notBefore' net_ssl.cpp:(.text+0x63f): undefined reference toX509_getm_notAfter' /root/monero/build/release/contrib/epee/src/libepee.a(net_ssl.cpp.o): In function epee::net_utils::create_ec_ssl_certificate(evp_pkey_st*&, x509_st*&, int)': net_ssl.cpp:(.text+0x1de1): undefined reference toX509_getm_notBefore' net_ssl.cpp:(.text+0x1df8): undefined reference to X509_getm_notAfter'

italocoin-project commented 4 years ago

Hello @moneroexamples were you able to recreate the issue?

moneroexamples commented 4 years ago

@italocoin-project I haven't had time yet to look into it. Sorry.

But I was checking it already for this issue and it worked at that time: https://github.com/moneroexamples/onion-monero-blockchain-explorer/issues/210#issuecomment-639361570

italocoin-project commented 4 years ago

@italocoin-project I haven't had time yet to look into it. Sorry.

But I was checking it already for this issue and it worked at that time: #210 (comment)

Hi, i have 2 servers and on one of them works fine but on the other one i get the error mentioned above.

moneroexamples commented 4 years ago

@italocoin-project

Hi. I managed to test on Ubuntu 16.04. I can build it using boost1.74. boost1.73 fails, and I don't have solution for now.

To use 1.74 you can try the following

add-apt-repository ppa:mhier/libboost-latest
apt-get update
apt install libboost1.74-dev

You may need to uninstall the older versions.