Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

module load failure with Node v0.10.* #115

Closed
pizthewiz opened this Issue · 7 comments

3 participants

@pizthewiz

i have a Jakefile does some auto-build versioning through the use of @TooTallNate's NodObjC which pulls in node-ffi and unfortunately it appears to be blowing up after upgrading to Node v0.10.0, no issues with v0.8.22.

% jake --trace
jake aborted.
Error: Module version mismatch. Expected 11, got 1.
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at bindings (/usr/local/lib/node_modules/NodObjC/node_modules/node-ffi/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/usr/local/lib/node_modules/NodObjC/node_modules/node-ffi/lib/ffi.js:3:35)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
@TooTallNate
Owner
@pizthewiz

rebuilding node-ffi on node v0.10.0 then hits a snag in libuv, a function signature may have changed:

  CXX(target) Release/obj.target/ffi_bindings/src/foreign_caller.o
../src/foreign_caller.cc:81:5: error: no matching function for call to 'uv_queue_work'
    uv_queue_work(uv_default_loop(), req, ForeignCaller::AsyncFFICall,...
    ^~~~~~~~~~~~~
/Users/jpm/.node-gyp/0.10.0/deps/uv/include/uv.h:1397: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,
              ^
1 error generated.
make: *** [Release/obj.target/ffi_bindings/src/foreign_caller.o] Error 1
gyp ERR! build error 

and a full gist with more details.

@TooTallNate
Owner

Oh crap, basically you're running into the fact that NodObjC still uses the older version of node-ffi. The current version of node-ffi works fine on v0.10.0. I have. A WIP ffi-1.0 branch in the NodObjC repo, but it's not quite ready yet. Hopefully I'll find time to fix it soon!

@TooTallNate
Owner

Closing since this is a NodObjC issue, not node-ffi

@pizthewiz

sorry about the confusion, i'll keep an eye on the NodObjC repo for updates.

@carter-thaxton

Running into this, too. NodObjC is indeed the issue, but it's not a straightforward fix there. It requires a major refactor. @TooTallNate, until your refactor is complete, could you simply push a new version of your node-ffi 0.x API onto npm, from the 0.5 branch of this node-ffi project? As long as node-ffi is on npm with its own alias, I think it should remain a maintained project.

I'll attach a pull request if that helps, but it's just the straightforward (uv_after_work_cb) cast. That should fix every project that uses the old node-ffi API, not just NodObjC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.