Installation Problem with NVM
waylonflinn opened this issue · comments
Probably a low priority, but I ran into an issue when installing in conjunction with nvm
.
The install seems to be using the headers from my system node
(node@v0.10.25
) instead of my nvm
selected version (node@v4.0.0
). The obvious workaround is just to upgrade the system level node
.
Just thought I'd go ahead and document this, since I ran into it.
waylonflinn@cecil:~/Development/js-vec-collection/vectorious$ npm install
-
> nblas@0.1.0 install /home/waylonflinn/Development/js-vec-collection/vectorious/node_modules/nblas
> node-gyp configure && node-gyp rebuild
make: Entering directory `/home/waylonflinn/Development/js-vec-collection/vectorious/node_modules/nblas/build'
CXX(target) Release/obj.target/addon/addon.o
CXX(target) Release/obj.target/addon/functions/dot.o
../functions/dot.cc:3:11: error: ‘v8::Float64Array’ has not been declared
using v8::Float64Array;
^
../functions/dot.cc:4:11: error: ‘v8::Float32Array’ has not been declared
using v8::Float32Array;
^
In file included from /home/waylonflinn/.node-gyp/0.10.25/src/node_buffer.h:28:0,
from ../node_modules/nan/nan.h:46,
from ../functions/dot.h:4,
from ../functions/dot.cc:1:
../functions/dot.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE ddot(Nan::NAN_METHOD_ARGS_TYPE)’:
../functions/dot.cc:13:19: error: ‘class v8::Value’ has no member named ‘IsFloat64Array’
assert(info[1]->IsFloat64Array());
^
../functions/dot.cc:14:19: error: ‘class v8::Value’ has no member named ‘IsFloat64Array’
assert(info[3]->IsFloat64Array());
^
../functions/dot.cc:16:29: error: ‘Float64Array’ was not declared in this scope
void *x_data = info[1].As<Float64Array>()->Buffer()->GetContents().Data(),
^
../functions/dot.cc:16:43: error: no matching function for call to ‘v8::Local<v8::Value>::As()’
void *x_data = info[1].As<Float64Array>()->Buffer()->GetContents().Data(),
^
../functions/dot.cc:16:43: note: candidate is:
In file included from /home/waylonflinn/.node-gyp/0.10.25/src/node.h:62:0,
from ../node_modules/nan/nan.h:45,
from ../functions/dot.h:4,
from ../functions/dot.cc:1:
/home/waylonflinn/.node-gyp/0.10.25/deps/v8/include/v8.h:291:38: note: template<class S> v8::Local<S> v8::Local<T>::As() [with S = S; T = v8::Value]
template <class S> inline Local<S> As() {
^
/home/waylonflinn/.node-gyp/0.10.25/deps/v8/include/v8.h:291:38: note: template argument deduction/substitution failed:
../functions/dot.cc:16:43: error: template argument 1 is invalid
void *x_data = info[1].As<Float64Array>()->Buffer()->GetContents().Data(),
^
../functions/dot.cc:20:41: error: ‘y_data’ was not declared in this scope
*y = reinterpret_cast<double*>(y_data);
^
In file included from /home/waylonflinn/.node-gyp/0.10.25/src/node_buffer.h:28:0,
from ../node_modules/nan/nan.h:46,
from ../functions/dot.h:4,
from ../functions/dot.cc:1:
../functions/dot.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE sdot(Nan::NAN_METHOD_ARGS_TYPE)’:
../functions/dot.cc:32:19: error: ‘class v8::Value’ has no member named ‘IsFloat32Array’
assert(info[1]->IsFloat32Array());
^
../functions/dot.cc:33:19: error: ‘class v8::Value’ has no member named ‘IsFloat32Array’
assert(info[3]->IsFloat32Array());
^
../functions/dot.cc:35:29: error: ‘Float32Array’ was not declared in this scope
void *x_data = info[1].As<Float32Array>()->Buffer()->GetContents().Data(),
^
../functions/dot.cc:35:43: error: no matching function for call to ‘v8::Local<v8::Value>::As()’
void *x_data = info[1].As<Float32Array>()->Buffer()->GetContents().Data(),
^
../functions/dot.cc:35:43: note: candidate is:
In file included from /home/waylonflinn/.node-gyp/0.10.25/src/node.h:62:0,
from ../node_modules/nan/nan.h:45,
from ../functions/dot.h:4,
from ../functions/dot.cc:1:
/home/waylonflinn/.node-gyp/0.10.25/deps/v8/include/v8.h:291:38: note: template<class S> v8::Local<S> v8::Local<T>::As() [with S = S; T = v8::Value]
template <class S> inline Local<S> As() {
^
/home/waylonflinn/.node-gyp/0.10.25/deps/v8/include/v8.h:291:38: note: template argument deduction/substitution failed:
../functions/dot.cc:35:43: error: template argument 1 is invalid
void *x_data = info[1].As<Float32Array>()->Buffer()->GetContents().Data(),
^
../functions/dot.cc:39:39: error: ‘y_data’ was not declared in this scope
*y = reinterpret_cast<float*>(y_data);
^
make: *** [Release/obj.target/addon/functions/dot.o] Error 1
make: Leaving directory `/home/waylonflinn/Development/js-vec-collection/vectorious/node_modules/nblas/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:269:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-46-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/waylonflinn/Development/js-vec-collection/vectorious/node_modules/nblas
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Linux 3.13.0-46-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.25
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! nblas@0.1.0 install: `node-gyp configure && node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nblas@0.1.0 install script 'node-gyp configure && node-gyp rebuild'.
npm ERR! This is most likely a problem with the nblas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure && node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls nblas
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/waylonflinn/Development/js-vec-collection/vectorious/npm-debug.log
I use n
for node version control and no problems. Could it be nvm-specific?
It probably is nvm specific. I'll check out n
, and see what happens.
Think I can close this?
This looks like the relevant nvm issue:
nvm-sh/nvm#397
close away.