Closed maialithar closed 10 years ago
Additional info: when I install it manually it seems to work fine:
my_machine:/usr/lib/node_modules # git clone https://github.com/bnoordhuis/node-buffertools.git buffertools
Cloning into 'buffertools'...
remote: Reusing existing pack: 311, done.
remote: Total 311 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (311/311), 62.97 KiB | 0 bytes/s, done.
Resolving deltas: 100% (163/163), done.
Checking connectivity... done
my_machine:/usr/lib/node_modules # cd buffertools/
my_machine:/usr/lib/node_modules/buffertools # node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@0.13.0
gyp info using node@0.10.5 | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/buffertools/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.node-gyp/0.10.5/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/0.10.5',
gyp info spawn args '-Dmodule_root_dir=/usr/lib/node_modules/buffertools',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/usr/lib/node_modules/buffertools/build'
CXX(target) Release/obj.target/buffertools/buffertools.o
SOLINK_MODULE(target) Release/obj.target/buffertools.node
SOLINK_MODULE(target) Release/obj.target/buffertools.node: Finished
COPY Release/buffertools.node
make: Leaving directory `/usr/lib/node_modules/buffertools/build'
gyp info ok
Is that a fedora system? The system v8 (and by extension, its headers) is too new to work with V8 3.14, the V8 that ships with node.js v0.10. I speculate that npm install -g
picks up the system headers whereas node-gyp rebuild
doesn't.
It's openSUSE 13.1. My libv8-3
is at version 3.22.24.8. Any chance to get it working? Or do I have to wait for node update?
If there are no other packages that depend on libv8, then it's easiest to uninstall it. You don't need it for node because V8 is statically linked into the binary.
buffertools
won't even try to install without v8:
webaplikacje:~ # zypper remove libv8-3 v8-devel
...
(1/2) Removing v8-devel-3.22.24.8-2.4.1 [done]
(2/2) Removing libv8-3-3.22.24.8-2.4.1 [done]
my_machine:~ # npm -g install buffertools
npm http GET https://registry.npmjs.org/buffertools
npm http 304 https://registry.npmjs.org/buffertools
> buffertools@2.0.1 install /usr/lib/node_modules/buffertools
> node-gyp rebuild
make: Entering directory `/usr/lib/node_modules/buffertools/build'
CXX(target) Release/obj.target/buffertools/buffertools.o
In file included from ../buffertools.cc:17:0:
/usr/include/node/node.h:62:16: fatal error: v8.h: No such file or directory
#include "v8.h"
^
compilation terminated.
make: *** [Release/obj.target/buffertools/buffertools.o] Error 1
make: Leaving directory `/usr/lib/node_modules/buffertools/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib64/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Linux 3.11.6-4-desktop
gyp ERR! command "node" "/usr/lib64/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/buffertools
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! buffertools@2.0.1 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the buffertools@2.0.1 install script.
npm ERR! This is most likely a problem with the buffertools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls buffertools
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.6-4-desktop
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "-g" "install" "buffertools"
npm ERR! cwd /root
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0
my_machine:~ #
I suspect something's off with your install. Can you try rm -fr $HOME/.node-gyp/
followed by a rebuild? If that doesn't work, maybe try as non-root.
By the way, you should consider upgrading to the latest v0.10. There have been a number of critical bugs fixed since v0.10.5.
Upgrading node helped, thanks. The latest possible version I have in my repo is v0.10.17. Thanks for your help!
Unfortunatelly, it fails to install with npm:
Some additional info:
libv8-3
is installed on my system along withv8-devel
andv8-private-headers-devel
. What else is required?