sendanor / node-crypt3

crypt(3) for Node.js
MIT License
19 stars 18 forks source link

crypt3 doesn't build with stable node v4.0 #9

Closed hexparrot closed 9 years ago

hexparrot commented 9 years ago

Reporting this from Ubuntu 14.04, though it's also occurring on different distros.

will@willonubuntu:~/test$ npm install crypt3
|
> crypt3@0.1.8 install /home/will/test/node_modules/crypt3
> node-gyp rebuild

make: Entering directory `/home/will/test/node_modules/crypt3/build'
  CXX(target) Release/obj.target/crypt3/crypt3.o
In file included from ../crypt3.cc:7:0:
../node_modules/nan/nan.h:324:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local&)’
   NAN_INLINE v8::Local NanEnsureHandleOrPersistent(const v8::Local &val) {
                           ^
../node_modules/nan/nan.h:319:17: error: ‘template v8::Handle Nan::imp::NanEnsureHandleOrPersistent(v8::Handle&)’ previously declared here
   v8::Handle NanEnsureHandleOrPersistent(const v8::Handle &val) {
                 ^
../node_modules/nan/nan.h:344:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureLocal(v8::Handle&)’
   NAN_INLINE v8::Local NanEnsureLocal(const v8::Handle &val) {
                           ^
../node_modules/nan/nan.h:334:27: error: ‘template v8::Local Nan::imp::NanEnsureLocal(const v8::Local&)’ previously declared here
   NAN_INLINE v8::Local NanEnsureLocal(const v8::Local &val) {
                           ^
../node_modules/nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../node_modules/nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../node_modules/nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../node_modules/nan/nan.h: In function ‘v8::Local NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:768:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../node_modules/nan/nan.h:768:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
                 from ../crypt3.cc:7:
/home/will/.node-gyp/4.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal node::Buffer::New(v8::Isolate*, v8::Local, node::encoding) 
 NODE_EXTERN v8::MaybeLocal New(v8::Isolate* isolate,
                                        ^
/home/will/.node-gyp/4.0.0/include/node/node_buffer.h:31:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/will/.node-gyp/4.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal node::Buffer::New(v8::Isolate*, char*, size_t) 
 NODE_EXTERN v8::MaybeLocal New(v8::Isolate* isolate,
                                        ^
/home/will/.node-gyp/4.0.0/include/node/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../crypt3.cc:7:0:
../node_modules/nan/nan.h: In function ‘v8::Local NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal’ to ‘v8::Local’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                                                             ^
../node_modules/nan/nan.h: In function ‘v8::Local NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
../crypt3.cc: In function ‘void Method(const v8::FunctionCallbackInfo&)’:
../crypt3.cc:29:59: warning: ‘v8::Local node::ErrnoException(int, const char*, const char*, const char*)’ is deprecated (declared at /home/will/.node-gyp/4.0.0/include/node/node.h:99): Use UVException(isolate, ...) [-Wdeprecated-declarations]
   return NanThrowError(node::ErrnoException(errno, "crypt"));
                                                           ^
make: *** [Release/obj.target/crypt3/crypt3.o] Error 1
make: Leaving directory `/home/will/test/node_modules/crypt3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/will/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "/home/will/.nvm/versions/node/v4.0.0/bin/node" "/home/will/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/will/test/node_modules/crypt3
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "/home/will/.nvm/versions/node/v4.0.0/bin/node" "/home/will/.nvm/versions/node/v4.0.0/bin/npm" "install" "crypt3"
npm ERR! node v4.0.0
npm ERR! npm  v2.14.2
npm ERR! code ELIFECYCLE

npm ERR! crypt3@0.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crypt3@0.1.8 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the crypt3 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 crypt3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/will/test/npm-debug.log

npm-debug.log at http://pastebin.com/MipiRv0C

rolandpoulter commented 9 years ago

@hexparrot ^

hexparrot commented 9 years ago

Ah, very exciting! Thanks for your efforts!

petershaw commented 9 years ago

Is it fixed? I still have the issues. Node: v4.2.1 Npm: 2.14.7 Debian: 3.2.68-1+deb7u2

henkosch commented 9 years ago

+1

Me too! Same errors:

> node-gyp rebuild

make: Entering directory `/home/henko/test/node_modules/crypt3/build'
  CXX(target) Release/obj.target/crypt3/crypt3.o
In file included from ../crypt3.cc:7:0:
../node_modules/nan/nan.h:324:27: error: redefinition of 'template<class T> v8::Local<T> Nan::imp::NanEnsureHandleOrPersistent(const v8::Local<T>&)'
   NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                           ^
...

node: v4.2.1 npm: v2.14.7 node-gyp: v0.10.10 gcc: v4.8.4 Ubuntu: 14.04.3

aeneasr commented 7 years ago

Same issue here too, any updates? (apart from using nvm and node 0..