tessel / t1-cli

[UNMAINTAINED] Command line interface to Tessel 1.
Other
25 stars 21 forks source link

Doesn't seem to support new V8 bindings. #187

Open abritinthebay opened 9 years ago

abritinthebay commented 9 years ago

For example - on io.js, but as this will be in Node soon it's a general issue.

Here's the npm output:

/usr/local/bin/tessel -> /usr/local/lib/node_modules/tessel/bin/tessel.js

> usb@1.0.6 install /usr/local/lib/node_modules/tessel/node_modules/usb
> node-pre-gyp install --fallback-to-build

  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
../libusb/libusb/core.c:2241:35: warning: comparison of integers of different
      signs: 'int' and 'unsigned long' [-Wsign-compare]
        if (header_len < 0 || header_len >= sizeof(buf)) {
                              ~~~~~~~~~~ ^  ~~~~~~~~~~~
../libusb/libusb/core.c:2250:44: warning: comparison of integers of different
      signs: 'int' and 'unsigned long' [-Wsign-compare]
        if (text_len < 0 || text_len + header_len >= sizeof(buf)) {
                            ~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
2 warnings generated.
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/darwin_usb.o
../libusb/libusb/os/darwin_usb.c:1281:27: warning: expression which evaluates to
      zero treated as a null pointer constant of type
      'IOUSBInterfaceInterface550 **' (aka 'struct IOUSBInterfaceStruct550 **')
      [-Wnon-literal-null-conversion]
  cInterface->interface = IO_OBJECT_NULL;
                          ^~~~~~~~~~~~~~
/System/Library/Frameworks/IOKit.framework/Headers/IOTypes.h:164:24: note: 
      expanded from macro 'IO_OBJECT_NULL'
#define IO_OBJECT_NULL  ((io_object_t) 0)
                        ^~~~~~~~~~~~~~~~~
1 warning generated.
  LIBTOOL-STATIC Release/usb.a
  CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from ../src/node_usb.cc:1:
In file included from ../src/node_usb.h:21:
In file included from ../src/helpers.h:3:
In file included from ../node_modules/nan/nan.h:80:
In file included from ../node_modules/nan/nan_new.h:190:
../node_modules/nan/nan_implementation_12_inl.h:181:66: error: too many
      arguments to function call, expected at most 2, have 4
  return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
         ~~~~~~~~~~~~~~~~~~                                      ^~~~~~~~~~
/Users/gregorywildsmith/.node-gyp/2.5.0/deps/v8/include/v8.h:4188:3: note: 
      'New' declared here
  static Local<Signature> New(
  ^
1 error generated.
make: *** [Release/obj.target/usb_bindings/src/node_usb.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:269: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 Darwin 14.5.0
gyp ERR! command "/usr/local/bin/iojs" "/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/tessel/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/usr/local/lib/node_modules/tessel/node_modules/usb/src/binding"
gyp ERR! cwd /usr/local/lib/node_modules/tessel/node_modules/usb
gyp ERR! node -v v2.5.0
gyp ERR! node-gyp -v v2.0.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/iojs /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/tessel/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/usr/local/lib/node_modules/tessel/node_modules/usb/src/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/tessel/node_modules/usb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:764:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Darwin 14.5.0
node-pre-gyp ERR! command "/usr/local/bin/iojs" "/usr/local/lib/node_modules/tessel/node_modules/usb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/tessel/node_modules/usb
node-pre-gyp ERR! node -v v2.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.4
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/iojs /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/tessel/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/usr/local/lib/node_modules/tessel/node_modules/usb/src/binding' (1)```
johnnyman727 commented 9 years ago

Yes, I think the best patch now is to add the engine tag to the package.json to ensure folks know what version of Node/io.js this package will run on. Thanks for reporting it @abritinthebay!

kevinmehall commented 9 years ago

https://github.com/nonolith/node-usb/issues/79

ChALkeR commented 9 years ago

Adding to the list: https://github.com/nodejs/node/issues/2798.

abritinthebay commented 9 years ago

Seems like Tessel should use the NAN package to manage it's bindings so that this isn't a problem in the future (I hope Tessel 2 does this, it's the recommended practice and will save the team a lot of headaches)

LinusU commented 9 years ago

Nan is definitely the way to go here. Node.js 4.0.0 is released now and I really think that we should support it over iojs.

kevinmehall commented 9 years ago

The native-code dependency of the CLI is node-usb, which already uses NAN, but needs to be updated to NAN 2.0 to support io.js 3.0 and node.js 4.0.

LinusU commented 9 years ago

Work in progress here nonolith/node-usb#90