fnogatz / dgtchess

An event-driven JavaScript connector for electronic DGT chess boards
GNU General Public License v3.0
24 stars 7 forks source link

Serialport error installing node-dgtchess via npm #2

Closed atduskgreg closed 10 years ago

atduskgreg commented 10 years ago

I'm seeing what I think is this error: https://github.com/voodootikigod/node-serialport/issues/135 when trying to install node-dgtchess. I'm on OSX running 10.9.4. It seems like that error was fixed in serialport last year. Is node-dgtchess's npm package including an old version somehow?

The full error message:

> serialport@1.0.8 install /Users/greg/Documents/mit/playful_systems/chess/chesscomputer/dgt-    integration/node_modules/dgtchess/node_modules/serialport
> node-gyp rebuild

  CXX(target) Release/obj.target/serialport/src/serialport.o
../src/serialport.cpp:51:3: error: no matching function for call to 'uv_queue_work'
  uv_queue_work(uv_default_loop(), req, EIO_Open, EIO_AfterOpen);
  ^~~~~~~~~~~~~
/Users/greg/.node-gyp/0.10.18/deps/uv/include/uv.h:1432:15: note: candidate function not viable: no known     conversion from 'void (uv_work_t *)' to
      'uv_after_work_cb' (aka 'void (*)(uv_work_t *, int)') for 4th argument
UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
              ^
../src/serialport.cpp:118:5: error: no matching function for call to 'uv_queue_work'
    uv_queue_work(uv_default_loop(), &queuedWrite->req, EIO_Write, EIO_AfterWrite);
    ^~~~~~~~~~~~~
/Users/greg/.node-gyp/0.10.18/deps/uv/include/uv.h:1432:15: note: candidate function not viable: no known     conversion from 'void (uv_work_t *)' to
      'uv_after_work_cb' (aka 'void (*)(uv_work_t *, int)') for 4th argument
UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
              ^
../src/serialport.cpp:146:5: error: no matching function for call to 'uv_queue_work'
    uv_queue_work(uv_default_loop(), &nextQueuedWrite->req, EIO_Write, EIO_AfterWrite);
    ^~~~~~~~~~~~~
/Users/greg/.node-gyp/0.10.18/deps/uv/include/uv.h:1432:15: note: candidate function not viable: no known     conversion from 'void (uv_work_t *)' to
      'uv_after_work_cb' (aka 'void (*)(uv_work_t *, int)') for 4th argument
UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
              ^
../src/serialport.cpp:178:3: error: no matching function for call to 'uv_queue_work'
  uv_queue_work(uv_default_loop(), req, EIO_Close, EIO_AfterClose);
  ^~~~~~~~~~~~~
/Users/greg/.node-gyp/0.10.18/deps/uv/include/uv.h:1432:15: note: candidate function not viable: no known     conversion from 'void (uv_work_t *)' to
      'uv_after_work_cb' (aka 'void (*)(uv_work_t *, int)') for 4th argument
UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
              ^
../src/serialport.cpp:214:3: error: no matching function for call to 'uv_queue_work'
  uv_queue_work(uv_default_loop(), req, EIO_List, EIO_AfterList);
  ^~~~~~~~~~~~~
/Users/greg/.node-gyp/0.10.18/deps/uv/include/uv.h:1432:15: note: candidate function not viable: no known     conversion from 'void (uv_work_t *)' to
      'uv_after_work_cb' (aka 'void (*)(uv_work_t *, int)') for 4th argument
UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
              ^
../src/serialport.cpp:271:3: error: no matching function for call to 'uv_queue_work'
  uv_queue_work(uv_default_loop(), req, EIO_Flush, EIO_AfterFlush);
  ^~~~~~~~~~~~~
/Users/greg/.node-gyp/0.10.18/deps/uv/include/uv.h:1432:15: note: candidate function not viable: no known     conversion from 'void (uv_work_t *)' to
      'uv_after_work_cb' (aka 'void (*)(uv_work_t *, int)') for 4th argument
UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
              ^
6 errors generated.
make: *** [Release/obj.target/serialport/src/serialport.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/npm/node_modules/node-gyp/lib/build.    js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/greg/Documents/mit/playful_systems/chess/chesscomputer/dgt-    integration/node_modules/dgtchess/node_modules/serialport
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0
atduskgreg commented 10 years ago

If I just run

$ npm install serialport

that works fine.

fnogatz commented 10 years ago

Solved by a24afa092eed32d86c558bec5941ab963f22c2cf.

atduskgreg commented 10 years ago

Great, thanks! You beat me to the pull request by about 5 secs :) https://github.com/atduskgreg/node-dgtchess/commit/9c0886298adc5fd82582ca688322872df8e355c0