xmr-node-proxy
xmr-node-proxy copied to clipboard
Trying to build on Ubuntu 20.04 ARM platform
Hi!
Attempting to build xmr-node-proxy for the first time in an ARM platform (AWS EC2) and got this error:
make: Entering directory '/home/xnp/xmr-node-proxy/node_modules/cryptonight-hashing/build'
CXX(target) Release/obj.target/cryptonight-hashing/xmrig/crypto/cn/gpu/cn_gpu_arm.o
CXX(target) Release/obj.target/cryptonight-hashing/xmrig-override/backend/cpu/platform/BasicCpuInfo_arm.o
../xmrig-override/backend/cpu/platform/BasicCpuInfo_arm.cpp:37:10: fatal error: 3rdparty/rapidjson/document.h: No such file or directory
37 | #include "3rdparty/rapidjson/document.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [cryptonight-hashing.target.mk:179: Release/obj.target/cryptonight-hashing/xmrig-override/backend/cpu/platform/BasicCpuInfo_arm.o] Error 1
make: Leaving directory '/home/xnp/xmr-node-proxy/node_modules/cryptonight-hashing/build'
I checked my current installation (intel platform) and it also doesn't have this file, but there was no problem with the installation then and several updates later. So this may be an ARM thing.
Best Regards,
--- mike t.
A couple of things I tried:
-
Looked around the xmr-node-proxy folder and didn't find any folder named ./node_modules/cryptonight-hashing
-
I tried to install Snipa22's version, and I get the same error.
Dug some more. It seems rapidjson needs to be included somewhere in github.com/MoneroOcean/node-cryptonight-hashing. xmrig-mo has it.
Ok. Finally got it to compile properly by:
- Clone github.com/MoneroOcean/node-cryptonight-hashing.git
- Clone github.com/MoneroOcean/xmrig.git
- Copied over rapidjson from xmrig to node-cryptonight-hashing
- Edited multihashing.cc (in node-cryptonight-hashing) to change _mm_malloc(size, alignment) to malloc(size) as apparently there is no _mm_malloc on ARM
- Run the xmr-node-proxy installer (the curl ... | bash thing). This will end in error.
- Edited packages.json of xmr-node-proxy and point cryptonight-hashing to my local copy
- Execute
. ./install.shagain.
Now to test if this works properly ...
Well ... that didn't work ... spoke to soon :(
proxy.js crashed immediately.
ran npm rebuild, and got this:
In file included from ../xmrig/crypto/cn/CryptoNight_arm.h:35,
from ../xmrig/crypto/cn/CnHash.cpp:35:
../xmrig/crypto/cn/soft_aes.h:31:13: fatal error: crypto/cn/sse2neon.h: No such file or directory
31 | # include "crypto/cn/sse2neon.h"
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Tracked down the problem. Renamed SSE2NEON.h to sse2neon.h
Ran npm rebuild again. And got this:
In file included from ../xmrig/crypto/cn/CryptoNight_arm.h:36,
from ../xmrig/crypto/cn/CnHash.cpp:35:
../xmrig/crypto/common/portable/mm_malloc.h:41:72: error: redefinition of ‘void* _mm_malloc(size_t, size_t)’
41 | static __inline__ void *__attribute__((__always_inline__, __malloc__)) _mm_malloc(size_t __size, size_t __align)
| ^~~~~~~~~~
In file included from ../xmrig/crypto/cn/soft_aes.h:31,
from ../xmrig/crypto/cn/CryptoNight_arm.h:35,
from ../xmrig/crypto/cn/CnHash.cpp:35:
../xmrig/crypto/cn/sse2neon.h:4060:20: note: ‘void* _mm_malloc(size_t, size_t)’ previously defined here
4060 | FORCE_INLINE void *_mm_malloc(size_t size, size_t align)
| ^~~~~~~~~~
In file included from ../xmrig/crypto/cn/CryptoNight_arm.h:36,
from ../xmrig/crypto/cn/CnHash.cpp:35:
../xmrig/crypto/common/portable/mm_malloc.h:60:59: error: redefinition of ‘void _mm_free(void*)’
60 | static __inline__ void __attribute__((__always_inline__)) _mm_free(void *__p)
| ^~~~~~~~
In file included from ../xmrig/crypto/cn/soft_aes.h:31,
from ../xmrig/crypto/cn/CryptoNight_arm.h:35,
from ../xmrig/crypto/cn/CnHash.cpp:35:
../xmrig/crypto/cn/sse2neon.h:4072:19: note: ‘void _mm_free(void*)’ previously defined here
4072 | FORCE_INLINE void _mm_free(void *addr)
| ^~~~~~~~
In file included from ../xmrig/crypto/cn/CnHash.cpp:35:
../xmrig/crypto/cn/CryptoNight_arm.h:78:54: error: redefinition of ‘__m128i _mm_aesenc_si128(__m128i, __m128i)’
78 | static inline __attribute__((always_inline)) __m128i _mm_aesenc_si128(__m128i v, __m128i rkey)
| ^~~~~~~~~~~~~~~~
In file included from ../xmrig/crypto/cn/soft_aes.h:31,
from ../xmrig/crypto/cn/CryptoNight_arm.h:35,
from ../xmrig/crypto/cn/CnHash.cpp:35:
../xmrig/crypto/cn/sse2neon.h:4017:16: note: ‘__m128i _mm_aesenc_si128(__m128i, __m128i)’ previously defined here
4017 | inline __m128i _mm_aesenc_si128(__m128i a, __m128i b)
| ^~~~~~~~~~~~~~~~
In file included from ../xmrig/crypto/cn/CnHash.cpp:35:
../xmrig/crypto/cn/CryptoNight_arm.h:93:55: error: redefinition of ‘uint64_t _mm_cvtsi128_si64(__m128i)’
93 | static inline __attribute__((always_inline)) uint64_t _mm_cvtsi128_si64(__m128i a)
| ^~~~~~~~~~~~~~~~~
In file included from ../xmrig/crypto/cn/soft_aes.h:31,
from ../xmrig/crypto/cn/CryptoNight_arm.h:35,
from ../xmrig/crypto/cn/CnHash.cpp:35:
../xmrig/crypto/cn/sse2neon.h:3240:23: note: ‘uint64_t _mm_cvtsi128_si64(__m128i)’ previously defined here
3240 | FORCE_INLINE uint64_t _mm_cvtsi128_si64(__m128i a)
| ^~~~~~~~~~~~~~~~~
make: *** [cryptonight-hashing.target.mk:178: Release/obj.target/cryptonight-hashing/xmrig/crypto/cn/CnHash.o] Error 1
make: Leaving directory '/home/xnp/node-cryptonight-hashing/build'
Gotta go for now. Will have another crack at this tomorrow.
Any fix?