moneroexamples / onion-monero-blockchain-explorer

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

Build fails with Monero release 0.18 error: no matching function for call to ‘store_t_to_binary #273

Closed shermand100 closed 2 years ago

shermand100 commented 2 years ago

Hi there. Doing fresh builds of this block explorer with the new Monero release-v0.18 branch and run into the following problem on all my devices. Running Ubuntu 22.04 server LTS. Different hardware, RockPro64, Rock64, Odroid XU4 and Raspberry Pi 3&4 and produce the same build fail.

Would further debugging info help you?

Cloning into 'onion-monero-blockchain-explorer'... -- The C compiler identification is GNU 11.2.0 -- The CXX compiler identification is GNU 11.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- MONERO_DIR: ~/monero -- FindMonero Xmr_COMMON_LIBRARIES /home/pinodexmr/monero/build/release/src/common/libcommon.a -- FindMonero Xmr_BLOCKS_LIBRARIES /home/pinodexmr/monero/build/release/src/blocks/libblocks.a -- FindMonero Xmr_CRYPTONOTE_BASIC_LIBRARIES /home/pinodexmr/monero/build/release/src/cryptonote_basic/libcryptonote_basic.a -- FindMonero Xmr_CRYPTONOTE_CORE_LIBRARIES /home/pinodexmr/monero/build/release/src/cryptonote_core/libcryptonote_core.a -- FindMonero Xmr_MULTISIG_LIBRARIES /home/pinodexmr/monero/build/release/src/multisig/libmultisig.a -- FindMonero Xmr_CRYPTONOTE_PROTOCOL_LIBRARIES /home/pinodexmr/monero/build/release/src/cryptonote_protocol/libcryptonote_protocol.a -- FindMonero Xmr_DAEMONIZER_LIBRARIES /home/pinodexmr/monero/build/release/src/daemonizer/libdaemonizer.a -- FindMonero Xmr_MNEMONICS_LIBRARIES /home/pinodexmr/monero/build/release/src/mnemonics/libmnemonics.a -- FindMonero Xmr_EPEE_LIBRARIES /home/pinodexmr/monero/build/release/contrib/epee/src/libepee.a -- FindMonero Xmr_LMDB_LIBRARIES /home/pinodexmr/monero/build/release/external/db_drivers/liblmdb/liblmdb.a -- FindMonero Xmr_DEVICE_LIBRARIES /home/pinodexmr/monero/build/release/src/device/libdevice.a -- FindMonero Xmr_WALLET-CRYPTO_LIBRARIES Xmr_WALLET-CRYPTO_LIBRARY-NOTFOUND -- FindMonero Xmr_BLOCKCHAIN_DB_LIBRARIES /home/pinodexmr/monero/build/release/src/blockchain_db/libblockchain_db.a -- FindMonero Xmr_RINGCT_LIBRARIES /home/pinodexmr/monero/build/release/src/ringct/libringct.a -- FindMonero Xmr_WALLET_LIBRARIES /home/pinodexmr/monero/build/release/lib/libwallet.a -- FindMonero Xmr_CNCRYPTO_LIBRARIES /home/pinodexmr/monero/build/release/src/crypto/libcncrypto.a -- FindMonero Xmr_EASYLOGGING_LIBRARIES /home/pinodexmr/monero/build/release/external/easylogging++/libeasylogging.a -- FindMonero Xmr_VERSION_LIBRARIES /home/pinodexmr/monero/build/release/src/libversion.a -- FindMonero Xmr_CHECKPOINTS_LIBRARIES /home/pinodexmr/monero/build/release/src/checkpoints/libcheckpoints.a -- FindMonero Xmr_RANDOMX_LIBRARIES /home/pinodexmr/monero/build/release/external/randomx/librandomx.a -- FindMonero Xmr_HARDFORKS_LIBRARIES /home/pinodexmr/monero/build/release/src/hardforks/libhardforks.a -- FindMonero Xmr_MINIUPNPC_LIBRARIES /home/pinodexmr/monero/build/release/external/miniupnp/miniupnpc/libminiupnpc.so -- FindMonero found libringct_basic.a -- FindMonero found libcryptonote_format_utils_basic.a -- /home/pinodexmr/monero/build -- Found Boost: /usr/lib/aarch64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: system filesystem thr ead date_time chrono regex serialization program_options date_time -- Looking for libunbound -- Found Boost: /usr/lib/aarch64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.54") /home/pinodexmr/onion-monero-blockchain-explorer/ext/mstch -- Configuring directory /home/pinodexmr/onion-monero-blockchain-explorer/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 randomx.html -- Configuring file rawkeyimgs.html -- Configuring file rawoutputkeys.html -- Configuring file rawtx.html -- Configuring file search_results.html -- Configuring file tx.html -- Configuring directory /home/pinodexmr/onion-monero-blockchain-explorer/build/templates/css -- Configuring file style.css -- Configuring directory /home/pinodexmr/onion-monero-blockchain-explorer/build/templates/partials -- Configuring file tx_details.html -- Configuring file tx_table_header.html -- Configuring file tx_table_row.html -- Configuring directory /home/pinodexmr/onion-monero-blockchain-explorer/build/templates/js -- Found unwind library: /usr/lib/aarch64-linux-gnu/libunwind.so -- Found HIDAPI: /usr/lib/aarch64-linux-gnu/libhidapi-libusb.so -- Configuring done -- Generating done -- Build files have been written to: /home/pinodexmr/onion-monero-blockchain-explorer/build [ 4%] Building C object src/crypto/CMakeFiles/mycrypto.dir/rx-slow-hash.c.o [ 9%] Linking C static library libmycrypto.a [ 9%] Built target mycrypto [ 13%] Building CXX object ext/CMakeFiles/myext.dir/fmt/format.cc.o [ 18%] Building CXX object ext/CMakeFiles/myext.dir/fmt/ostream.cc.o [ 22%] Linking CXX static library libmyext.a [ 22%] Built target myext [ 27%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/state/in_section.cpp.o [ 31%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/state/outside_section.cpp.o [ 36%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/mstch.cpp.o [ 40%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/render_context.cpp.o [ 45%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/template_type.cpp.o [ 50%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/token.cpp.o [ 54%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/utils.cpp.o [ 59%] Linking CXX static library libmstch.a [ 59%] Built target mstch [ 63%] Building CXX object src/CMakeFiles/myxrm.dir/MicroCore.cpp.o [ 68%] Building CXX object src/CMakeFiles/myxrm.dir/tools.cpp.o [ 72%] Building CXX object src/CMakeFiles/myxrm.dir/CmdLineOptions.cpp.o [ 77%] Building CXX object src/CMakeFiles/myxrm.dir/rpccalls.cpp.o [ 81%] Building CXX object src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o [ 86%] Building CXX object src/CMakeFiles/myxrm.dir/MempoolStatus.cpp.o [ 90%] Linking CXX static library libmyxrm.a [ 90%] Built target myxrm [ 95%] Building CXX object CMakeFiles/xmrblocks.dir/main.cpp.o In file included from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h: In member function ‘std::string xmreg::page::show_block_hex(size_t, bool)’: /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:1437:55: error: no matching function for call to ‘store_t_to_binary(cryptonote::block_complete_entry&, std::string&)’ 1437 | if(!epee::serialization::store_t_to_binary( | ~~~~~~~~~~^ 1438 | complete_block_data, complete_block_data_str)) | ~~~~~~~~~ In file included from /home/pinodexmr/monero/contrib/epee/include/storages/http_abstract_invoke.h:33, from /home/pinodexmr/onion-monero-blockchain-explorer/src/monero_headers.h:22, from /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:12, from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:118:10: note: candidate: ‘template bool epee::serialization::store_t_to_binary(t_struct&, epee::byte_slice&, size_t)’ 118 | bool store_t_to_binary(t_struct& str_in, byte_slice& binary_buff, size_t initial_buffer_size = 8192) | ^~~~~ /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:118:10: note: template argument deduction/substitution failed: In file included from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:1438:46: note: cannot convert ‘complete_block_data_str’ (type ‘std::string’ {aka ‘std::cxx11::basic_string’}) to type ‘epee::byte_slice&’ 1438 | complete_block_data, complete_block_data_str)) | ^~~~~~~ In file included from /home/pinodexmr/monero/contrib/epee/include/storages/http_abstract_invoke.h:33, from /home/pinodexmr/onion-monero-blockchain-explorer/src/monero_headers.h:22, from /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:12, from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:126:16: note: candidate: ‘template epee::byte_slice epee::serialization::store_t_to_binary(t_struct&, size_t)’ 126 | byte_slice store_t_to_binary(t_struct& str_in, size_t initial_buffer_size = 8192) | ^~~~~ /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:126:16: note: template argument deduction/substitution failed: In file included from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:1438:46: note: cannot convert ‘complete_block_data_str’ (type ‘std::string’ {aka ‘std::cxx11::basic_string’}) to type ‘size_t’ {aka ‘long unsigned int’} 1438 | complete_block_data, complete_block_data_str)) | ^~~~~~~ In file included from /home/pinodexmr/monero/contrib/epee/include/storages/http_abstract_invoke.h:33, from /home/pinodexmr/onion-monero-blockchain-explorer/src/monero_headers.h:22, from /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:12, from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:134:10: note: candidate: ‘template bool epee::serialization::store_t_to_binary(t_struct&, epee::byte_stream&)’ 134 | bool store_t_to_binary(t_struct& str_in, byte_stream& binary_buff) | ^~~~~ /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:134:10: note: template argument deduction/substitution failed: In file included from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:1438:46: note: cannot convert ‘complete_block_data_str’ (type ‘std::string’ {aka ‘std::cxx11::basic_string’}) to type ‘epee::byte_stream&’ 1438 | complete_block_data, complete_block_data_str)) | ^~~~~~~ /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h: In member function ‘xmreg::json xmreg::page::show_ringmemberstx_jsonhex(const string&)’: /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:1740:47: error: no matching function for call to ‘store_t_to_binary(cryptonote::block_complete_entry&, std::string&)’ 1740 | if(!epee::serialization::store_t_to_binary( | ~~~~~~~~~~^ 1741 | complete_block_data, complete_block_data_str)) | ~~~~~~~~~ In file included from /home/pinodexmr/monero/contrib/epee/include/storages/http_abstract_invoke.h:33, from /home/pinodexmr/onion-monero-blockchain-explorer/src/monero_headers.h:22, from /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:12, from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:118:10: note: candidate: ‘template bool epee::serialization::store_t_to_binary(t_struct&, epee::byte_slice&, size_t)’ 118 | bool store_t_to_binary(t_struct& str_in, byte_slice& binary_buff, size_t initial_buffer_size = 8192) | ^~~~~ /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:118:10: note: template argument deduction/substitution failed: In file included from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:1741:38: note: cannot convert ‘complete_block_data_str’ (type ‘std::string’ {aka ‘std::cxx11::basic_string’}) to type ‘epee::byte_slice&’ 1741 | complete_block_data, complete_block_data_str)) | ^~~~~~~ In file included from /home/pinodexmr/monero/contrib/epee/include/storages/http_abstract_invoke.h:33, from /home/pinodexmr/onion-monero-blockchain-explorer/src/monero_headers.h:22, from /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:12, from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:126:16: note: candidate: ‘template epee::byte_slice epee::serialization::store_t_to_binary(t_struct&, size_t)’ 126 | byte_slice store_t_to_binary(t_struct& str_in, size_t initial_buffer_size = 8192) | ^~~~~ /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:126:16: note: template argument deduction/substitution failed: In file included from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:1741:38: note: cannot convert ‘complete_block_data_str’ (type ‘std::string’ {aka ‘std::cxx11::basic_string’}) to type ‘size_t’ {aka ‘long unsigned int’} 1741 | complete_block_data, complete_block_data_str)) | ^~~~~~~ In file included from /home/pinodexmr/monero/contrib/epee/include/storages/http_abstract_invoke.h:33, from /home/pinodexmr/onion-monero-blockchain-explorer/src/monero_headers.h:22, from /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:12, from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:134:10: note: candidate: ‘template bool epee::serialization::store_t_to_binary(t_struct&, epee::byte_stream&)’ 134 | bool store_t_to_binary(t_struct& str_in, byte_stream& binary_buff) | ^~~~~ /home/pinodexmr/monero/contrib/epee/include/storages/portable_storage_template_helper.h:134:10: note: template argument deduction/substitution failed: In file included from /home/pinodexmr/onion-monero-blockchain-explorer/main.cpp:4: /home/pinodexmr/onion-monero-blockchain-explorer/src/page.h:1741:38: note: cannot convert ‘complete_block_data_str’ (type ‘std::string’ {aka ‘std::cxx11::basic_string’}) to type ‘epee::byte_stream&’ 1741 | complete_block_data, complete_block_data_str)) | ^~~~~~~ make[2]: [CMakeFiles/xmrblocks.dir/build.make:76: CMakeFiles/xmrblocks.dir/main.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:170: CMakeFiles/xmrblocks.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

moneroexamples commented 2 years ago

Did you use devel branch of the explorer?

https://github.com/moneroexamples/onion-monero-blockchain-explorer/tree/devel

shermand100 commented 2 years ago

Thanks, habit got the best of me. I've always used the master branch. Issue resolved as I'm sure you expected. Cheers.

Is there a plan to have a stable "0.18" (or similar) branch I could link to in my PiNodeXMR project? Or long term would you suggest link to and follow the "devel" branch?

moneroexamples commented 2 years ago

I just merged devel to master. So now master corresponds to 0.18 of monero.