Snipa22 / nodejs-pool

Other
480 stars 423 forks source link

cryptonote-util build fails #220

Open mtompkins opened 6 years ago

mtompkins commented 6 years ago

I've found the npm install fails with trying to build cryptonote-util

I've tried this on a 17.04 box as well as a VM 16.04 with the build script. Same results on both. I tried a couple random forks and found modifying the package.json to this repo did compile FWIW:

"cryptonote-util": "git://github.com/svirusxxx/node-cryptonote-util.git#xmr-Nan-2.0",

I've tried both GCC 6 & 7 if that's helpful.

make: Entering directory '/home/monero/nodejs-pool/node_modules/cryptonote-util/build'
  CXX(target) Release/obj.target/cryptonote/src/main.o
  CXX(target) Release/obj.target/cryptonote/src/cryptonote_core/cryptonote_format_utils.o
../src/cryptonote_core/cryptonote_format_utils.cpp: In function ‘bool cryptonote::check_proof_of_work(const cryptonote::block&, cryptonote::difficulty_type, crypto::hash&)’:
../src/cryptonote_core/cryptonote_format_utils.cpp:938:3: warning: no return statement in function returning non-void [-Wreturn-type]
   }
   ^
  CC(target) Release/obj.target/cryptonote/src/crypto/tree-hash.o
  CXX(target) Release/obj.target/cryptonote/src/crypto/crypto.o
../src/crypto/crypto.cpp: In function ‘std::size_t crypto::rs_comm_size(std::size_t)’:
../src/crypto/crypto.cpp:224:58: error: value-initialization of incomplete type ‘crypto::rs_comm::<unnamed struct> []’
     return sizeof(rs_comm) + pubs_count * sizeof(rs_comm().ab[0]);
                                                          ^
cryptonote.target.mk:115: recipe for target 'Release/obj.target/cryptonote/src/crypto/crypto.o' failed
make: *** [Release/obj.target/cryptonote/src/crypto/crypto.o] Error 1
make: Leaving directory '/home/monero/nodejs-pool/node_modules/cryptonote-util/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/monero/.nvm/versions/node/v8.9.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.9.70-17.12.16.18.44
gyp ERR! command "/home/monero/.nvm/versions/node/v8.9.3/bin/node" "/home/monero/.nvm/versions/node/v8.9.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/monero/nodejs-pool/node_modules/cryptonote-util
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
sebseb7 commented 6 years ago

https://github.com/monero-project/monero/pull/845/commits/0f7956d0e4d811941cebfa088113e28452ec6d5c

You have to use boost 1.58

bobbieltd commented 6 years ago

It’s strange because he forked from Snipa without any modification. Quote : “This branch is even with Snipa22:master.” Anyway, I didn’t encounter any errors from cryptonote-util.

jimoquinn commented 6 years ago

Don't recall the exact error that I received, but the reason my cryptonote-util build failed was due to an old processor that didn't support AES_IN.

Since you should be installing on Ubuntu 16.04.03, this command will run and return 'aes' if your CPU has support:

Example: root@rm-fr:~# grep -m1 -o aes /proc/cpuinfo aes