moneroexamples / onion-monero-blockchain-explorer

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

Build explorer failed on Monero v18 #279

Closed itadashi closed 1 year ago

itadashi commented 1 year ago

Hi,

I try to build the onion-monero-blockchain-explorer on Ubuntu 20.04 with last monero. I have this error message when trying to make :

[ 4%] Building C object src/crypto/CMakeFiles/mycrypto.dir/rx-slow-hash.c.o onion-monero-blockchain-explorer/src/crypto/rx-slow-hash.c:52:3: error: unknown type name ‘CTHR_MUTEX_TYPE’ 52 | CTHR_MUTEX_TYPE rs_mutex; ... onion-monero-blockchain-explorer/src/crypto/rx-slow-hash.c: In function ‘me_rx_reorg’: onion-monero-blockchain-explorer/src/crypto/rx-slow-hash.c:163:3: warning: implicit declaration of function ‘CTHR_MUTEX_LOCK’ [-Wimplicit-function-declaration] 163 | CTHR_MUTEX_LOCK(rx_mutex); | ^~~~~~~~~~~~~~~ make[2]: *** [src/crypto/CMakeFiles/mycrypto.dir/build.make:63: src/crypto/CMakeFiles/mycrypto.dir/rx-slow-hash.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:286: src/crypto/CMakeFiles/mycrypto.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

I try with devel branch also, but same error. Thanks for the help :-)

moneroexamples commented 1 year ago

Did you checkout Monero v18 branch from its git?

itadashi commented 1 year ago

Yes in folder monero, i did a git checkout. Few months ago, i was able to build the explorer.

moneroexamples commented 1 year ago

I can confirm the issue. Let me see what has happened.

itadashi commented 1 year ago

Cool, thanks :-)

moneroexamples commented 1 year ago

I pushed temp fix for the issue into devel branch of the explorer:

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

Could you please checking it out?

deverickapollo commented 1 year ago

Saw this issue yesterday working on an integration. Can confirm the fix on the devel branch resolved build issues.

itadashi commented 1 year ago

Thanks @moneroexamples it works :-) You Temprorry disabled randomx code generation till figure out what exactly is happening, does it affect the functioning of the explorer?

moneroexamples commented 1 year ago

No, unless you run it with --enable-randomx flag.

itadashi commented 1 year ago

Ok great and what is the purpose of this flag exacltly?

moneroexamples commented 1 year ago

randomx is mining algorithm in monero, which is based on randomly generated code that miners execute. With the flag, the explorer was showing the code. But there have been recent backward incompatible changes to randomx, and it broke in the explorer. Haven't managed to fix it yet.

itadashi commented 1 year ago

randomx is mining algorithm in monero

Yeah off course i know it ;-)

With the flag, the explorer was showing the code

Ok i see thanks for the explanation So we can close the issue for now? @moneroexamples thank you again!