xmr-node-proxy icon indicating copy to clipboard operation
xmr-node-proxy copied to clipboard

Problem with installing cryptonight-hashing (Deployment via Docker)

Open dschiffel opened this issue 5 years ago • 1 comments

Hi! I trying to run node-proxy on OSX, but I still get this error when I run ./update.sh. Can anybody help me? I think the container was build successful.

> [email protected] install /Users/Ducho/Crypto/node-proxy/xmr-node-proxy/node_modules/cryptonight-hashing
> node-gyp rebuild

grep: /proc/cpuinfo: No such file or directory
grep: /proc/cpuinfo: No such file or directory
gyp: Call to 'grep Intel /proc/cpuinfo >/dev/null && echo -DCPU_INTEL || (grep AMD /proc/cpuinfo >/dev/null && (test `awk '/cpu family/ && $NF~/^[0-9]*$/ {print $NF}' /proc/cpuinfo | head -n1` -ge 23 && echo -DCPU_AMD || echo -DCPU_AMD_OLD) || echo)' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/13.2.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Ducho/Crypto/node-proxy/xmr-node-proxy/node_modules/cryptonight-hashing
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Regards! D.

dschiffel avatar Dec 01 '19 20:12 dschiffel

There's no /proc/cpu on macOS so you have to detect supported CPU extension via sysctl or set flags manually... Just fork it and edit these lines. https://github.com/MoneroOcean/node-cryptonight-hashing/blob/master/binding.gyp#L76

djfinch avatar Dec 01 '19 20:12 djfinch