{"action":"opened","issue":{"url":"https://api.github.com/repos/nodejs/nan/issues/451","labels_url":"https://api.github.com/repos/nodejs/nan/issues/451/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/nan/issues/451/comments","events_url":"https://api.github.com/repos/nodejs/nan/issues/451/events","html_url":"https://github.com/nodejs/nan/issues/451","id":106135338,"number":451,"title":"Build failed with Node 4.0","user":{"login":"emersion","id":506932,"avatar_url":"https://avatars.githubusercontent.com/u/506932?v=3","gravatar_id":"","url":"https://api.github.com/users/emersion","html_url":"https://github.com/emersion","followers_url":"https://api.github.com/users/emersion/followers","following_url":"https://api.github.com/users/emersion/following{/other_user}","gists_url":"https://api.github.com/users/emersion/gists{/gist_id}","starred_url":"https://api.github.com/users/emersion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emersion/subscriptions","organizations_url":"https://api.github.com/users/emersion/orgs","repos_url":"https://api.github.com/users/emersion/repos","events_url":"https://api.github.com/users/emersion/events{/privacy}","received_events_url":"https://api.github.com/users/emersion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-12T06:14:02Z","updated_at":"2015-09-12T06:14:02Z","closed_at":null,"body":"Tried to build `bson` with Node 4.0, but some errors are triggered by `nan`. Here is the error log:\r\n\r\n```\r\n> bson-ext@0.1.12 install /home/pi/hud/node_modules/bson/node_modules/bson-ext\r\n> (node-pre-gyp install --fallback-to-build) || (node-gyp rebuild 2> builderror.log) || (exit 0)\r\n\r\nmake: Entering directory '/home/pi/hud/node_modules/bson/node_modules/bson-ext/build'\r\n  CXX(target) Release/obj.target/bson/ext/bson.o\r\nIn file included from ../ext/bson.h:17:0,\r\n                 from ../ext/bson.cc:36:\r\n../node_modules/nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’\r\n NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {\r\n                         ^\r\n../node_modules/nan/nan.h:256:25: note: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here\r\n NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {\r\n                         ^\r\n../node_modules/nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared\r\n     , node::smalloc::FreeCallback callback\r\n             ^\r\n../node_modules/nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’\r\n     , node::smalloc::FreeCallback callback\r\n                                   ^\r\n../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:\r\n../node_modules/nan/nan.h:665:50: error: ‘callback’ was not declared in this scope\r\n         v8::Isolate::GetCurrent(), data, length, callback, hint);\r\n                                                  ^\r\n../node_modules/nan/nan.h:665:60: error: ‘hint’ was not declared in this scope\r\n         v8::Isolate::GetCurrent(), data, length, callback, hint);\r\n                                                            ^\r\n../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:\r\n../node_modules/nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous\r\n     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);\r\n                                                                   ^\r\n../node_modules/nan/nan.h:672:67: note: candidates are:\r\nIn file included from ../ext/bson.cc:24:0:\r\n/home/pi/.node-gyp/4.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>\r\n NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                        ^\r\n/home/pi/.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’\r\n/home/pi/.node-gyp/4.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>\r\n NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                        ^\r\n/home/pi/.node-gyp/4.0.0/include/node/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’\r\nIn file included from ../ext/bson.h:17:0,\r\n                 from ../ext/bson.cc:36:\r\n../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:\r\n../node_modules/nan/nan.h:676:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), size)’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’\r\n     return node::Buffer::New(v8::Isolate::GetCurrent(), size);\r\n                                                             ^\r\n../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:\r\n../node_modules/nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’\r\n     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);\r\n            ^\r\n../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:\r\n../node_modules/nan/nan.h:673:3: warning: control reaches end of non-void function [-Wreturn-type]\r\n   }\r\n   ^\r\n../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:\r\n../node_modules/nan/nan.h:677:3: warning: control reaches end of non-void function [-Wreturn-type]\r\n   }\r\n   ^\r\nbson.target.mk:86: recipe for target 'Release/obj.target/bson/ext/bson.o' failed\r\nmake: *** [Release/obj.target/bson/ext/bson.o] Error 1\r\nmake: Leaving directory '/home/pi/hud/node_modules/bson/node_modules/bson-ext/build'\r\n```"}}