Sannis / node-mysql-libmysqlclient

Asynchronous MySQL binding for Node.js
http://sannis.github.com/node-mysql-libmysqlclient
Other
229 stars 47 forks source link

Cannot build master with node v0.10 #181

Closed nevill closed 10 years ago

nevill commented 10 years ago

I have got some errors when I am trying to build the latest HEAD of master (#265c77).

gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.1
gyp info using node@0.10.22 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_statement.o
../src/mysql_bindings_statement.cc:603:5: error: no matching function for call to 'uv_queue_work'
    uv_queue_work(uv_default_loop(), _req, EIO_Execute, EIO_After_Execute);
    ^~~~~~~~~~~~~
/Users/nevill/.node-gyp/0.10.22/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/mysql_bindings_statement.cc:752:5: error: no matching function for call to 'uv_queue_work'
    uv_queue_work(uv_default_loop(), _req, EIO_FetchAll, EIO_After_FetchAll);
    ^~~~~~~~~~~~~
/Users/nevill/.node-gyp/0.10.22/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/mysql_bindings_statement.cc:954:5: error: no matching function for call to 'uv_queue_work'
    uv_queue_work(uv_default_loop(), _req, EIO_Fetch, EIO_After_Fetch);
    ^~~~~~~~~~~~~
/Users/nevill/.node-gyp/0.10.22/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/mysql_bindings_statement.cc:1491:5: error: no matching function for call to 'uv_queue_work'
    uv_queue_work(uv_default_loop(), _req, EIO_StoreResult, EIO_After_StoreResult);
    ^~~~~~~~~~~~~
/Users/nevill/.node-gyp/0.10.22/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,
              ^
4 errors generated.
make: *** [Release/obj.target/mysql_bindings/src/mysql_bindings_statement.o] Error 1

The reason is, it changes to use libuv since #177. But after node v0.10, libuv has changed the signature of uv_after_work_cb, see https://github.com/joyent/libuv/commit/92fb84b751e18f032c02609467f44bfe927b80c5

I can fix it like (uv_after_work_cb) EIO_After_Execute to pass, as it suggested. But it may require more work to fix it totally.

Sannis commented 10 years ago

Fixed in 89baf73ca3fb5fd9711fab8f88b602a262491c51.