chad3814 / node-hashtable

Native hashtable interface for when V8 objects can't take the heat
MIT License
106 stars 41 forks source link

Build fails on raspberry pi #25

Closed sponnet closed 8 years ago

sponnet commented 8 years ago

Trying to install your module on a raspberry pi ( Raspbian GNU/Linux 7 ) but the build of the C module fails.

hashtable@2.0.1 install /mnt/backup/home/pi/server/node_modules/hashtable node-gyp configure build

make: Entering directory '/mnt/backup/home/pi/server/node_modules/hashtable/build' CXX(target) Release/obj.target/native/src/hashtable.o cc1plus: error: unrecognized command line option '-std=c++11' native.target.mk:92: recipe for target 'Release/obj.target/native/src/hashtable.o' failed make: *\ [Release/obj.target/native/src/hashtable.o] Error 1 make: Leaving directory '/mnt/backup/home/pi/server/node_modules/hashtable/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 4.1.7-v7+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" gyp ERR! cwd /mnt/backup/home/pi/server/node_modules/hashtable gyp ERR! node -v v5.5.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok

I'll try to fix it - if you have more clues on how to fix it , please let me know..

sponnet commented 8 years ago

Hi,

I managed to get it building by updating my gcc from version 4.6 to 4.7. sudo apt-get install g++-4.7 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7 sudo update-alternatives --config gcc

Now it builds happily on my RPI.

chad3814 commented 8 years ago

Thanks for the update.