Build failure under 0.8.5 #15

Open
acacio opened this Issue Aug 7, 2012 · 6 comments

Projects

None yet

6 participants

@acacio
acacio commented Aug 7, 2012
acacio@quasi:node-usb$ make
node-waf -v configure clean build; node tests/node-usb-test.js
Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for program gcc or cc           : /usr/bin/gcc 
Checking for gcc                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /opt/node 
Checking for program pkg-config          : /usr/bin/pkg-config 
Checking for libusb-1.0                  : 20:58:12 runner pkg-config --errors-to-stdout --print-errors --cflags --libs libusb-1.0 
yes 
'configure' finished successfully (0.247s)
'clean' finished successfully (0.059s)
Waf: Entering directory `/home/acacio/src/nodejs/node-usb/build'
[1/6] cxx: src/node_usb.cc -> build/Release/src/node_usb_1.o
20:58:13 runner system command -> ['/usr/bin/g++', '-g', '-Wall', '-fPIC', '-DPIC', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', '-D_GNU_SOURCE', '-DEV_MULTIPLICITY=1', '-I/usr/local/include/libusb-1.0', '-I/opt/node/include/node', '-DNODE_USB_REVISION="61986afa8d9cdf28121d29d47d28a57da0f7d853"', '../src/node_usb.cc', '-c', '-o', 'Release/src/node_usb_1.o']
[2/6] cxx: src/usb.cc -> build/Release/src/usb_1.o
20:58:13 runner system command -> ['/usr/bin/g++', '-g', '-Wall', '-fPIC', '-DPIC', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', '-D_GNU_SOURCE', '-DEV_MULTIPLICITY=1', '-I/usr/local/include/libusb-1.0', '-I/opt/node/include/node', '-DNODE_USB_REVISION="61986afa8d9cdf28121d29d47d28a57da0f7d853"', '../src/usb.cc', '-c', '-o', 'Release/src/usb_1.o']
[3/6] cxx: src/device.cc -> build/Release/src/device_1.o
20:58:13 runner system command -> ['/usr/bin/g++', '-g', '-Wall', '-fPIC', '-DPIC', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', '-D_GNU_SOURCE', '-DEV_MULTIPLICITY=1', '-I/usr/local/include/libusb-1.0', '-I/opt/node/include/node', '-DNODE_USB_REVISION="61986afa8d9cdf28121d29d47d28a57da0f7d853"', '../src/device.cc', '-c', '-o', 'Release/src/device_1.o']
[4/6] cxx: src/interface.cc -> build/Release/src/interface_1.o
20:58:13 runner system command -> ['/usr/bin/g++', '-g', '-Wall', '-fPIC', '-DPIC', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', '-D_GNU_SOURCE', '-DEV_MULTIPLICITY=1', '-I/usr/local/include/libusb-1.0', '-I/opt/node/include/node', '-DNODE_USB_REVISION="61986afa8d9cdf28121d29d47d28a57da0f7d853"', '../src/interface.cc', '-c', '-o', 'Release/src/interface_1.o']
[5/6] cxx: src/endpoint.cc -> build/Release/src/endpoint_1.o
20:58:13 runner system command -> ['/usr/bin/g++', '-g', '-Wall', '-fPIC', '-DPIC', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', '-D_GNU_SOURCE', '-DEV_MULTIPLICITY=1', '-I/usr/local/include/libusb-1.0', '-I/opt/node/include/node', '-DNODE_USB_REVISION="61986afa8d9cdf28121d29d47d28a57da0f7d853"', '../src/endpoint.cc', '-c', '-o', 'Release/src/endpoint_1.o']
../src/device.cc: In static member function ‘static v8::Handle<v8::Value> NodeUsb::Device::Reset(const v8::Arguments&)’:
../src/device.cc:151: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_ref(uv_handle_t*)’
../src/device.cc: In static member function ‘static void NodeUsb::Device::EIO_Reset(uv_work_t*)’:
../src/device.cc:178: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_unref(uv_handle_t*)’
../src/device.cc: In static member function ‘static void NodeUsb::Device::EIO_After_Reset(uv_work_t*)’:
../src/device.cc:182: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_unref(uv_handle_t*)’
../src/device.cc: In static member function ‘static v8::Handle<v8::Value> NodeUsb::Device::ControlTransfer(const v8::Arguments&)’:
../src/device.cc:381: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_ref(uv_handle_t*)’
../src/device.cc: In static member function ‘static void NodeUsb::Device::EIO_After_ControlTransfer(uv_work_t*)’:
../src/device.cc:404: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_unref(uv_handle_t*)’
../src/interface.cc: In static member function ‘static v8::Handle<v8::Value> NodeUsb::Interface::Release(const v8::Arguments&)’:
../src/interface.cc:191: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_ref(uv_handle_t*)’
../src/interface.cc: In static member function ‘static void NodeUsb::Interface::EIO_After_Release(uv_work_t*)’:
../src/interface.cc:212: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_unref(uv_handle_t*)’
../src/interface.cc: In static member function ‘static v8::Handle<v8::Value> NodeUsb::Interface::AlternateSetting(const v8::Arguments&)’:
../src/interface.cc:238: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_ref(uv_handle_t*)’
../src/interface.cc: In static member function ‘static void NodeUsb::Interface::EIO_After_AlternateSetting(uv_work_t*)’:
../src/interface.cc:259: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_unref(uv_handle_t*)’
../src/endpoint.cc: In static member function ‘static v8::Handle<v8::Value> NodeUsb::Endpoint::BulkTransfer(const v8::Arguments&)’:
../src/endpoint.cc:262: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_ref(uv_handle_t*)’
../src/endpoint.cc: In static member function ‘static void NodeUsb::Endpoint::EIO_After_BulkTransfer(uv_work_t*)’:
../src/endpoint.cc:270: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_unref(uv_handle_t*)’
../src/endpoint.cc: In static member function ‘static v8::Handle<v8::Value> NodeUsb::Endpoint::InterruptTransfer(const v8::Arguments&)’:
../src/endpoint.cc:274: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_ref(uv_handle_t*)’
../src/endpoint.cc: In static member function ‘static void NodeUsb::Endpoint::EIO_After_InterruptTransfer(uv_work_t*)’:
../src/endpoint.cc:282: error: cannot convert ‘uv_loop_t*’ to ‘uv_handle_t*’ for argument ‘1’ to ‘void uv_unref(uv_handle_t*)’
Waf: Leaving directory `/home/acacio/src/nodejs/node-usb/build'
Build failed:
 -> task failed (err #1): 
    {task: cxx device.cc -> device_1.o}
 -> task failed (err #1): 
    {task: cxx interface.cc -> interface_1.o}
 -> task failed (err #1): 
    {task: cxx endpoint.cc -> endpoint_1.o}

module.js:340
    throw err;
          ^
Error: Cannot find module './usb_bindings'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/acacio/src/nodejs/node-usb/usb.js:4:15)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
make: *** [make] Error 1
acacio@quasi:node-usb$ node --version
v0.8.5
@SebastienElet

Same issue with 0.8.4

@SebastienElet

I solved my problem with downgrade of nodejs to 0.6.19

cd /usr/local/Library/Formula && git checkout 83988e4 node.rb && brew unlink nodejs && brew install nodejs

@peters
peters commented Aug 15, 2012

It would be great if we could have support for 0.8.x branch! This is an awesome library :)

@mharsch
mharsch commented Sep 29, 2012

This is caused by a change in the API for libuv in node >0.6.x: joyent/libuv#347

Obviously, the root cause is issue #12

@danielbprice

Hit this too, with 0.8.19. Would love a fix.

@kevinmehall

You can try out my fork: https://github.com/nonolith/node-usb, which works on 0.8 and 0.10, Linux, Mac, and Windows.

Note that the API is not compatible (hopefully you find it an improvement).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment