storj-archived/storjshare-daemon

Unable to compile code on Raspberry Pi

Arleseydiver opened this issue · 2 comments

Package Versions

Replace the values below using the output from storjshare --version.

N/A

Replace the values below using the output from node --version.
v8.9.4

Expected Behavior

npm install --global storjshare-daemon
should compile

Actual Behavior

I get the errors pasted below when running "npm install --global storjshare-daemon"
Not sure what i'm doing wrong, please advise.
....

node-gyp rebuild

make: Entering directory '/home/storjusr/.nvm/versions/node/v8.9.4/lib/node_modules/storjshare-daemon/node_modules/diskusage/build'
CXX(target) Release/obj.target/diskusage/src/main.o
cc1plus: error: unrecognized command line option ‘-std=c++11’
diskusage.target.mk:96: recipe for target 'Release/obj.target/diskusage/src/main.o' failed
make: *** [Release/obj.target/diskusage/src/main.o] Error 1
make: Leaving directory '/home/storjusr/.nvm/versions/node/v8.9.4/lib/node_modules/storjshare-daemon/node_modules/diskusage/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/storjusr/.nvm/versions/node/v8.9.4/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.4.46+
gyp ERR! command "/home/storjusr/.nvm/versions/node/v8.9.4/bin/node" "/home/storjusr/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/storjusr/.nvm/versions/node/v8.9.4/lib/node_modules/storjshare-daemon/node_modules/diskusage
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! diskusage@0.2.4 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the diskusage@0.2.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/storjusr/.npm/_logs/2018-01-24T20_56_14_885Z-debug.log

You use a version of g++ which doesn't support -std=c++11.
Had the same problem on Centos 6. Updating the g++ fixed it.

$ gcc --version
gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)

$ g++ --version
g++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)

Thanks. It now compiles. I was using wheezy distro, and did a clean install of raspbian stretch.