{"action":"created","issue":{"url":"https://api.github.com/repos/voodootikigod/node-serialport/issues/595","labels_url":"https://api.github.com/repos/voodootikigod/node-serialport/issues/595/labels{/name}","comments_url":"https://api.github.com/repos/voodootikigod/node-serialport/issues/595/comments","events_url":"https://api.github.com/repos/voodootikigod/node-serialport/issues/595/events","html_url":"https://github.com/voodootikigod/node-serialport/issues/595","id":108195095,"number":595,"title":"Build Failed with OSX10.9.5 and Ubuntu14.04?","user":{"login":"weiway","id":4580862,"avatar_url":"https://avatars.githubusercontent.com/u/4580862?v=3","gravatar_id":"","url":"https://api.github.com/users/weiway","html_url":"https://github.com/weiway","followers_url":"https://api.github.com/users/weiway/followers","following_url":"https://api.github.com/users/weiway/following{/other_user}","gists_url":"https://api.github.com/users/weiway/gists{/gist_id}","starred_url":"https://api.github.com/users/weiway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weiway/subscriptions","organizations_url":"https://api.github.com/users/weiway/orgs","repos_url":"https://api.github.com/users/weiway/repos","events_url":"https://api.github.com/users/weiway/events{/privacy}","received_events_url":"https://api.github.com/users/weiway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-24T19:14:06Z","updated_at":"2015-09-29T19:31:01Z","closed_at":null,"body":"Here's the log:\r\n```\r\nWeis-MacBook-Pro:AppChromerino Wei$ npm install serialport\r\nnpm WARN package.json app-chromerino@0.1.0 No repository field.\r\nnpm WARN package.json app-chromerino@0.1.0 No README data\r\n-\r\n> serialport@1.7.4 install /Users/Wei/Xproject/AppChromerino/node_modules/serialport\r\n> node-pre-gyp install --fallback-to-build\r\n\r\n  CXX(target) Release/obj.target/serialport/src/serialport.o\r\nIn file included from ../src/serialport.cpp:3:\r\nIn file included from ../src/serialport.h:5:\r\n../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'\r\nNAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {\r\n                        ^\r\n../node_modules/nan/nan.h:256:25: note: previous definition is here\r\nNAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {\r\n                        ^\r\n../node_modules/nan/nan.h:661:13: error: no member named 'smalloc' in namespace\r\n      'node'\r\n    , node::smalloc::FreeCallback callback\r\n      ~~~~~~^\r\n../node_modules/nan/nan.h:672: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/Wei/.node-gyp/4.1.1/include/node/node_buffer.h:31:40: note: candidate\r\n      function not viable: no known conversion from 'uint32_t'\r\n      (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/Wei/.node-gyp/4.1.1/include/node/node_buffer.h:43:40: note: candidate\r\n      function not viable: 2nd argument ('const char *') would lose const\r\n      qualifier\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                       ^\r\n/Users/Wei/.node-gyp/4.1.1/include/node/node_buffer.h:28:40: note: candidate\r\n      function not viable: requires 2 arguments, but 3 were provided\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);\r\n                                       ^\r\n/Users/Wei/.node-gyp/4.1.1/include/node/node_buffer.h:36:40: note: candidate\r\n      function not viable: requires 5 arguments, but 3 were provided\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                       ^\r\nIn file included from ../src/serialport.cpp:3:\r\nIn file included from ../src/serialport.h:5:\r\n../node_modules/nan/nan.h:676:12: error: no viable conversion from\r\n      'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'\r\n    return node::Buffer::New(v8::Isolate::GetCurrent(), size);\r\n           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:210:7: note: candidate constructor\r\n      (the implicit copy constructor) not viable: no known conversion from\r\n      'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st\r\n      argument\r\nclass Local {\r\n      ^\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:210:7: note: candidate constructor\r\n      (the implicit move constructor) not viable: no known conversion from\r\n      'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st\r\n      argument\r\nclass Local {\r\n      ^\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:214:13: note: candidate template\r\n      ignored: could not match 'Local' against 'MaybeLocal'\r\n  V8_INLINE Local(Local<S> that)\r\n            ^\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:326:13: note: candidate template\r\n      ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'\r\n  V8_INLINE Local(S* that)\r\n            ^\r\nIn file included from ../src/serialport.cpp:3:\r\nIn file included from ../src/serialport.h:5:\r\n../node_modules/nan/nan.h:683:26: error: no member named 'Use' in namespace\r\n      'node::Buffer'\r\n    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);\r\n           ~~~~~~~~~~~~~~^\r\nIn file included from ../src/serialport.cpp:3:\r\nIn file included from ../src/serialport.h:5:\r\nIn file included from ../node_modules/nan/nan.h:24:\r\nIn file included from /Users/Wei/.node-gyp/4.1.1/include/node/node.h:42:\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:221:5: error: assigning to\r\n      'v8::Primitive *volatile' from incompatible type 'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:180:37: note: expanded from macro\r\n      'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:414:12: note: in instantiation of function template\r\n      specialization '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:398:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../src/serialport.cpp:3:\r\nIn file included from ../src/serialport.h:5:\r\nIn file included from ../node_modules/nan/nan.h:24:\r\nIn file included from /Users/Wei/.node-gyp/4.1.1/include/node/node.h:42:\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:221:5: error: assigning to\r\n      'v8::Boolean *volatile' from incompatible type 'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:180:37: note: expanded from macro\r\n      'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:424:12: note: in instantiation of function template\r\n      specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here\r\n    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));\r\n           ^\r\n../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../src/serialport.cpp:3:\r\nIn file included from ../src/serialport.h:5:\r\nIn file included from ../node_modules/nan/nan.h:24:\r\nIn file included from /Users/Wei/.node-gyp/4.1.1/include/node/node.h:42:\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:221:5: error: assigning to\r\n      'v8::Function *volatile' from incompatible type 'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:180:37: note: expanded from macro\r\n      'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:1514:12: note: in instantiation of function template\r\n      specialization '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:398:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../src/serialport.cpp:3:\r\nIn file included from ../src/serialport.h:5:\r\nIn file included from ../node_modules/nan/nan.h:24:\r\nIn file included from /Users/Wei/.node-gyp/4.1.1/include/node/node.h:42:\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:221:5: error: assigning to\r\n      'v8::Object *volatile' from incompatible type 'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/Wei/.node-gyp/4.1.1/include/node/v8.h:180:37: note: expanded from macro\r\n      'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:1632:12: note: in instantiation of function template\r\n      specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here\r\n    return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());\r\n           ^\r\n../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                             ^\r\n9 errors generated.\r\nmake: *** [Release/obj.target/serialport/src/serialport.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/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 13.4.0\r\ngyp ERR! command \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/Wei/Xproject/AppChromerino/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-darwin-x64/serialport.node\" \"--module_name=serialport\" \"--module_path=/Users/Wei/Xproject/AppChromerino/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-darwin-x64\"\r\ngyp ERR! cwd /Users/Wei/Xproject/AppChromerino/node_modules/serialport\r\ngyp ERR! node -v v4.1.1\r\ngyp ERR! node-gyp -v v3.0.3\r\ngyp ERR! not ok \r\nnode-pre-gyp ERR! build error \r\nnode-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/Wei/Xproject/AppChromerino/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-darwin-x64/serialport.node --module_name=serialport --module_path=/Users/Wei/Xproject/AppChromerino/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-darwin-x64' (1)\r\nnode-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Wei/Xproject/AppChromerino/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)\r\nnode-pre-gyp ERR! stack     at emitTwo (events.js:87:13)\r\nnode-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)\r\nnode-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:817:16)\r\nnode-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)\r\nnode-pre-gyp ERR! System Darwin 13.4.0\r\nnode-pre-gyp ERR! command \"/usr/local/bin/node\" \"/Users/Wei/Xproject/AppChromerino/node_modules/serialport/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"\r\nnode-pre-gyp ERR! cwd /Users/Wei/Xproject/AppChromerino/node_modules/serialport\r\nnode-pre-gyp ERR! node -v v4.1.1\r\nnode-pre-gyp ERR! node-pre-gyp -v v0.6.7\r\nnode-pre-gyp ERR! not ok \r\nFailed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/Wei/Xproject/AppChromerino/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-darwin-x64/serialport.node --module_name=serialport --module_path=/Users/Wei/Xproject/AppChromerino/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-darwin-x64' (1)\r\nnpm ERR! Darwin 13.4.0\r\nnpm ERR! argv \"/usr/local/bin/node\" \"/usr/local/bin/npm\" \"install\" \"serialport\"\r\nnpm ERR! node v4.1.1\r\nnpm ERR! npm  v2.14.4\r\nnpm ERR! code ELIFECYCLE\r\n\r\nnpm ERR! serialport@1.7.4 install: `node-pre-gyp install --fallback-to-build`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the serialport@1.7.4 install script 'node-pre-gyp install --fallback-to-build'.\r\nnpm ERR! This is most likely a problem with the serialport package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     node-pre-gyp install --fallback-to-build\r\nnpm ERR! You can get their info via:\r\nnpm ERR!     npm owner ls serialport\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/Wei/Xproject/AppChromerino/npm-debug.log\r\nWeis-MacBook-Pro:AppChromerino Wei$ \r\n```"},"comment":{"url":"https://api.github.com/repos/voodootikigod/node-serialport/issues/comments/144164703","html_url":"https://github.com/voodootikigod/node-serialport/issues/595#issuecomment-144164703","issue_url":"https://api.github.com/repos/voodootikigod/node-serialport/issues/595","id":144164703,"user":{"login":"kammce","id":4549768,"avatar_url":"https://avatars.githubusercontent.com/u/4549768?v=3","gravatar_id":"","url":"https://api.github.com/users/kammce","html_url":"https://github.com/kammce","followers_url":"https://api.github.com/users/kammce/followers","following_url":"https://api.github.com/users/kammce/following{/other_user}","gists_url":"https://api.github.com/users/kammce/gists{/gist_id}","starred_url":"https://api.github.com/users/kammce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kammce/subscriptions","organizations_url":"https://api.github.com/users/kammce/orgs","repos_url":"https://api.github.com/users/kammce/repos","events_url":"https://api.github.com/users/kammce/events{/privacy}","received_events_url":"https://api.github.com/users/kammce/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T19:31:00Z","updated_at":"2015-09-29T19:31:00Z","body":"Continuing to use io.js 3.2.0 on ubuntu 14.04LTS, both #566 and #571 work to read and write information to an arduino. \r\n\r\nNodejs Program:\r\n\r\nvar SerialPort = require(\"serialport\").SerialPort\r\nvar serialPort = new SerialPort(\"/dev/ttyACM0\", {\r\n  baudrate: 9600\r\n});\r\n\r\nserialPort.on(\"open\", function () {\r\n        console.log('open');\r\n        serialPort.on('data', function(data) {\r\n                console.log('data received: ' + data);\r\n        });\r\n        setInterval(function() {\r\n                serialPort.write(\"hello serial port\\n\");\r\n        }, 1000);\r\n});\r\n\r\nused example Arduino SerialEvent."}}