TooTallNate / ref

Turn Buffer instances into "pointers"
http://tootallnate.github.com/ref
453 stars 141 forks source link

v0.2.0 Install fails on Ubuntu #15

Closed EugeneKostrikov closed 10 years ago

EugeneKostrikov commented 10 years ago

Hi! Package 0.2.0 fails to install with this error.

  CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc: In instantiation of ‘void {anonymous}::write_object_cb(v8::Persistent<v8::Value>, void*) [with T = v8::Object; P = void]’:
../src/binding.cc:187:116:   required from here
../src/binding.cc:150:1: error: ‘_Nan_Weak_Callback_write_object_cb’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
../src/binding.cc:150:1: note: ‘template<class T, class P> void {anonymous}::_Nan_Weak_Callback_write_object_cb(const _NanWeakCallbackData<T, P>&)’ declared here, later in the translation unit
make: *** [Release/obj.target/binding/src/binding.o] Error 1
mjvdende commented 10 years ago
> ref@0.2.0 install /app/node_modules/exec-sync/node_modules/ffi/node_modules/ref
> node-gyp rebuild

make: Entering directory `/app/node_modules/exec-sync/node_modules/ffi/node_modules/ref/build'
  CXX(target) Release/obj.target/binding/src/binding.o
In file included from ../src/binding.cc:8:0:
../src/binding.cc: In instantiation of ‘void {anonymous}::write_object_cb(v8::Persistent<v8::Value>, void*) [with T = v8::Object; P = void]’:
../src/binding.cc:187:116:   required from here
../node_modules/nan/nan.h:1404:41: error: ‘_Nan_Weak_Callback_write_object_cb’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
         _Nan_Weak_Callback_ ## name(wcbd);                                     \
                                         ^
../src/binding.cc:150:1: note: in expansion of macro ‘NAN_WEAK_CALLBACK’
 NAN_WEAK_CALLBACK(write_object_cb) {
 ^
../node_modules/nan/nan.h:1409:28: note: ‘template<class T, class P> void {anonymous}::_Nan_Weak_Callback_write_object_cb(const _NanWeakCallbackData<T, P>&)’ declared here, later in the translation unit
     static NAN_INLINE void _Nan_Weak_Callback_ ## name(                        \
                            ^
../src/binding.cc:150:1: note: in expansion of macro ‘NAN_WEAK_CALLBACK’
 NAN_WEAK_CALLBACK(write_object_cb) {
 ^
make: *** [Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory `/app/node_modules/exec-sync/node_modules/ffi/node_modules/ref/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/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:797:12)
gyp ERR! System Linux 3.11.0-20-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/node_modules/exec-sync/node_modules/ffi/node_modules/ref
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! ref@0.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ref@0.2.0 install script.
npm ERR! This is most likely a problem with the ref 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 ref
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-20-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /app
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /app/npm-debug.log
npm ERR! not ok code 0
meredian commented 10 years ago

ffi module lead me here with same problem. Curse on those, who use "*" as matching module version for public releases:

{
    "name": "ffi",
....
    "dependencies": {
        "ref": "*",
    }
}
ghost commented 10 years ago

The same here on Mac OS:

> ref@0.2.0 install /Users/davidhorsak/Projects/whatever/node_modules/ffi/node_modules/ref
> node-gyp rebuild

  CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:150:1: error: call to function '_Nan_Weak_Callback_write_object_cb' that is neither visible in the template definition nor found by argument-dependent lookup
NAN_WEAK_CALLBACK(write_object_cb) {
^
../node_modules/nan/nan.h:1404:9: note: expanded from macro 'NAN_WEAK_CALLBACK'
        _Nan_Weak_Callback_ ## name(wcbd);                                     \
        ^
<scratch space>:85:1: note: expanded from here
_Nan_Weak_Callback_write_object_cb
^
../src/binding.cc:187:87: note: in instantiation of function template specialization '<anonymous namespace>::write_object_cb<v8::Object, void>' requested here
    _NanWeakCallbackInfo<Object, void>* info = NanMakeWeakPersistent(val, user_data, &write_object_cb<Object, void>);
                                                                                      ^
../src/binding.cc:150:1: note: '_Nan_Weak_Callback_write_object_cb' should be declared prior to the call site or in an associated namespace of one of its arguments
NAN_WEAK_CALLBACK(write_object_cb) {
^
../node_modules/nan/nan.h:1409:28: note: expanded from macro 'NAN_WEAK_CALLBACK'
    static NAN_INLINE void _Nan_Weak_Callback_ ## name(                        \
                           ^
<scratch space>:86:1: note: expanded from here
_Nan_Weak_Callback_write_object_cb
^
1 error generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
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:267: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 Darwin 13.1.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/davidhorsak/Projects/whatever/node_modules/ffi/node_modules/ref
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! ref@0.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ref@0.2.0 install script.
npm ERR! This is most likely a problem with the ref 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 ref
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "ffi"
npm ERR! cwd /Users/davidhorsak/Projects/whatever
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/davidhorsak/Projects/whatever/npm-debug.log
npm ERR! not ok code 0
lukebarton commented 10 years ago

Temporary fix for your projects: package.json

...
  "dependencies": {
    "ref" : "~0.1.3"
  }
...
mroderick commented 10 years ago

@lukebarton's temporary fix works for me

TooTallNate commented 10 years ago

Ok guys v0.2.1 should work now.