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 is broken by Monero update #309

Closed DaWe35 closed 6 months ago

DaWe35 commented 6 months ago

The latest PR (commit 68e40ea2a73fd923a85e4095907b4a2244ac8bc4 ) on release-v0.18 broke the onion-monero-blockchain-explorer build. I was unable to find the cause of the bug, but rolling back monero to c6ff0d38207d30a90dba72767ef7ca63098d6a79 fixes the error.

#11 19.62 In file included from /root/monero/src/wallet/wallet2.h:64,
#11 19.62                  from /root/onion-monero-blockchain-explorer/src/monero_headers.h:29,
#11 19.62                  from /root/onion-monero-blockchain-explorer/src/rpccalls.h:9,
#11 19.62                  from /root/onion-monero-blockchain-explorer/src/rpccalls.cpp:5:
#11 19.62 /root/monero/src/serialization/string.h:36:13: note: candidate: 'template<template<bool <anonymous> > class Archive> bool do_serialize(Archive<false>&, std::string&)'
#11 19.62    36 | inline bool do_serialize(Archive<false>& ar, std::string& str)
#11 19.62       |             ^~~~~~~~~~~~
#11 19.62 /root/monero/src/serialization/string.h:36:13: note:   template argument deduction/substitution failed:
bool r = do_serialize(ar, f);   \
#11 19.62       |              ~~~~~~~~~~~~^~~~~~~
#11 19.62 /root/monero/src/cryptonote_basic/cryptonote_basic.h:95:7: note: in expansion of macro 'FIELD'
#11 19.62    95 |       FIELD(view_tag)
#11 19.62       |       ^~~~~
#11 19.62 /root/monero/src/serialization/serialization.h:172:26: note:   'json_archive<true>' is not derived from 'Archive<false>'
#11 19.62   172 |     bool r = do_serialize(ar, f);   \
#11 19.62       |              ~~~~~~~~~~~~^~~~~~~
#11 19.62 /root/monero/src/cryptonote_basic/cryptonote_basic.h:95:7: note: in expansion of macro 'FIELD'
#11 19.62    95 |       FIELD(view_tag)
#11 19.62       |       ^~~~~
#11 19.62 make[2]: *** [src/CMakeFiles/myxrm.dir/build.make:128: src/CMakeFiles/myxrm.dir/MempoolStatus.cpp.o] Error 1
#11 19.62 make[2]: *** [src/CMakeFiles/myxrm.dir/build.make:102: src/CMakeFiles/myxrm.dir/rpccalls.cpp.o] Error 1
#11 19.62 make[1]: *** [CMakeFiles/Makefile2:259: src/CMakeFiles/myxrm.dir/all] Error 2
#11 19.62 make: *** [Makefile:84: all] Error 2
#11 ERROR: process "/bin/sh -c cmake .. && make -j\"$(cat /nproc)\"" did not complete successfully: exit code: 2
------
 > [explore builder 7/8] RUN cmake .. && make -j"$(cat /nproc)":
19.62 /root/monero/src/serialization/serialization.h:172:26: note:   'json_archive<true>' is not derived from 'Archive<false>'
19.62   172 |     bool r = do_serialize(ar, f);   \
19.62       |              ~~~~~~~~~~~~^~~~~~~
19.62 /root/monero/src/cryptonote_basic/cryptonote_basic.h:95:7: note: in expansion of macro 'FIELD'
19.62    95 |       FIELD(view_tag)
19.62       |       ^~~~~
19.62 make[2]: *** [src/CMakeFiles/myxrm.dir/build.make:128: src/CMakeFiles/myxrm.dir/MempoolStatus.cpp.o] Error 1
19.62 make[2]: *** [src/CMakeFiles/myxrm.dir/build.make:102: src/CMakeFiles/myxrm.dir/rpccalls.cpp.o] Error 1
19.62 make[1]: *** [CMakeFiles/Makefile2:259: src/CMakeFiles/myxrm.dir/all] Error 2
19.62 make: *** [Makefile:84: all] Error 2
------
#11 19.62 In file included from /root/monero/src/serialization/variant.h:46,
#11 19.62                  from /root/monero/src/cryptonote_basic/cryptonote_basic.h:39,
#11 19.62                  from /root/monero/src/cryptonote_basic/cryptonote_basic_impl.h:33,
#11 19.62                  from /root/monero/src/cryptonote_core/tx_pool.h:47,
#11 19.62                  from /root/onion-monero-blockchain-explorer/src/monero_headers.h:24,
#11 19.62                  from /root/onion-monero-blockchain-explorer/src/rpccalls.h:9,
#11 19.62                  from /root/onion-monero-blockchain-explorer/src/rpccalls.cpp:5:
#11 19.62 /root/monero/src/serialization/serialization.h:172:26: note:   template argument 'true' does not match 'false'
#11 19.62   172 |     

Detailed log: build-log.txt

DaWe35 commented 6 months ago

For others reading, adding a && git checkout c6ff0d38207d30a90dba72767ef7ca63098d6a79 \ line to the Dockerfile temporarily fixes the issue:

RUN git clone --recursive --single-branch --branch ${MONERO_BRANCH} https://github.com/monero-project/monero.git \
    && cd monero \
    && git checkout 68e40ea2a73fd923a85e4095907b4a2244ac8bc4 \
    && test -z "$NPROC" && nproc > /nproc || echo -n "$NPROC" > /nproc && make -j"$(cat /nproc)"
moneroexamples commented 6 months ago

Thanks.

DaWe35 commented 6 months ago

Yeah I can confirm https://github.com/moneroexamples/onion-monero-blockchain-explorer/commit/9050231e3988fc7118958538cb51dc3b66b8a1b0 fixed this