{"action":"closed","issue":{"url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/89","labels_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/89/comments","events_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/89/events","html_url":"https://github.com/barrysteyn/node-scrypt/issues/89","id":106920022,"number":89,"title":"Fails to build in node v4.0.x","user":{"login":"mike-marcacci","id":690517,"avatar_url":"https://avatars.githubusercontent.com/u/690517?v=3","gravatar_id":"","url":"https://api.github.com/users/mike-marcacci","html_url":"https://github.com/mike-marcacci","followers_url":"https://api.github.com/users/mike-marcacci/followers","following_url":"https://api.github.com/users/mike-marcacci/following{/other_user}","gists_url":"https://api.github.com/users/mike-marcacci/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-marcacci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-marcacci/subscriptions","organizations_url":"https://api.github.com/users/mike-marcacci/orgs","repos_url":"https://api.github.com/users/mike-marcacci/repos","events_url":"https://api.github.com/users/mike-marcacci/events{/privacy}","received_events_url":"https://api.github.com/users/mike-marcacci/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-17T06:30:40Z","updated_at":"2015-09-17T12:43:02Z","closed_at":"2015-09-17T12:43:02Z","body":"Hey there! Just a quick heads-up that this library fails to build in NodeJS v4 on both mac and linux. Here's a quick dump of the error in case it's useful:\r\n\r\n```\r\n> scrypt@4.0.7 install /Users/mikemarcacci/Documents/Repositories/gandhi/node_modules/scrypt\r\n> node-gyp rebuild\r\n\r\n  COPY ../scrypt/scrypt-1.1.6/config.h\r\n  SOLINK_MODULE(target) Release/copied_files.node\r\n  CC(target) Release/obj.target/scrypt_wrapper/src/util/salt.o\r\n  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/keyderivation.o\r\n  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/pickparams.o\r\n  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/hash.o\r\n  LIBTOOL-STATIC Release/scrypt_wrapper.a\r\n  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/crypto/sha256.o\r\n  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/crypto/crypto_scrypt-sse.o\r\n  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/scryptenc/scryptenc_cpuperf.o\r\n  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/util/memlimit.o\r\n  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/scryptenc/scryptenc.o\r\n  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/crypto/crypto_aesctr.o\r\n  LIBTOOL-STATIC Release/scrypt_lib.a\r\n  CXX(target) Release/obj.target/scrypt/scrypt_node.o\r\nIn file included from ../scrypt_node.cc:28:\r\n../node_modules/nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'\r\n  NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {\r\n                          ^\r\n../node_modules/nan/nan.h:319:17: note: previous definition is here\r\n  v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {\r\n                ^\r\n../node_modules/nan/nan.h:344:27: error: redefinition of 'NanEnsureLocal'\r\n  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {\r\n                          ^\r\n../node_modules/nan/nan.h:334:27: note: previous definition is here\r\n  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {\r\n                          ^\r\n../node_modules/nan/nan.h:757:13: error: no member named 'smalloc' in namespace 'node'\r\n    , node::smalloc::FreeCallback callback\r\n      ~~~~~~^\r\n../node_modules/nan/nan.h:768:12: error: no matching function for call to 'New'\r\n    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);\r\n           ^~~~~~~~~~~~~~~~~\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from\r\n      'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                       ^\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *')\r\n      would lose const qualifier\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                       ^\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3\r\n      were provided\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);\r\n                                       ^\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3\r\n      were provided\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                       ^\r\nIn file included from ../scrypt_node.cc:28:\r\n../node_modules/nan/nan.h:772:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'\r\n    return node::Buffer::New(v8::Isolate::GetCurrent(), size);\r\n           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no\r\n      known conversion from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument\r\nclass Local {\r\n      ^\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no\r\n      known conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument\r\nclass Local {\r\n      ^\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against\r\n      'MaybeLocal'\r\n  V8_INLINE Local(Local<S> that)\r\n            ^\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against\r\n      'v8::MaybeLocal<v8::Object>'\r\n  V8_INLINE Local(S* that)\r\n            ^\r\nIn file included from ../scrypt_node.cc:28:\r\n../node_modules/nan/nan.h:779:26: error: no member named 'Use' in namespace 'node::Buffer'\r\n    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);\r\n           ~~~~~~~~~~~~~~^\r\nIn file included from ../scrypt_node.cc:27:\r\nIn file included from /Users/mikemarcacci/.node-gyp/4.0.0/include/node/node.h:42:\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type\r\n      'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:501:12: note: in instantiation of function template specialization\r\n      'v8::Local<v8::Primitive>::Local<v8::Value>' requested here\r\n    return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));\r\n           ^\r\n../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../scrypt_node.cc:27:\r\nIn file included from /Users/mikemarcacci/.node-gyp/4.0.0/include/node/node.h:42:\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Boolean *volatile' from incompatible type\r\n      'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:511:12: note: in instantiation of function template specialization 'v8::Local<v8::Boolean>::Local<v8::Value>'\r\n      requested here\r\n    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));\r\n           ^\r\n../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../scrypt_node.cc:27:\r\nIn file included from /Users/mikemarcacci/.node-gyp/4.0.0/include/node/node.h:42:\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Function *volatile' from incompatible type\r\n      'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:1645:12: note: in instantiation of function template specialization\r\n      'v8::Local<v8::Function>::Local<v8::Value>' requested here\r\n    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)\r\n           ^\r\n../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../scrypt_node.cc:27:\r\nIn file included from /Users/mikemarcacci/.node-gyp/4.0.0/include/node/node.h:42:\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Object *volatile' from incompatible type\r\n      'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/mikemarcacci/.node-gyp/4.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:1776:12: note: in instantiation of function template specialization 'v8::Local<v8::Object>::Local<v8::Value>'\r\n      requested here\r\n    return NanEscapeScope(\r\n           ^\r\n../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))\r\n                             ^\r\n10 errors generated.\r\nmake: *** [Release/obj.target/scrypt/scrypt_node.o] Error 1\r\ngyp ERR! build error \r\ngyp ERR! stack Error: `make` failed with exit code: 2\r\ngyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/nvm/0.25.0/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)\r\ngyp ERR! stack     at emitTwo (events.js:87:13)\r\ngyp ERR! stack     at ChildProcess.emit (events.js:172:7)\r\ngyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)\r\ngyp ERR! System Darwin 14.5.0\r\ngyp ERR! command \"/usr/local/Cellar/nvm/0.25.0/versions/node/v4.0.0/bin/node\" \"/usr/local/Cellar/nvm/0.25.0/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"\r\ngyp ERR! cwd /Users/mikemarcacci/Documents/Repositories/gandhi/node_modules/scrypt\r\ngyp ERR! node -v v4.0.0\r\ngyp ERR! node-gyp -v v3.0.1\r\ngyp ERR! not ok \r\n\r\nnpm ERR! Darwin 14.5.0\r\nnpm ERR! argv \"/usr/local/Cellar/nvm/0.25.0/versions/node/v4.0.0/bin/node\" \"/usr/local/opt/nvm/versions/node/v4.0.0/bin/npm\" \"rebuild\"\r\nnpm ERR! node v4.0.0\r\nnpm ERR! npm  v2.14.2\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! scrypt@4.0.7 install: `node-gyp rebuild`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the scrypt@4.0.7 install script 'node-gyp rebuild'.\r\nnpm ERR! This is most likely a problem with the scrypt package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     node-gyp rebuild\r\nnpm ERR! You can get their info via:\r\nnpm ERR!     npm owner ls scrypt\r\nnpm ERR! There is likely additional logging output above.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     /Users/mikemarcacci/Documents/Repositories/gandhi/npm-debug.log\r\n```"}}