kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

i2c v0.2.3 fails to install on BeagleBone running Node v0.12.13

psiphi75 opened this issue · comments

My system details are:
OS: Debian 8.5, Linux 4.1.18-ti-r56
Processor/Arch: ARM
Node version: 0.12.13
i2c version: 0.2.3 (0.2.1 and earlier versions work fine)

When I run npm install i2c I get the following error:

> i2c@0.2.3 install /root/node_modules/i2c
> node-gyp rebuild

make: Entering directory '/root/node_modules/i2c/build'
  CXX(target) Release/obj.target/i2c/src/i2c.o
../src/i2c.cc: In function 'void Scan(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:48:49: error: call of overloaded 'New(v8::Local<v8::Primitive>)' is ambiguous
   Local<Value> err = Nan::New<Value>(Nan::Null());
                                                 ^
../src/i2c.cc:48:49: note: candidates are:
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:196,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:389:21: note: v8::Local<T> Nan::New(v8::Handle<T>) [with T = v8::Value]
 inline v8::Local<T> New(v8::Handle<T> h) {
                     ^
../node_modules/nan/nan_implementation_12_inl.h:405:21: note: v8::Local<T> Nan::New(const Nan::Global<T>&) [with T = v8::Value]
 inline v8::Local<T> New(Global<T> const& p) {
                     ^
../src/i2c.cc: In function 'void Open(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:85:49: error: call of overloaded 'New(v8::Local<v8::Primitive>)' is ambiguous
   Local<Value> err = Nan::New<Value>(Nan::Null());
                                                 ^
../src/i2c.cc:85:49: note: candidates are:
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:196,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:389:21: note: v8::Local<T> Nan::New(v8::Handle<T>) [with T = v8::Value]
 inline v8::Local<T> New(v8::Handle<T> h) {
                     ^
../node_modules/nan/nan_implementation_12_inl.h:405:21: note: v8::Local<T> Nan::New(const Nan::Global<T>&) [with T = v8::Value]
 inline v8::Local<T> New(Global<T> const& p) {
                     ^
../src/i2c.cc: In function 'void Read(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:108:49: error: call of overloaded 'New(v8::Local<v8::Primitive>)' is ambiguous
   Local<Value> err = Nan::New<Value>(Nan::Null());
                                                 ^
../src/i2c.cc:108:49: note: candidates are:
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:196,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:389:21: note: v8::Local<T> Nan::New(v8::Handle<T>) [with T = v8::Value]
 inline v8::Local<T> New(v8::Handle<T> h) {
                     ^
../node_modules/nan/nan_implementation_12_inl.h:405:21: note: v8::Local<T> Nan::New(const Nan::Global<T>&) [with T = v8::Value]
 inline v8::Local<T> New(Global<T> const& p) {
                     ^
../src/i2c.cc: In function 'void ReadByte(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:131:49: error: call of overloaded 'New(v8::Local<v8::Primitive>)' is ambiguous
   Local<Value> err = Nan::New<Value>(Nan::Null());
                                                 ^
../src/i2c.cc:131:49: note: candidates are:
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:196,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:389:21: note: v8::Local<T> Nan::New(v8::Handle<T>) [with T = v8::Value]
 inline v8::Local<T> New(v8::Handle<T> h) {
                     ^
../node_modules/nan/nan_implementation_12_inl.h:405:21: note: v8::Local<T> Nan::New(const Nan::Global<T>&) [with T = v8::Value]
 inline v8::Local<T> New(Global<T> const& p) {
                     ^
../src/i2c.cc: In function 'void ReadBlock(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:157:49: error: call of overloaded 'New(v8::Local<v8::Primitive>)' is ambiguous
   Local<Value> err = Nan::New<Value>(Nan::Null());
                                                 ^
../src/i2c.cc:157:49: note: candidates are:
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:196,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:389:21: note: v8::Local<T> Nan::New(v8::Handle<T>) [with T = v8::Value]
 inline v8::Local<T> New(v8::Handle<T> h) {
                     ^
../node_modules/nan/nan_implementation_12_inl.h:405:21: note: v8::Local<T> Nan::New(const Nan::Global<T>&) [with T = v8::Value]
 inline v8::Local<T> New(Global<T> const& p) {
                     ^
../src/i2c.cc: In function 'void Write(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:196:49: error: call of overloaded 'New(v8::Local<v8::Primitive>)' is ambiguous
   Local<Value> err = Nan::New<Value>(Nan::Null());
                                                 ^
../src/i2c.cc:196:49: note: candidates are:
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:196,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:389:21: note: v8::Local<T> Nan::New(v8::Handle<T>) [with T = v8::Value]
 inline v8::Local<T> New(v8::Handle<T> h) {
                     ^
../node_modules/nan/nan_implementation_12_inl.h:405:21: note: v8::Local<T> Nan::New(const Nan::Global<T>&) [with T = v8::Value]
 inline v8::Local<T> New(Global<T> const& p) {
                     ^
../src/i2c.cc: In function 'void WriteByte(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:214:49: error: call of overloaded 'New(v8::Local<v8::Primitive>)' is ambiguous
   Local<Value> err = Nan::New<Value>(Nan::Null());
                                                 ^
../src/i2c.cc:214:49: note: candidates are:
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:196,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:389:21: note: v8::Local<T> Nan::New(v8::Handle<T>) [with T = v8::Value]
 inline v8::Local<T> New(v8::Handle<T> h) {
                     ^
../node_modules/nan/nan_implementation_12_inl.h:405:21: note: v8::Local<T> Nan::New(const Nan::Global<T>&) [with T = v8::Value]
 inline v8::Local<T> New(Global<T> const& p) {
                     ^
../src/i2c.cc: In function 'void WriteBlock(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:236:49: error: call of overloaded 'New(v8::Local<v8::Primitive>)' is ambiguous
   Local<Value> err = Nan::New<Value>(Nan::Null());
                                                 ^
../src/i2c.cc:236:49: note: candidates are:
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:196,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:389:21: note: v8::Local<T> Nan::New(v8::Handle<T>) [with T = v8::Value]
 inline v8::Local<T> New(v8::Handle<T> h) {
                     ^
../node_modules/nan/nan_implementation_12_inl.h:405:21: note: v8::Local<T> Nan::New(const Nan::Global<T>&) [with T = v8::Value]
 inline v8::Local<T> New(Global<T> const& p) {
                     ^
../src/i2c.cc: In function 'void WriteWord(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:256:49: error: call of overloaded 'New(v8::Local<v8::Primitive>)' is ambiguous
   Local<Value> err = Nan::New<Value>(Nan::Null());
                                                 ^
../src/i2c.cc:256:49: note: candidates are:
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:196,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:389:21: note: v8::Local<T> Nan::New(v8::Handle<T>) [with T = v8::Value]
 inline v8::Local<T> New(v8::Handle<T> h) {
                     ^
../node_modules/nan/nan_implementation_12_inl.h:405:21: note: v8::Local<T> Nan::New(const Nan::Global<T>&) [with T = v8::Value]
 inline v8::Local<T> New(Global<T> const& p) {
                     ^
i2c.target.mk:87: recipe for target 'Release/obj.target/i2c/src/i2c.o' failed
make: *** [Release/obj.target/i2c/src/i2c.o] Error 1
make: Leaving directory '/root/node_modules/i2c/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:276:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1078:12)
gyp ERR! System Linux 4.1.18-ti-r56
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/i2c
gyp ERR! node -v v0.12.13
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm ERR! Linux 4.1.18-ti-r56
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "i2c"
npm ERR! node v0.12.13
npm ERR! npm  v2.15.0
npm ERR! code ELIFECYCLE

npm ERR! i2c@0.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the i2c@0.2.3 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the i2c 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 information on how to open an issue for this project with:
npm ERR!     npm bugs i2c
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls i2c
npm ERR! There is likely additional logging output above.

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

I am seeing similar issues with 12.2. Anybody out there resolve this?

commented

Just use 0.2.1 or earlier.

That worked great for me. I'm on the Edison platform. Thanks!!!

Same on Raspberry Pi. 0.2.1 works.

commented

the latest version depends on new versions of node (4.0 and later).