Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to build on Ubuntu 20.04 ARM platform #138

Open
tinsami1 opened this issue Jun 22, 2021 · 5 comments
Open

Trying to build on Ubuntu 20.04 ARM platform #138

tinsami1 opened this issue Jun 22, 2021 · 5 comments

Comments

@tinsami1
Copy link

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.

@tinsami1
Copy link
Author

A couple of things I tried:

  1. Looked around the xmr-node-proxy folder and didn't find any folder named ./node_modules/cryptonight-hashing

  2. I tried to install Snipa22's version, and I get the same error.

@tinsami1
Copy link
Author

Dug some more. It seems rapidjson needs to be included somewhere in github.com/MoneroOcean/node-cryptonight-hashing. xmrig-mo has it.

@tinsami1
Copy link
Author

Ok. Finally got it to compile properly by:

  1. Clone github.com/MoneroOcean/node-cryptonight-hashing.git
  2. Clone github.com/MoneroOcean/xmrig.git
  3. Copied over rapidjson from xmrig to node-cryptonight-hashing
  4. 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
  5. Run the xmr-node-proxy installer (the curl ... | bash thing). This will end in error.
  6. Edited packages.json of xmr-node-proxy and point cryptonight-hashing to my local copy
  7. Execute . ./install.sh again.

Now to test if this works properly ...

@tinsami1
Copy link
Author

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.

@tinsami1 tinsami1 changed the title Initial build error: "../xmrig-override/backend/cpu/platform/BasicCpuInfo_arm.cpp:37:10: fatal error: 3rdparty/rapidjson/document.h: No such file or directory" Trying to build on Ubuntu 20.04 ARM platform Jun 22, 2021
@ghost ghost mentioned this issue Aug 18, 2021
@peter-rs
Copy link

peter-rs commented Feb 1, 2022

Any fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants